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.Algebra.Group.Aut
import Mathlib.Algebra.Group.Subgroup.Basic
import Mathlib.Logic.Function.Basic
#align_import group_theory.semidirect_product from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
variable (N : Type*) (G : Type*) {H : Type*} [Group N] [Group G] [Group H]
... | Mathlib/GroupTheory/SemidirectProduct.lean | 157 | 158 | theorem inl_aut (g : G) (n : N) : (inl (φ g n) : N ⋊[φ] G) = inr g * inl n * inr g⁻¹ := by |
ext <;> simp
| [
" (a * b * c).left = (a * (b * c)).left",
" (a * b * c).right = (a * (b * c)).right",
" (1 * a).left = a.left",
" (a * 1).left = a.left",
" (a⁻¹ * a).left = left 1",
" (a⁻¹ * a).right = right 1",
" ∀ (x y : N),\n { toFun := fun n => { left := n, right := 1 }, map_one' := ⋯ }.toFun (x * y) =\n { ... | [
" (a * b * c).left = (a * (b * c)).left",
" (a * b * c).right = (a * (b * c)).right",
" (1 * a).left = a.left",
" (a * 1).left = a.left",
" (a⁻¹ * a).left = left 1",
" (a⁻¹ * a).right = right 1",
" ∀ (x y : N),\n { toFun := fun n => { left := n, right := 1 }, map_one' := ⋯ }.toFun (x * y) =\n { ... |
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic
#align_import number_theory.legendre_symbol.basic from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
open Nat
section Euler
namespace ZMod
variable (p : ℕ) [Fact p.Prime]
| Mathlib/NumberTheory/LegendreSymbol/Basic.lean | 48 | 57 | theorem euler_criterion_units (x : (ZMod p)ˣ) : (∃ y : (ZMod p)ˣ, y ^ 2 = x) ↔ x ^ (p / 2) = 1 := by |
by_cases hc : p = 2
· subst hc
simp only [eq_iff_true_of_subsingleton, exists_const]
· have h₀ := FiniteField.unit_isSquare_iff (by rwa [ringChar_zmod_n]) x
have hs : (∃ y : (ZMod p)ˣ, y ^ 2 = x) ↔ IsSquare x := by
rw [isSquare_iff_exists_sq x]
simp_rw [eq_comm]
rw [hs]
rwa [card p] a... | [
" (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1",
" (∃ y, y ^ 2 = x) ↔ x ^ (2 / 2) = 1",
" ringChar (ZMod p) ≠ 2",
" (∃ y, y ^ 2 = x) ↔ IsSquare x",
" (∃ y, y ^ 2 = x) ↔ ∃ c, x = c ^ 2",
" IsSquare x ↔ x ^ (p / 2) = 1"
] | [] |
import Mathlib.Data.Nat.Defs
import Mathlib.Tactic.GCongr.Core
import Mathlib.Tactic.Common
import Mathlib.Tactic.Monotonicity.Attr
#align_import data.nat.factorial.basic from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
namespace Nat
def factorial : ℕ → ℕ
| 0 => 1
| succ n => s... | Mathlib/Data/Nat/Factorial/Basic.lean | 142 | 147 | theorem lt_factorial_self {n : ℕ} (hi : 3 ≤ n) : n < n ! := by |
have : 0 < n := by omega
have hn : 1 < pred n := le_pred_of_lt (succ_le_iff.mp hi)
rw [← succ_pred_eq_of_pos ‹0 < n›, factorial_succ]
exact (Nat.lt_mul_iff_one_lt_right (pred n).succ_pos).2
((Nat.lt_of_lt_of_le hn (self_le_factorial _)))
| [
" m ! ∣ n !",
" m ! ∣ m !",
" m ! ∣ n.succ !",
" m ! * (m + 1) ^ 0 ≤ (m + 0)!",
" m ! * (m + 1) ^ (n + 1) ≤ (m + (n + 1))!",
" m ! * (m + 1) ^ n * (m + 1) ≤ (m + n)! * (m + n + 1)",
" n ! < m ! ↔ n < m",
" n ! < m !",
" ∀ {n : ℕ}, 0 < n → n ! < (n + 1)!",
" k ! < (k + 1)!",
" 0 < k * k !",
" n... | [
" m ! ∣ n !",
" m ! ∣ m !",
" m ! ∣ n.succ !",
" m ! * (m + 1) ^ 0 ≤ (m + 0)!",
" m ! * (m + 1) ^ (n + 1) ≤ (m + (n + 1))!",
" m ! * (m + 1) ^ n * (m + 1) ≤ (m + n)! * (m + n + 1)",
" n ! < m ! ↔ n < m",
" n ! < m !",
" ∀ {n : ℕ}, 0 < n → n ! < (n + 1)!",
" k ! < (k + 1)!",
" 0 < k * k !",
" n... |
import Mathlib.NumberTheory.NumberField.ClassNumber
import Mathlib.NumberTheory.Cyclotomic.Rat
import Mathlib.NumberTheory.Cyclotomic.Embeddings
universe u
namespace IsCyclotomicExtension.Rat
open NumberField Polynomial InfinitePlace Nat Real cyclotomic
variable (K : Type u) [Field K] [NumberField K]
theorem ... | Mathlib/NumberTheory/Cyclotomic/PID.lean | 44 | 55 | theorem five_pid [IsCyclotomicExtension {5} ℚ K] : IsPrincipalIdealRing (𝓞 K) := by |
apply RingOfIntegers.isPrincipalIdealRing_of_abs_discr_lt
rw [absdiscr_prime 5 K, IsCyclotomicExtension.finrank (n := 5) K
(irreducible_rat (by norm_num)), nrComplexPlaces_eq_totient_div_two 5, totient_prime
PNat.prime_five]
simp only [Int.reduceNeg, PNat.val_ofNat, succ_sub_succ_eq_sub, tsub_zero, red... | [
" IsPrincipalIdealRing (𝓞 K)",
" ↑|discr K| <\n (2 * (π / 4) ^ NrComplexPlaces K *\n (↑(FiniteDimensional.finrank ℚ K) ^ FiniteDimensional.finrank ℚ K / ↑(FiniteDimensional.finrank ℚ K)!)) ^\n 2",
" 0 < ↑3",
" ↑|(-1) ^ ((↑3 - 1) / 2) * ↑↑3 ^ (↑3 - 2)| < (2 * (π / 4) ^ ((↑3 - 1) / 2) * (↑(↑3 - ... | [
" IsPrincipalIdealRing (𝓞 K)",
" ↑|discr K| <\n (2 * (π / 4) ^ NrComplexPlaces K *\n (↑(FiniteDimensional.finrank ℚ K) ^ FiniteDimensional.finrank ℚ K / ↑(FiniteDimensional.finrank ℚ K)!)) ^\n 2",
" 0 < ↑3",
" ↑|(-1) ^ ((↑3 - 1) / 2) * ↑↑3 ^ (↑3 - 2)| < (2 * (π / 4) ^ ((↑3 - 1) / 2) * (↑(↑3 - ... |
import Mathlib.GroupTheory.Sylow
import Mathlib.GroupTheory.Transfer
#align_import group_theory.schur_zassenhaus from "leanprover-community/mathlib"@"d57133e49cf06508700ef69030cd099917e0f0de"
namespace Subgroup
section SchurZassenhausAbelian
open MulOpposite MulAction Subgroup.leftTransversals MemLeftTransversa... | Mathlib/GroupTheory/SchurZassenhaus.lean | 81 | 89 | theorem smul_diff' (h : H) :
diff (MonoidHom.id H) α (op (h : G) • β) = diff (MonoidHom.id H) α β * h ^ H.index := by |
letI := H.fintypeQuotientOfFiniteIndex
rw [diff, diff, index_eq_card, ← Finset.card_univ, ← Finset.prod_const, ← Finset.prod_mul_distrib]
refine Finset.prod_congr rfl fun q _ => ?_
simp_rw [Subtype.ext_iff, MonoidHom.id_apply, coe_mul, mul_assoc, mul_right_inj]
rw [smul_apply_eq_smul_apply_inv_smul, smul_eq_... | [
" diff (MonoidHom.id ↥H) y✝ x✝ = 1",
" diff (MonoidHom.id ↥H) x✝ z✝ = 1",
" Inhabited H.QuotientDiff",
" Inhabited (Quotient { r := fun α β => diff (MonoidHom.id ↥H) α β = 1, iseqv := ⋯ })",
" diff (MonoidHom.id ↥H) (g • α) (g • β) = ⟨g.unop⁻¹ * ↑(diff (MonoidHom.id ↥H) α β) * g.unop, ⋯⟩",
" (fun h => ⟨g.... | [
" diff (MonoidHom.id ↥H) y✝ x✝ = 1",
" diff (MonoidHom.id ↥H) x✝ z✝ = 1",
" Inhabited H.QuotientDiff",
" Inhabited (Quotient { r := fun α β => diff (MonoidHom.id ↥H) α β = 1, iseqv := ⋯ })",
" diff (MonoidHom.id ↥H) (g • α) (g • β) = ⟨g.unop⁻¹ * ↑(diff (MonoidHom.id ↥H) α β) * g.unop, ⋯⟩",
" (fun h => ⟨g.... |
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Products
import Mathlib.CategoryTheory.Limits.ConcreteCategory
import Mathlib.CategoryTheory.Limits.Shapes.Types
import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer
import Mathlib.CategoryT... | Mathlib/CategoryTheory/Limits/Shapes/ConcreteCategory.lean | 237 | 243 | theorem widePullback_ext' {B : C} {ι : Type w} [Nonempty ι] {X : ι → C}
(f : ∀ j : ι, X j ⟶ B) [HasWidePullback.{w} B X f]
[PreservesLimit (wideCospan B X f) (forget C)] (x y : ↑(widePullback B X f))
(h : ∀ j, π f j x = π f j y) : x = y := by |
apply Concrete.widePullback_ext _ _ _ _ h
inhabit ι
simp only [← π_arrow f default, comp_apply, h]
| [
" x = y",
" ∀ (j : WidePullbackShape ι), (limit.π (wideCospan B X f) j) x = (limit.π (wideCospan B X f) j) y",
" (limit.π (wideCospan B X f) none) x = (limit.π (wideCospan B X f) none) y",
" (limit.π (wideCospan B X f) (some j)) x = (limit.π (wideCospan B X f) (some j)) y",
" (base f) x = (base f) y"
] | [
" x = y",
" ∀ (j : WidePullbackShape ι), (limit.π (wideCospan B X f) j) x = (limit.π (wideCospan B X f) j) y",
" (limit.π (wideCospan B X f) none) x = (limit.π (wideCospan B X f) none) y",
" (limit.π (wideCospan B X f) (some j)) x = (limit.π (wideCospan B X f) (some j)) y"
] |
import Mathlib.LinearAlgebra.Dimension.Basic
import Mathlib.SetTheory.Cardinal.ToNat
#align_import linear_algebra.finrank from "leanprover-community/mathlib"@"347636a7a80595d55bedf6e6fbd996a3c39da69a"
universe u v w
open Cardinal Submodule Module Function
variable {R : Type u} {M : Type v} {N : Type w}
variable... | Mathlib/LinearAlgebra/Dimension/Finrank.lean | 84 | 89 | theorem lt_rank_of_lt_finrank {n : ℕ} (h : n < finrank R M) : ↑n < Module.rank R M := by |
rwa [← Cardinal.toNat_lt_iff_lt_of_lt_aleph0, toNat_natCast]
· exact nat_lt_aleph0 n
· contrapose! h
rw [finrank, Cardinal.toNat_apply_of_aleph0_le h]
exact n.zero_le
| [
" finrank R M = n",
" finrank R M ≤ n",
" Module.rank R M < ℵ₀",
" ↑n < ℵ₀",
" finrank R M < n",
" ↑n < Module.rank R M",
" 0 ≤ n"
] | [
" finrank R M = n",
" finrank R M ≤ n",
" Module.rank R M < ℵ₀",
" ↑n < ℵ₀",
" finrank R M < n"
] |
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Ring.Nat
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.RingTheory.Fintype
import Mathlib.Tactic.IntervalCases
#align_import number_the... | Mathlib/NumberTheory/LucasLehmer.lean | 162 | 164 | theorem Int.natCast_pow_pred (b p : ℕ) (w : 0 < b) : ((b ^ p - 1 : ℕ) : ℤ) = (b : ℤ) ^ p - 1 := by |
have : 1 ≤ b ^ p := Nat.one_le_pow p b w
norm_cast
| [
" 2 ^ m < 2 ^ n",
" 1 < 2",
" mersenne k + 1 = 2 ^ k",
" 1 ≤ 2 ^ k",
" 1 ≤ 2",
" 0 ≤ sMod p i",
" 0 ≤ sMod p 0",
" 0 ≤ sMod p (n✝ + 1)",
" 0 ≤ 4 % (2 ^ p - 1)",
" 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)",
" 2 ^ p - 1 ≠ 0",
" sMod p i % (2 ^ p - 1) = sMod p i",
" sMod p 0 % (2 ^ p - 1) = sMod p... | [
" 2 ^ m < 2 ^ n",
" 1 < 2",
" mersenne k + 1 = 2 ^ k",
" 1 ≤ 2 ^ k",
" 1 ≤ 2",
" 0 ≤ sMod p i",
" 0 ≤ sMod p 0",
" 0 ≤ sMod p (n✝ + 1)",
" 0 ≤ 4 % (2 ^ p - 1)",
" 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)",
" 2 ^ p - 1 ≠ 0",
" sMod p i % (2 ^ p - 1) = sMod p i",
" sMod p 0 % (2 ^ p - 1) = sMod p... |
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 | 301 | 301 | theorem not_mem_support {x : α} : x ∉ f.support ↔ f x = x := by | simp
| [
" x ∈ f.support ↔ f x ≠ x",
" x ∉ f.support ↔ f x = x"
] | [
" x ∈ f.support ↔ f x ≠ x"
] |
import Mathlib.Data.List.Infix
#align_import data.list.rdrop from "leanprover-community/mathlib"@"26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2"
-- Make sure we don't import algebra
assert_not_exists Monoid
variable {α : Type*} (p : α → Bool) (l : List α) (n : ℕ)
namespace List
def rdrop : List α :=
l.take (l.leng... | Mathlib/Data/List/DropRight.lean | 102 | 102 | theorem rdropWhile_nil : rdropWhile p ([] : List α) = [] := by | simp [rdropWhile, dropWhile]
| [
" [].rdrop n = []",
" l.rdrop 0 = l",
" l.rdrop n = (drop n l.reverse).reverse",
" take (l.length - n) l = (drop n l.reverse).reverse",
" take ([].length - n) [] = (drop n [].reverse).reverse",
" take ((xs ++ [x]).length - n) (xs ++ [x]) = (drop n (xs ++ [x]).reverse).reverse",
" take ((xs ++ [x]).lengt... | [
" [].rdrop n = []",
" l.rdrop 0 = l",
" l.rdrop n = (drop n l.reverse).reverse",
" take (l.length - n) l = (drop n l.reverse).reverse",
" take ([].length - n) [] = (drop n [].reverse).reverse",
" take ((xs ++ [x]).length - n) (xs ++ [x]) = (drop n (xs ++ [x]).reverse).reverse",
" take ((xs ++ [x]).lengt... |
import Mathlib.Init.Function
import Mathlib.Init.Order.Defs
#align_import data.bool.basic from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23"
namespace Bool
@[deprecated (since := "2024-06-07")] alias decide_True := decide_true_eq_true
#align bool.to_bool_true decide_true_eq_true
@[dep... | Mathlib/Data/Bool/Basic.lean | 99 | 99 | theorem or_inl {a b : Bool} (H : a) : a || b := by | simp [H]
| [
" b = false ∨ b = true",
" false = false ∨ false = true",
" true = false ∨ true = true",
" p x",
" p false",
" p true",
" p b ∨ p !b",
" p false ∨ p !false",
" p true ∨ p !true",
" ∃ x, p x",
" (a || b) = true"
] | [
" b = false ∨ b = true",
" false = false ∨ false = true",
" true = false ∨ true = true",
" p x",
" p false",
" p true",
" p b ∨ p !b",
" p false ∨ p !false",
" p true ∨ p !true",
" ∃ x, p x"
] |
import Mathlib.Data.List.Nodup
#align_import data.list.duplicate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
variable {α : Type*}
namespace List
inductive Duplicate (x : α) : List α → Prop
| cons_mem {l : List α} : x ∈ l → Duplicate x (x :: l)
| cons_duplicate {y : α} {l ... | Mathlib/Data/List/Duplicate.lean | 102 | 103 | theorem duplicate_cons_iff_of_ne {y : α} (hne : x ≠ y) : x ∈+ y :: l ↔ x ∈+ l := by |
simp [duplicate_cons_iff, hne.symm]
| [
" x ∈ l",
" x ∈ x :: l'",
" x ∈ y :: l'",
" l ≠ [y]",
" x :: l' ≠ [y]",
" z :: l' ≠ [y]",
" x ∈+ y :: l ↔ y = x ∧ x ∈ l ∨ x ∈+ l",
" y = x ∧ x ∈ l ∨ x ∈+ l",
" x = x ∧ x ∈ l ∨ x ∈+ l",
" x ∈+ y :: l",
" x ∈+ x :: l",
" x ∈+ l",
" x ∈+ y :: l ↔ x ∈+ l"
] | [
" x ∈ l",
" x ∈ x :: l'",
" x ∈ y :: l'",
" l ≠ [y]",
" x :: l' ≠ [y]",
" z :: l' ≠ [y]",
" x ∈+ y :: l ↔ y = x ∧ x ∈ l ∨ x ∈+ l",
" y = x ∧ x ∈ l ∨ x ∈+ l",
" x = x ∧ x ∈ l ∨ x ∈+ l",
" x ∈+ y :: l",
" x ∈+ x :: l",
" x ∈+ l"
] |
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.Probability.Independence.Basic
#align_import probability.integration from "leanprover-community/mathlib"@"2f8347015b12b0864dfaf366ec4909eb70c78740"
noncomputable section
open Set MeasureTheory
open scoped ENNReal MeasureTheory
variable {Ω : Type*... | Mathlib/Probability/Integration.lean | 82 | 104 | theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
{Mf Mg mΩ : MeasurableSpace Ω} {μ : Measure Ω} (hMf : Mf ≤ mΩ) (hMg : Mg ≤ mΩ)
(h_ind : Indep Mf Mg μ) (h_meas_f : Measurable[Mf] f) (h_meas_g : Measurable[Mg] g) :
∫⁻ ω, f ω * g ω ∂μ = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ := by |
revert g
have h_measM_f : Measurable f := h_meas_f.mono hMf le_rfl
apply @Measurable.ennreal_induction _ Mg
· intro c s h_s
apply lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator hMf _ (hMg _ h_s) _ h_meas_f
apply indepSets_of_indepSets_of_le_right h_ind
rwa [singleton_subset_iff]
· i... | [
" ∫⁻ (ω : Ω), f ω * T.indicator (fun x => c) ω ∂μ = (∫⁻ (ω : Ω), f ω ∂μ) * ∫⁻ (ω : Ω), T.indicator (fun x => c) ω ∂μ",
" ∀ {f : Ω → ℝ≥0∞},\n Measurable f →\n ∫⁻ (ω : Ω), f ω * T.indicator (fun x => c) ω ∂μ = (∫⁻ (ω : Ω), f ω ∂μ) * ∫⁻ (ω : Ω), T.indicator (fun x => c) ω ∂μ",
" ∀ (c_1 : ℝ≥0∞) ⦃s : Set Ω⦄,... | [
" ∫⁻ (ω : Ω), f ω * T.indicator (fun x => c) ω ∂μ = (∫⁻ (ω : Ω), f ω ∂μ) * ∫⁻ (ω : Ω), T.indicator (fun x => c) ω ∂μ",
" ∀ {f : Ω → ℝ≥0∞},\n Measurable f →\n ∫⁻ (ω : Ω), f ω * T.indicator (fun x => c) ω ∂μ = (∫⁻ (ω : Ω), f ω ∂μ) * ∫⁻ (ω : Ω), T.indicator (fun x => c) ω ∂μ",
" ∀ (c_1 : ℝ≥0∞) ⦃s : Set Ω⦄,... |
import Mathlib.Data.List.Sort
import Mathlib.Data.Multiset.Basic
#align_import data.multiset.sort from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab"
namespace Multiset
open List
variable {α : Type*}
section sort
variable (r : α → α → Prop) [DecidableRel r] [IsTrans α r] [IsAntisymm... | Mathlib/Data/Multiset/Sort.lean | 50 | 50 | theorem mem_sort {s : Multiset α} {a : α} : a ∈ sort r s ↔ a ∈ s := by | rw [← mem_coe, sort_eq]
| [
" a ∈ sort r s ↔ a ∈ s"
] | [] |
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 | 85 | 89 | theorem Multiset.trop_inf [LinearOrder R] [OrderTop R] (s : Multiset R) :
trop s.inf = Multiset.sum (s.map trop) := by |
induction' s using Multiset.induction with s x IH
· simp
· simp [← IH]
| [
" 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",
" ... | [
" 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.Probability.Notation
import Mathlib.Probability.Process.Stopping
#align_import probability.martingale.basic from "leanprover-community/mathlib"@"ba074af83b6cf54c3104e59402b39410ddbd6dca"
open TopologicalSpace Filter
open scoped NNReal ENNReal MeasureTheory ProbabilityTheory
namespace MeasureTheor... | Mathlib/Probability/Martingale/Basic.lean | 128 | 129 | theorem sub (hf : Martingale f ℱ μ) (hg : Martingale g ℱ μ) : Martingale (f - g) ℱ μ := by |
rw [sub_eq_add_neg]; exact hf.add hg.neg
| [
" μ[(fun x_1 x_2 => x) j|↑ℱ i] =ᶠ[ae μ] (fun x_1 x_2 => x) i",
" Martingale (fun x => f) ℱ μ",
" μ[(fun x => f) j|↑ℱ i] =ᶠ[ae μ] (fun x => f) i",
" μ[0 j|↑ℱ i] =ᶠ[ae μ] 0 i",
" 0 =ᶠ[ae μ] 0 i",
" ∫ (ω : Ω) in s, f i ω ∂μ = ∫ (ω : Ω) in s, f j ω ∂μ",
" ∫ (ω : Ω) in s, f i ω ∂μ = ∫ (x : Ω) in s, (μ[f j|↑ℱ... | [
" μ[(fun x_1 x_2 => x) j|↑ℱ i] =ᶠ[ae μ] (fun x_1 x_2 => x) i",
" Martingale (fun x => f) ℱ μ",
" μ[(fun x => f) j|↑ℱ i] =ᶠ[ae μ] (fun x => f) i",
" μ[0 j|↑ℱ i] =ᶠ[ae μ] 0 i",
" 0 =ᶠ[ae μ] 0 i",
" ∫ (ω : Ω) in s, f i ω ∂μ = ∫ (ω : Ω) in s, f j ω ∂μ",
" ∫ (ω : Ω) in s, f i ω ∂μ = ∫ (x : Ω) in s, (μ[f j|↑ℱ... |
import Mathlib.Analysis.SpecialFunctions.Complex.Log
import Mathlib.RingTheory.RootsOfUnity.Basic
#align_import ring_theory.roots_of_unity.complex from "leanprover-community/mathlib"@"7fdeecc0d03cd40f7a165e6cf00a4d2286db599f"
namespace Complex
open Polynomial Real
open scoped Nat Real
theorem isPrimitiveRoot_e... | Mathlib/RingTheory/RootsOfUnity/Complex.lean | 96 | 99 | theorem card_primitiveRoots (k : ℕ) : (primitiveRoots k ℂ).card = φ k := by |
by_cases h : k = 0
· simp [h]
exact (isPrimitiveRoot_exp k h).card_primitiveRoots
| [
" IsPrimitiveRoot (cexp (2 * ↑π * I * (↑i / ↑n))) n",
" cexp (2 * ↑π * I * (↑i / ↑n)) ^ n = 1 ∧ ∀ (l : ℕ), cexp (2 * ↑π * I * (↑i / ↑n)) ^ l = 1 → n ∣ l",
" (∃ n_1, ↑n * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) ∧\n ∀ (l : ℕ), (∃ n_1, ↑l * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) → n ∣ l",
" ∃... | [
" IsPrimitiveRoot (cexp (2 * ↑π * I * (↑i / ↑n))) n",
" cexp (2 * ↑π * I * (↑i / ↑n)) ^ n = 1 ∧ ∀ (l : ℕ), cexp (2 * ↑π * I * (↑i / ↑n)) ^ l = 1 → n ∣ l",
" (∃ n_1, ↑n * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) ∧\n ∀ (l : ℕ), (∃ n_1, ↑l * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) → n ∣ l",
" ∃... |
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic
import Mathlib.NumberTheory.GaussSum
#align_import number_theory.legendre_symbol.quadratic_char.gauss_sum from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
section SpecialValues
open ZMod MulChar
variable {F : Type*} ... | Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/GaussSum.lean | 97 | 115 | theorem quadraticChar_card_card [DecidableEq F] (hF : ringChar F ≠ 2) {F' : Type*} [Field F']
[Fintype F'] [DecidableEq F'] (hF' : ringChar F' ≠ 2) (h : ringChar F' ≠ ringChar F) :
quadraticChar F (Fintype.card F') =
quadraticChar F' (quadraticChar F (-1) * Fintype.card F) := by |
let χ := (quadraticChar F).ringHomComp (algebraMap ℤ F')
have hχ₁ : χ.IsNontrivial := by
obtain ⟨a, ha⟩ := quadraticChar_exists_neg_one hF
have hu : IsUnit a := by
contrapose ha
exact ne_of_eq_of_ne (map_nonunit (quadraticChar F) ha) (mt zero_eq_neg.mp one_ne_zero)
use hu.unit
simp only... | [
" IsSquare 2 ↔ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5",
" Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5",
" (if Fintype.card F % 2 = 0 then 0 else if Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 7 then 1 else -1) = 1 ↔\n Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5",
" -1 ≠ 1",
" Fintype.c... | [
" IsSquare 2 ↔ Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5",
" Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5",
" (if Fintype.card F % 2 = 0 then 0 else if Fintype.card F % 8 = 1 ∨ Fintype.card F % 8 = 7 then 1 else -1) = 1 ↔\n Fintype.card F % 8 ≠ 3 ∧ Fintype.card F % 8 ≠ 5",
" -1 ≠ 1",
" Fintype.c... |
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.MeasureTheory.Measure.MeasureSpaceDef
#align_import measure_theory.function.ae_measurable_sequence from "leanprover-community/mathlib"@"d003c55042c3cd08aefd1ae9a42ef89441cdaaf3"
open MeasureTheory
open scoped Classical
variable {ι : Sort*} {α β γ... | Mathlib/MeasureTheory/Function/AEMeasurableSequence.lean | 59 | 61 | theorem aeSeq_eq_mk_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α}
(hx : x ∈ aeSeqSet hf p) (i : ι) : aeSeq hf p i x = (hf i).mk (f i) x := by |
simp only [aeSeq, hx, if_true]
| [
" aeSeqSet hf p ⊆ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}ᶜ ⊆\n toMeasurable μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x) ∧ p x fun n => f n x}ᶜ",
" x ∈ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" aeSeq hf p i x = AEMeasur... | [
" aeSeqSet hf p ⊆ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}ᶜ ⊆\n toMeasurable μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x) ∧ p x fun n => f n x}ᶜ",
" x ∈ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}"
] |
import Mathlib.Data.Vector.Basic
#align_import data.vector.mem from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
namespace Vector
variable {α β : Type*} {n : ℕ} (a a' : α)
@[simp]
theorem get_mem (i : Fin n) (v : Vector α n) : v.get i ∈ v.toList := by
rw [get_eq_get]
exact List.... | Mathlib/Data/Vector/Mem.lean | 76 | 78 | theorem mem_map_iff (b : β) (v : Vector α n) (f : α → β) :
b ∈ (v.map f).toList ↔ ∃ a : α, a ∈ v.toList ∧ f a = b := by |
rw [Vector.toList_map, List.mem_map]
| [
" v.get i ∈ v.toList",
" v.toList.get (Fin.cast ⋯ i) ∈ v.toList",
" a ∈ v.toList ↔ ∃ i, v.get i = a",
" (∃ i, ∃ (h : i < v.toList.length), v.toList.get ⟨i, h⟩ = a) ↔ ∃ i, ∃ (h : i < n), v.toList.get (Fin.cast ⋯ ⟨i, h⟩) = a",
" i < n",
" i < v.toList.length",
" a ∉ nil.toList",
" a ∉ toList ⟨[], ⋯⟩",
... | [
" v.get i ∈ v.toList",
" v.toList.get (Fin.cast ⋯ i) ∈ v.toList",
" a ∈ v.toList ↔ ∃ i, v.get i = a",
" (∃ i, ∃ (h : i < v.toList.length), v.toList.get ⟨i, h⟩ = a) ↔ ∃ i, ∃ (h : i < n), v.toList.get (Fin.cast ⋯ ⟨i, h⟩) = a",
" i < n",
" i < v.toList.length",
" a ∉ nil.toList",
" a ∉ toList ⟨[], ⋯⟩",
... |
import Mathlib.Analysis.InnerProductSpace.TwoDim
import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic
#align_import geometry.euclidean.angle.oriented.basic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
noncomputable section
open FiniteDimensional Complex
open scoped Real Rea... | Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean | 58 | 63 | theorem continuousAt_oangle {x : V × V} (hx1 : x.1 ≠ 0) (hx2 : x.2 ≠ 0) :
ContinuousAt (fun y : V × V => o.oangle y.1 y.2) x := by |
refine (Complex.continuousAt_arg_coe_angle ?_).comp ?_
· exact o.kahler_ne_zero hx1 hx2
exact ((continuous_ofReal.comp continuous_inner).add
((continuous_ofReal.comp o.areaForm'.continuous₂).mul continuous_const)).continuousAt
| [
" ContinuousAt (fun y => o.oangle y.1 y.2) x",
" (o.kahler x.1) x.2 ≠ 0",
" ContinuousAt (fun y => (o.kahler y.1) y.2) x"
] | [] |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Bisim
variable {xs : Vector α n}
| Mathlib/Data/Vector/MapLemmas.lean | 173 | 183 | theorem mapAccumr_bisim {f₁ : α → σ₁ → σ₁ × β} {f₂ : α → σ₂ → σ₂ × β} {s₁ : σ₁} {s₂ : σ₂}
(R : σ₁ → σ₂ → Prop) (h₀ : R s₁ s₂)
(hR : ∀ {s q} a, R s q → R (f₁ a s).1 (f₂ a q).1 ∧ (f₁ a s).2 = (f₂ a q).2) :
R (mapAccumr f₁ xs s₁).fst (mapAccumr f₂ xs s₂).fst
∧ (mapAccumr f₁ xs s₁).snd = (mapAccumr f₂ xs s₂... |
induction xs using Vector.revInductionOn generalizing s₁ s₂
next => exact ⟨h₀, rfl⟩
next xs x ih =>
rcases (hR x h₀) with ⟨hR, _⟩
simp only [mapAccumr_snoc, ih hR, true_and]
congr 1
| [
" R (mapAccumr f₁ xs s₁).1 (mapAccumr f₂ xs s₂).1 ∧ (mapAccumr f₁ xs s₁).2 = (mapAccumr f₂ xs s₂).2",
" R (mapAccumr f₁ (xs✝.snoc x✝) s₁).1 (mapAccumr f₂ (xs✝.snoc x✝) s₂).1 ∧\n (mapAccumr f₁ (xs✝.snoc x✝) s₁).2 = (mapAccumr f₂ (xs✝.snoc x✝) s₂).2",
" R (mapAccumr f₁ nil s₁).1 (mapAccumr f₂ nil s₂).1 ∧ (mapA... | [] |
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 | 504 | 508 | theorem mem_nonZeroDivisors_of_leadingCoeff {p : R[X]} (h : p.leadingCoeff ∈ R⁰) : p ∈ R[X]⁰ := by |
refine mem_nonZeroDivisors_iff.2 fun x hx ↦ leadingCoeff_eq_zero.1 ?_
by_contra hx'
rw [← mul_right_mem_nonZeroDivisors_eq_zero_iff h] at hx'
simp only [← leadingCoeff_mul' hx', hx, leadingCoeff_zero, not_true] at hx'
| [
" n ≤ rootMultiplicity a p ↔ (X - C a) ^ n ∣ p",
" (∀ m < n, ¬¬(X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p",
" (∀ m < n, (X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p",
" (X - C a) ^ n ∣ p",
" (X - C a) ^ 0 ∣ p",
" 1 ∣ p",
" (X - C a) ^ (n + 1) ∣ p",
" rootMultiplicity a p ≤ n ↔ ¬(X - C a) ^ (n + 1) ∣... | [
" n ≤ rootMultiplicity a p ↔ (X - C a) ^ n ∣ p",
" (∀ m < n, ¬¬(X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p",
" (∀ m < n, (X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p",
" (X - C a) ^ n ∣ p",
" (X - C a) ^ 0 ∣ p",
" 1 ∣ p",
" (X - C a) ^ (n + 1) ∣ p",
" rootMultiplicity a p ≤ n ↔ ¬(X - C a) ^ (n + 1) ∣... |
import Mathlib.Data.List.Basic
namespace List
variable {α β : Type*}
#align list.length_enum_from List.enumFrom_length
#align list.length_enum List.enum_length
@[simp]
theorem get?_enumFrom :
∀ n (l : List α) m, get? (enumFrom n l) m = (get? l m).map fun a => (n + m, a)
| n, [], m => rfl
| n, a :: l, 0 =... | Mathlib/Data/List/Enum.lean | 72 | 73 | theorem mk_mem_enum_iff_get? {i : ℕ} {x : α} {l : List α} : (i, x) ∈ enum l ↔ l.get? i = x := by |
simp [enum, mk_mem_enumFrom_iff_le_and_get?_sub]
| [
" Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)",
" (enumFrom n l)... | [
" Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)",
" (enumFrom n l)... |
import Mathlib.Algebra.Category.MonCat.Limits
import Mathlib.CategoryTheory.Limits.Preserves.Filtered
import Mathlib.CategoryTheory.ConcreteCategory.Elementwise
import Mathlib.CategoryTheory.Limits.TypesFiltered
#align_import algebra.category.Mon.filtered_colimits from "leanprover-community/mathlib"@"70fd9563a21e7b96... | Mathlib/Algebra/Category/MonCat/FilteredColimits.lean | 95 | 98 | theorem colimit_one_eq (j : J) : (1 : M.{v, u} F) = M.mk F ⟨j, 1⟩ := by |
apply M.mk_eq
refine ⟨max' _ j, IsFiltered.leftToMax _ j, IsFiltered.rightToMax _ j, ?_⟩
simp
| [
" 1 = M.mk F ⟨j, 1⟩",
" ∃ k f g, (F.map f) ⟨⋯.some, 1⟩.snd = (F.map g) ⟨j, 1⟩.snd",
" (F.map (IsFiltered.leftToMax ⟨⋯.some, 1⟩.fst j)) ⟨⋯.some, 1⟩.snd =\n (F.map (IsFiltered.rightToMax ⟨⋯.some, 1⟩.fst j)) ⟨j, 1⟩.snd"
] | [] |
import Mathlib.Algebra.Group.Commute.Basic
import Mathlib.GroupTheory.GroupAction.Basic
import Mathlib.Dynamics.PeriodicPts
import Mathlib.Data.Set.Pointwise.SMul
namespace MulAction
open Pointwise
variable {α : Type*}
variable {G : Type*} [Group G] [MulAction G α]
variable {M : Type*} [Monoid M] [MulAction M α]
... | Mathlib/GroupTheory/GroupAction/FixedPoints.lean | 60 | 62 | theorem fixedBy_inv (g : G) : fixedBy α g⁻¹ = fixedBy α g := by |
ext
rw [mem_fixedBy, mem_fixedBy, inv_smul_eq_iff, eq_comm]
| [
" fixedBy α g⁻¹ = fixedBy α g",
" x✝ ∈ fixedBy α g⁻¹ ↔ x✝ ∈ fixedBy α g"
] | [] |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Algebra.MvPolynomial.Variables
import Mathlib.Algebra.MvPolynomial.CommRing
import Mathlib.Algebra.MvPolynomial.Expand
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.ZMod.Basic
#align_import ring_theory.witt_vector.witt_polynomial from "leanprover-c... | Mathlib/RingTheory/WittVector/WittPolynomial.lean | 141 | 143 | theorem wittPolynomial_one : wittPolynomial p R 1 = C (p : R) * X 1 + X 0 ^ p := by |
simp only [wittPolynomial_eq_sum_C_mul_X_pow, sum_range_succ_comm, range_one, sum_singleton,
one_mul, pow_one, C_1, pow_zero, tsub_self, tsub_zero]
| [
" wittPolynomial p R n = ∑ i ∈ range (n + 1), C (↑p ^ i) * X i ^ p ^ (n - i)",
" ∀ x ∈ range (n + 1), (monomial (single x (p ^ (n - x)))) (↑p ^ x) = C (↑p ^ x) * X x ^ p ^ (n - x)",
" (monomial (single i (p ^ (n - i)))) (↑p ^ i) = C (↑p ^ i) * X i ^ p ^ (n - i)",
" X i ^ 0 = 1",
" (map f) (W_ R n) = W_ S n"... | [
" wittPolynomial p R n = ∑ i ∈ range (n + 1), C (↑p ^ i) * X i ^ p ^ (n - i)",
" ∀ x ∈ range (n + 1), (monomial (single x (p ^ (n - x)))) (↑p ^ x) = C (↑p ^ x) * X x ^ p ^ (n - x)",
" (monomial (single i (p ^ (n - i)))) (↑p ^ i) = C (↑p ^ i) * X i ^ p ^ (n - i)",
" X i ^ 0 = 1",
" (map f) (W_ R n) = W_ S n"... |
import Mathlib.Probability.ProbabilityMassFunction.Constructions
import Mathlib.Tactic.FinCases
namespace PMF
open ENNReal
noncomputable
def binomial (p : ℝ≥0∞) (h : p ≤ 1) (n : ℕ) : PMF (Fin (n + 1)) :=
.ofFintype (fun i => p^(i : ℕ) * (1-p)^((Fin.last n - i) : ℕ) * (n.choose i : ℕ)) (by
convert (add_pow ... | Mathlib/Probability/ProbabilityMassFunction/Binomial.lean | 49 | 50 | theorem binomial_apply_self (p : ℝ≥0∞) (h : p ≤ 1) (n : ℕ) :
binomial p h n n = p^n := by | simp
| [
" ∑ a : Fin (n + 1), (fun i => p ^ ↑i * (1 - p) ^ (↑(Fin.last n) - ↑i) * ↑(n.choose ↑i)) a = 1",
" ∑ a : Fin (n + 1), (fun i => p ^ ↑i * (1 - p) ^ (↑(Fin.last n) - ↑i) * ↑(n.choose ↑i)) a =\n ∑ m ∈ Finset.range (n + 1), p ^ m * (1 - p) ^ (n - m) * ↑(n.choose m)",
" (∑ i ∈ Finset.range (n + 1),\n if h : ... | [
" ∑ a : Fin (n + 1), (fun i => p ^ ↑i * (1 - p) ^ (↑(Fin.last n) - ↑i) * ↑(n.choose ↑i)) a = 1",
" ∑ a : Fin (n + 1), (fun i => p ^ ↑i * (1 - p) ^ (↑(Fin.last n) - ↑i) * ↑(n.choose ↑i)) a =\n ∑ m ∈ Finset.range (n + 1), p ^ m * (1 - p) ^ (n - m) * ↑(n.choose m)",
" (∑ i ∈ Finset.range (n + 1),\n if h : ... |
import Mathlib.Control.Monad.Basic
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.List.ProdSigma
#align_import data.fin_enum from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
universe u v
open Finset
class FinEnum (α : Sort*) where
card : ℕ
equiv : α ≃ Fin card
[... | Mathlib/Data/FinEnum.lean | 74 | 75 | theorem nodup_toList [FinEnum α] : List.Nodup (toList α) := by |
simp [toList]; apply List.Nodup.map <;> [apply Equiv.injective; apply List.nodup_finRange]
| [
" List.indexOf x xs < xs.length",
" x ∈ xs",
" xs.get ((fun x => ⟨List.indexOf x xs, ⋯⟩) x) = x",
" (fun x => ⟨List.indexOf x xs, ⋯⟩) (xs.get i) = i",
" ↑((fun x => ⟨List.indexOf x xs, ⋯⟩) (xs.get i)) = ↑i",
" ∀ (x : α), x ∈ xs.dedup",
" x ∈ toList α",
" ∃ a, equiv.symm a = x",
" equiv.symm (equiv x... | [
" List.indexOf x xs < xs.length",
" x ∈ xs",
" xs.get ((fun x => ⟨List.indexOf x xs, ⋯⟩) x) = x",
" (fun x => ⟨List.indexOf x xs, ⋯⟩) (xs.get i) = i",
" ↑((fun x => ⟨List.indexOf x xs, ⋯⟩) (xs.get i)) = ↑i",
" ∀ (x : α), x ∈ xs.dedup",
" x ∈ toList α",
" ∃ a, equiv.symm a = x",
" equiv.symm (equiv x... |
import Batteries.Tactic.SeqFocus
import Batteries.Data.List.Lemmas
import Batteries.Data.List.Init.Attach
namespace Std.Range
def numElems (r : Range) : Nat :=
if r.step = 0 then
-- This is a very weird choice, but it is chosen to coincide with the `forIn` impl
if r.stop ≤ r.start then 0 else r.stop
els... | .lake/packages/batteries/Batteries/Data/Range/Lemmas.lean | 26 | 27 | theorem numElems_step_1 (start stop) : numElems ⟨start, stop, 1⟩ = stop - start := by |
simp [numElems]
| [
" { start := start, stop := stop, step := step }.numElems = 0",
" (if step = 0 then if stop ≤ start then 0 else stop else (stop - start + step - 1) / step) = 0",
" 0 = 0",
" (stop - start + step - 1) / step = 0",
" stop - start + step - 1 < step",
" step - 1 < step",
" { start := start, stop := stop, st... | [
" { start := start, stop := stop, step := step }.numElems = 0",
" (if step = 0 then if stop ≤ start then 0 else stop else (stop - start + step - 1) / step) = 0",
" 0 = 0",
" (stop - start + step - 1) / step = 0",
" stop - start + step - 1 < step",
" step - 1 < step"
] |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
se... | Mathlib/Analysis/Complex/RealDeriv.lean | 128 | 130 | theorem HasDerivWithinAt.complexToReal_fderiv {f : ℂ → ℂ} {s : Set ℂ} {f' x : ℂ}
(h : HasDerivWithinAt f f' s x) : HasFDerivWithinAt f (f' • (1 : ℂ →L[ℝ] ℂ)) s x := by |
simpa only [Complex.restrictScalars_one_smulRight] using h.hasFDerivWithinAt.restrictScalars ℝ
| [
" HasStrictDerivAt (fun x => (e ↑x).re) e'.re z",
" e'.re = (reCLM.comp ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')).comp ofRealCLM)) 1",
" e'.re = reCLM ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (ofRealCLM 1))",
" HasDerivAt (fun x => (e ↑x... | [
" HasStrictDerivAt (fun x => (e ↑x).re) e'.re z",
" e'.re = (reCLM.comp ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')).comp ofRealCLM)) 1",
" e'.re = reCLM ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (ofRealCLM 1))",
" HasDerivAt (fun x => (e ↑x... |
import Mathlib.Algebra.Polynomial.Expand
import Mathlib.Algebra.Polynomial.Splits
import Mathlib.Algebra.Squarefree.Basic
import Mathlib.FieldTheory.Minpoly.Field
import Mathlib.RingTheory.PowerBasis
#align_import field_theory.separable from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
... | Mathlib/FieldTheory/Separable.lean | 70 | 72 | theorem separable_X_add_C (a : R) : (X + C a).Separable := by |
rw [separable_def, derivative_add, derivative_X, derivative_C, add_zero]
exact isCoprime_one_right
| [
" ¬Separable 0",
" False",
" f.Separable",
" (X + C a).Separable",
" IsCoprime (X + C a) 1"
] | [
" ¬Separable 0",
" False",
" f.Separable"
] |
import Mathlib.MeasureTheory.Constructions.Pi
import Mathlib.MeasureTheory.Constructions.Prod.Integral
open Fintype MeasureTheory MeasureTheory.Measure
variable {𝕜 : Type*} [RCLike 𝕜]
namespace MeasureTheory
theorem Integrable.fin_nat_prod {n : ℕ} {E : Fin n → Type*}
[∀ i, MeasureSpace (E i)] [∀ i, SigmaF... | Mathlib/MeasureTheory/Integral/Pi.lean | 45 | 54 | theorem Integrable.fintype_prod_dep {ι : Type*} [Fintype ι] {E : ι → Type*}
{f : (i : ι) → E i → 𝕜} [∀ i, MeasureSpace (E i)] [∀ i, SigmaFinite (volume : Measure (E i))]
(hf : ∀ i, Integrable (f i)) :
Integrable (fun (x : (i : ι) → E i) ↦ ∏ i, f i (x i)) := by |
let e := (equivFin ι).symm
simp_rw [← (volume_measurePreserving_piCongrLeft _ e).integrable_comp_emb
(MeasurableEquiv.measurableEmbedding _),
← e.prod_comp, MeasurableEquiv.coe_piCongrLeft, Function.comp_def,
Equiv.piCongrLeft_apply_apply]
exact .fin_nat_prod (fun i ↦ hf _)
| [
" Integrable (fun x => ∏ i : Fin n, f i (x i)) volume",
" Integrable (fun x => ∏ i : Fin 0, f i (x i)) volume",
" Integrable (fun x => ∏ i : Fin (n + 1), f i (x i)) volume",
" Integrable ((fun x => ∏ i : Fin (n + 1), f i (x i)) ∘ ⇑(MeasurableEquiv.piFinSuccAbove (fun i => E i) 0).symm)\n (volume.prod (Meas... | [
" Integrable (fun x => ∏ i : Fin n, f i (x i)) volume",
" Integrable (fun x => ∏ i : Fin 0, f i (x i)) volume",
" Integrable (fun x => ∏ i : Fin (n + 1), f i (x i)) volume",
" Integrable ((fun x => ∏ i : Fin (n + 1), f i (x i)) ∘ ⇑(MeasurableEquiv.piFinSuccAbove (fun i => E i) 0).symm)\n (volume.prod (Meas... |
import Mathlib.MeasureTheory.Measure.VectorMeasure
import Mathlib.MeasureTheory.Function.AEEqOfIntegral
#align_import measure_theory.measure.with_density_vector_measure from "leanprover-community/mathlib"@"d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1"
noncomputable section
open scoped Classical MeasureTheory NNReal ... | Mathlib/MeasureTheory/Measure/WithDensityVectorMeasure.lean | 84 | 92 | theorem withDensityᵥ_add (hf : Integrable f μ) (hg : Integrable g μ) :
μ.withDensityᵥ (f + g) = μ.withDensityᵥ f + μ.withDensityᵥ g := by |
ext1 i hi
rw [withDensityᵥ_apply (hf.add hg) hi, VectorMeasure.add_apply, withDensityᵥ_apply hf hi,
withDensityᵥ_apply hg hi]
simp_rw [Pi.add_apply]
rw [integral_add] <;> rw [← integrableOn_univ]
· exact hf.integrableOn.restrict MeasurableSet.univ
· exact hg.integrableOn.restrict MeasurableSet.univ
| [
" (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) ∅ = 0",
" HasSum (fun i => (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (s i))\n ((fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (⋃ i, s i))",
" HasSum (fun i => if MeasurableSet (s i) then ∫ (x : α) in s... | [
" (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) ∅ = 0",
" HasSum (fun i => (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (s i))\n ((fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (⋃ i, s i))",
" HasSum (fun i => if MeasurableSet (s i) then ∫ (x : α) in s... |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.function.ae_measurable_order from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open MeasureTheory Set TopologicalSpace
open scoped Classical
open ENNReal NNReal
theorem MeasureTheory.aemeasurab... | Mathlib/MeasureTheory/Function/AEMeasurableOrder.lean | 113 | 127 | theorem ENNReal.aemeasurable_of_exist_almost_disjoint_supersets {α : Type*} {m : MeasurableSpace α}
(μ : Measure α) (f : α → ℝ≥0∞)
(h : ∀ (p : ℝ≥0) (q : ℝ≥0), p < q →
∃ u v, MeasurableSet u ∧ MeasurableSet v ∧
{ x | f x < p } ⊆ u ∧ { x | (q : ℝ≥0∞) < f x } ⊆ v ∧ μ (u ∩ v) = 0) :
AEMeasurable f... |
obtain ⟨s, s_count, s_dense, _, s_top⟩ :
∃ s : Set ℝ≥0∞, s.Countable ∧ Dense s ∧ 0 ∉ s ∧ ∞ ∉ s :=
ENNReal.exists_countable_dense_no_zero_top
have I : ∀ x ∈ s, x ≠ ∞ := fun x xs hx => s_top (hx ▸ xs)
apply MeasureTheory.aemeasurable_of_exist_almost_disjoint_supersets μ s s_count s_dense _
rintro p hp q ... | [
" AEMeasurable f μ",
" ∀ (p q : β),\n ∃ u v,\n MeasurableSet u ∧\n MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → μ (u ∩ v) = 0)",
" ∃ u v,\n MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → μ (u ∩ v) = 0)"... | [
" AEMeasurable f μ",
" ∀ (p q : β),\n ∃ u v,\n MeasurableSet u ∧\n MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → μ (u ∩ v) = 0)",
" ∃ u v,\n MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → μ (u ∩ v) = 0)"... |
import Mathlib.Analysis.InnerProductSpace.Orthogonal
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import geometry.euclidean.basic from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0"
open Set
open scoped RealInnerProductSpace
variable {V P : Type*} [NormedAddCommGroup V] [InnerP... | Mathlib/Geometry/Euclidean/PerpBisector.lean | 86 | 90 | theorem mem_perpBisector_iff_inner_eq :
c ∈ perpBisector p₁ p₂ ↔ ⟪c -ᵥ p₁, p₂ -ᵥ p₁⟫ = (dist p₁ p₂) ^ 2 / 2 := by |
rw [mem_perpBisector_iff_inner_eq_zero, ← vsub_sub_vsub_cancel_right _ _ p₁, inner_sub_left,
sub_eq_zero, midpoint_vsub_left, invOf_eq_inv, real_inner_smul_left, real_inner_self_eq_norm_sq,
dist_eq_norm_vsub' V, div_eq_inv_mul]
| [
" c ∈ perpBisector p₁ p₂ ↔ ⟪(Equiv.pointReflection c) p₁ -ᵥ p₂, p₂ -ᵥ p₁⟫_ℝ = 0",
" 2⁻¹ * ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0 ↔ ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0",
" c ∈ perpBisector p₁ ((Equiv.pointReflection p₂) p₁) ↔ ⟪c -ᵥ p₂, p₁ -ᵥ p₂⟫_ℝ = 0",
" midpoint ℝ p₁ p₂ ∈ perpBisector p₁ p₂",
" (perpBisec... | [
" c ∈ perpBisector p₁ p₂ ↔ ⟪(Equiv.pointReflection c) p₁ -ᵥ p₂, p₂ -ᵥ p₁⟫_ℝ = 0",
" 2⁻¹ * ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0 ↔ ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0",
" c ∈ perpBisector p₁ ((Equiv.pointReflection p₂) p₁) ↔ ⟪c -ᵥ p₂, p₁ -ᵥ p₂⟫_ℝ = 0",
" midpoint ℝ p₁ p₂ ∈ perpBisector p₁ p₂",
" (perpBisec... |
import Mathlib.CategoryTheory.Sites.Pretopology
import Mathlib.CategoryTheory.Sites.IsSheafFor
#align_import category_theory.sites.sheaf_of_types from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe w v u
namespace CategoryTheory
open Opposite CategoryTheory Category Limits Si... | Mathlib/CategoryTheory/Sites/SheafOfTypes.lean | 105 | 118 | theorem isSheaf_pretopology [HasPullbacks C] (K : Pretopology C) :
IsSheaf (K.toGrothendieck C) P ↔ ∀ {X : C} (R : Presieve X), R ∈ K X → IsSheafFor P R := by |
constructor
· intro PJ X R hR
rw [isSheafFor_iff_generate]
apply PJ (Sieve.generate R) ⟨_, hR, le_generate R⟩
· rintro PK X S ⟨R, hR, RS⟩
have gRS : ⇑(generate R) ≤ S := by
apply giGenerate.gc.monotone_u
rwa [sets_iff_generate]
apply isSheafFor_subsieve P gRS _
intro Y f
rw [←... | [
" IsSheaf (Pretopology.toGrothendieck C K) P ↔ ∀ {X : C}, ∀ R ∈ K.coverings X, IsSheafFor P R",
" IsSheaf (Pretopology.toGrothendieck C K) P → ∀ {X : C}, ∀ R ∈ K.coverings X, IsSheafFor P R",
" IsSheafFor P R",
" IsSheafFor P (generate R).arrows",
" (∀ {X : C}, ∀ R ∈ K.coverings X, IsSheafFor P R) → IsSheaf... | [] |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.BigOperators
import Mathlib.LinearAlgebra.AffineSpace.AffineMap
import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.Tactic.FinCases
#align_import linear_algebra.affine_space.combination from ... | Mathlib/LinearAlgebra/AffineSpace/Combination.lean | 72 | 74 | theorem weightedVSubOfPoint_apply (w : ι → k) (p : ι → P) (b : P) :
s.weightedVSubOfPoint p b w = ∑ i ∈ s, w i • (p i -ᵥ b) := by |
simp [weightedVSubOfPoint, LinearMap.sum_apply]
| [
" univ = {0, 1}",
" x ∈ univ ↔ x ∈ {0, 1}",
" ⟨0, ⋯⟩ ∈ univ ↔ ⟨0, ⋯⟩ ∈ {0, 1}",
" ⟨1, ⋯⟩ ∈ univ ↔ ⟨1, ⋯⟩ ∈ {0, 1}",
" (s.weightedVSubOfPoint p b) w = ∑ i ∈ s, w i • (p i -ᵥ b)"
] | [
" univ = {0, 1}",
" x ∈ univ ↔ x ∈ {0, 1}",
" ⟨0, ⋯⟩ ∈ univ ↔ ⟨0, ⋯⟩ ∈ {0, 1}",
" ⟨1, ⋯⟩ ∈ univ ↔ ⟨1, ⋯⟩ ∈ {0, 1}"
] |
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 | 133 | 134 | theorem edist_of_im_eq {z w : ℂ} (h : z.im = w.im) : edist z w = edist z.re w.re := by |
rw [edist_nndist, edist_nndist, nndist_of_im_eq h]
| [
" ‖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))",
" dist z w = dist z.im w.im",
" edist z w = edist z.im w.im",
" dist z w = dist z.re w.re",
... | [
" ‖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))",
" dist z w = dist z.im w.im",
" edist z w = edist z.im w.im",
" dist z w = dist z.re w.re"
] |
import Mathlib.Analysis.Complex.CauchyIntegral
import Mathlib.Analysis.NormedSpace.Completion
import Mathlib.Analysis.NormedSpace.Extr
import Mathlib.Topology.Order.ExtrClosure
#align_import analysis.complex.abs_max from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open TopologicalSpa... | Mathlib/Analysis/Complex/AbsMax.lean | 106 | 137 | theorem norm_max_aux₁ [CompleteSpace F] {f : ℂ → F} {z w : ℂ}
(hd : DiffContOnCl ℂ f (ball z (dist w z)))
(hz : IsMaxOn (norm ∘ f) (closedBall z (dist w z)) z) : ‖f w‖ = ‖f z‖ := by |
-- Consider a circle of radius `r = dist w z`.
set r : ℝ := dist w z
have hw : w ∈ closedBall z r := mem_closedBall.2 le_rfl
-- Assume the converse. Since `‖f w‖ ≤ ‖f z‖`, we have `‖f w‖ < ‖f z‖`.
refine (isMaxOn_iff.1 hz _ hw).antisymm (not_lt.1 ?_)
rintro hw_lt : ‖f w‖ < ‖f z‖
have hr : 0 < r := dist_p... | [
" ‖f w‖ = ‖f z‖",
" ¬(norm ∘ f) w < (norm ∘ f) z",
" False",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ = 2 * π * ‖f z‖",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * ‖f z‖",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * r * (‖f z‖ / r)",
" ContinuousOn (fun ζ => (ζ - z)⁻¹ • f ζ) (sphere z r... | [] |
import Mathlib.CategoryTheory.Limits.Types
import Mathlib.CategoryTheory.Limits.Shapes.Products
import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts
import Mathlib.CategoryTheory.Limits.Shapes.Terminal
import Mathlib.CategoryTheory.ConcreteCategory.Basic
import Mathlib.Tactic.CategoryTheory.Elementwise
import Ma... | Mathlib/CategoryTheory/Limits/Shapes/Types.lean | 82 | 84 | theorem pi_map_π_apply' {β : Type v} {f g : β → Type v} (α : ∀ j, f j ⟶ g j) (b : β) (x) :
(Pi.π g b : ∏ᶜ g → g b) (Pi.map α x) = α b ((Pi.π f b : ∏ᶜ f → f b) x) := by |
simp
| [
" Pi.π f b (Pi.lift s x) = s b x",
" Pi.π g b (Pi.map α x) = α b (Pi.π f b x)"
] | [
" Pi.π f b (Pi.lift s x) = s b x"
] |
import Mathlib.Data.Finset.Basic
variable {ι : Sort _} {π : ι → Sort _} {x : ∀ i, π i} [DecidableEq ι]
namespace Function
def updateFinset (x : ∀ i, π i) (s : Finset ι) (y : ∀ i : ↥s, π i) (i : ι) : π i :=
if hi : i ∈ s then y ⟨i, hi⟩ else x i
open Finset Equiv
theorem updateFinset_def {s : Finset ι} {y} :
... | Mathlib/Data/Finset/Update.lean | 52 | 63 | theorem updateFinset_updateFinset {s t : Finset ι} (hst : Disjoint s t)
{y : ∀ i : ↥s, π i} {z : ∀ i : ↥t, π i} :
updateFinset (updateFinset x s y) t z =
updateFinset x (s ∪ t) (Equiv.piFinsetUnion π hst ⟨y, z⟩) := by |
set e := Equiv.Finset.union s t hst
congr with i
by_cases his : i ∈ s <;> by_cases hit : i ∈ t <;>
simp only [updateFinset, his, hit, dif_pos, dif_neg, Finset.mem_union, true_or_iff,
false_or_iff, not_false_iff]
· exfalso; exact Finset.disjoint_left.mp hst his hit
· exact piCongrLeft_sum_inl (fun b... | [
" updateFinset x {i} y = update x i (y ⟨i, ⋯⟩)",
" updateFinset x {i} y j = update x i (y ⟨i, ⋯⟩) j",
" updateFinset x {i} y i = update x i (y ⟨i, ⋯⟩) i",
" update x i y = updateFinset x {i} (uniqueElim y)",
" update x i y j = updateFinset x {i} (uniqueElim y) j",
" update x i y i = updateFinset x {i} (un... | [
" updateFinset x {i} y = update x i (y ⟨i, ⋯⟩)",
" updateFinset x {i} y j = update x i (y ⟨i, ⋯⟩) j",
" updateFinset x {i} y i = update x i (y ⟨i, ⋯⟩) i",
" update x i y = updateFinset x {i} (uniqueElim y)",
" update x i y j = updateFinset x {i} (uniqueElim y) j",
" update x i y i = updateFinset x {i} (un... |
import Mathlib.Algebra.Module.Zlattice.Basic
import Mathlib.NumberTheory.NumberField.Embeddings
import Mathlib.NumberTheory.NumberField.FractionalIdeal
#align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30"
variable (K : Type*) [F... | Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean | 61 | 70 | theorem conj_apply {x : ((K →+* ℂ) → ℂ)} (φ : K →+* ℂ)
(hx : x ∈ Submodule.span ℝ (Set.range (canonicalEmbedding K))) :
conj (x φ) = x (ComplexEmbedding.conjugate φ) := by |
refine Submodule.span_induction hx ?_ ?_ (fun _ _ hx hy => ?_) (fun a _ hx => ?_)
· rintro _ ⟨x, rfl⟩
rw [apply_at, apply_at, ComplexEmbedding.conjugate_coe_eq]
· rw [Pi.zero_apply, Pi.zero_apply, map_zero]
· rw [Pi.add_apply, Pi.add_apply, map_add, hx, hy]
· rw [Pi.smul_apply, Complex.real_smul, map_mul... | [
" (starRingEnd ℂ) (x φ) = x (ComplexEmbedding.conjugate φ)",
" ∀ x ∈ Set.range ⇑(canonicalEmbedding K), (starRingEnd ℂ) (x φ) = x (ComplexEmbedding.conjugate φ)",
" (starRingEnd ℂ) ((canonicalEmbedding K) x φ) = (canonicalEmbedding K) x (ComplexEmbedding.conjugate φ)",
" (starRingEnd ℂ) (0 φ) = 0 (ComplexEmbe... | [] |
import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots
import Mathlib.NumberTheory.NumberField.Embeddings
universe u
namespace IsCyclotomicExtension.Rat
open NumberField InfinitePlace FiniteDimensional Complex Nat Polynomial
variable {n : ℕ+} (K : Type u) [Field K] [CharZero K]
| Mathlib/NumberTheory/Cyclotomic/Embeddings.lean | 30 | 35 | theorem nrRealPlaces_eq_zero [IsCyclotomicExtension {n} ℚ K]
(hn : 2 < n) :
haveI := IsCyclotomicExtension.numberField {n} ℚ K
NrRealPlaces K = 0 := by |
have := IsCyclotomicExtension.numberField {n} ℚ K
apply (IsCyclotomicExtension.zeta_spec n ℚ K).nrRealPlaces_eq_zero_of_two_lt hn
| [
" NrRealPlaces K = 0"
] | [] |
import Mathlib.Order.Interval.Finset.Nat
#align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
assert_not_exists MonoidWithZero
open Finset Fin Function
namespace Fin
variable (n : ℕ)
instance instLocallyFiniteOrder : LocallyFiniteOrder (Fin n) :=
Orde... | Mathlib/Order/Interval/Finset/Fin.lean | 109 | 110 | theorem card_Ico : (Ico a b).card = b - a := by |
rw [← Nat.card_Ico, ← map_valEmbedding_Ico, card_map]
| [
" map valEmbedding (Icc a b) = Icc ↑a ↑b",
" map valEmbedding (Ico a b) = Ico ↑a ↑b",
" map valEmbedding (Ioc a b) = Ioc ↑a ↑b",
" map valEmbedding (Ioo a b) = Ioo ↑a ↑b",
" (Icc a b).card = ↑b + 1 - ↑a",
" (Ico a b).card = ↑b - ↑a"
] | [
" map valEmbedding (Icc a b) = Icc ↑a ↑b",
" map valEmbedding (Ico a b) = Ico ↑a ↑b",
" map valEmbedding (Ioc a b) = Ioc ↑a ↑b",
" map valEmbedding (Ioo a b) = Ioo ↑a ↑b",
" (Icc a b).card = ↑b + 1 - ↑a"
] |
import Mathlib.Order.BooleanAlgebra
import Mathlib.Logic.Equiv.Basic
#align_import order.symm_diff from "leanprover-community/mathlib"@"6eb334bd8f3433d5b08ba156b8ec3e6af47e1904"
open Function OrderDual
variable {ι α β : Type*} {π : ι → Type*}
def symmDiff [Sup α] [SDiff α] (a b : α) : α :=
a \ b ⊔ b \ a
#ali... | Mathlib/Order/SymmDiff.lean | 248 | 248 | theorem bihimp_self : a ⇔ a = ⊤ := by | rw [bihimp, inf_idem, himp_self]
| [
" ∀ (p q : Bool), p ∆ q = xor p q",
" a ⇔ b = b ⇔ a",
" a ⇔ a = ⊤"
] | [
" ∀ (p q : Bool), p ∆ q = xor p q",
" a ⇔ b = b ⇔ a"
] |
import Mathlib.Data.Set.Finite
#align_import data.finset.preimage from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9abdddf3ffe"
assert_not_exists Finset.sum
open Set Function
universe u v w x
variable {α : Type u} {β : Type v} {ι : Sort w} {γ : Type x}
namespace Finset
section Preimage
nonc... | Mathlib/Data/Finset/Preimage.lean | 92 | 94 | theorem map_subset_iff_subset_preimage {f : α ↪ β} {s : Finset α} {t : Finset β} :
s.map f ⊆ t ↔ s ⊆ t.preimage f f.injective.injOn := by |
classical rw [map_eq_image, image_subset_iff_subset_preimage]
| [
" InjOn f (f ⁻¹' ↑∅)",
" ↑(∅.preimage f ⋯) = ↑∅",
" ↑(univ.preimage f hf) = ↑univ",
" ↑((s ∩ t).preimage f ⋯) = ↑(s.preimage f hs ∩ t.preimage f ht)",
" ↑((s ∪ t).preimage f hst) = ↑(s.preimage f ⋯ ∪ t.preimage f ⋯)",
" ↑(sᶜ.preimage f ⋯) = ↑(s.preimage f ⋯)ᶜ",
" ↑((map f s).preimage ⇑f ⋯) = ↑s",
" (∀... | [
" InjOn f (f ⁻¹' ↑∅)",
" ↑(∅.preimage f ⋯) = ↑∅",
" ↑(univ.preimage f hf) = ↑univ",
" ↑((s ∩ t).preimage f ⋯) = ↑(s.preimage f hs ∩ t.preimage f ht)",
" ↑((s ∪ t).preimage f hst) = ↑(s.preimage f ⋯ ∪ t.preimage f ⋯)",
" ↑(sᶜ.preimage f ⋯) = ↑(s.preimage f ⋯)ᶜ",
" ↑((map f s).preimage ⇑f ⋯) = ↑s",
" (∀... |
import Mathlib.Topology.StoneCech
import Mathlib.Topology.Algebra.Semigroup
import Mathlib.Data.Stream.Init
#align_import combinatorics.hindman from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
open Filter
@[to_additive
"Addition of ultrafilters given by `∀ᶠ m in U+V, p m ↔ ∀ᶠ... | Mathlib/Combinatorics/Hindman.lean | 138 | 165 | theorem exists_idempotent_ultrafilter_le_FP {M} [Semigroup M] (a : Stream' M) :
∃ U : Ultrafilter M, U * U = U ∧ ∀ᶠ m in U, m ∈ FP a := by |
let S : Set (Ultrafilter M) := ⋂ n, { U | ∀ᶠ m in U, m ∈ FP (a.drop n) }
have h := exists_idempotent_in_compact_subsemigroup ?_ S ?_ ?_ ?_
· rcases h with ⟨U, hU, U_idem⟩
refine ⟨U, U_idem, ?_⟩
convert Set.mem_iInter.mp hU 0
· exact Ultrafilter.continuous_mul_left
· apply IsCompact.nonempty_iInter_of... | [
" (∀ᶠ (x : M) in ↑(U * V * W), p x) ↔ ∀ᶠ (x : M) in ↑(U * (V * W)), p x",
" ∃ n, ∀ m' ∈ FP (Stream'.drop n a), m * m' ∈ FP a",
" ∃ n, ∀ m' ∈ FP (Stream'.drop n a), a.head * m' ∈ FP a",
" ∀ m' ∈ FP (Stream'.drop (n + 1) a), m * m' ∈ FP a",
" m * m' ∈ FP a",
" ∃ n, ∀ m' ∈ FP (Stream'.drop n a), a.head * m *... | [
" (∀ᶠ (x : M) in ↑(U * V * W), p x) ↔ ∀ᶠ (x : M) in ↑(U * (V * W)), p x",
" ∃ n, ∀ m' ∈ FP (Stream'.drop n a), m * m' ∈ FP a",
" ∃ n, ∀ m' ∈ FP (Stream'.drop n a), a.head * m' ∈ FP a",
" ∀ m' ∈ FP (Stream'.drop (n + 1) a), m * m' ∈ FP a",
" m * m' ∈ FP a",
" ∃ n, ∀ m' ∈ FP (Stream'.drop n a), a.head * m *... |
import Mathlib.Algebra.EuclideanDomain.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.Algebra.GCDMonoid.Nat
#align_import ring_theory.int.basic from "leanprover-community/mathlib"@"e655e4ea5c6d02854696f97494997ba4c31be802"
theorem Int.Prime.dvd_mul {m n : ℤ} {p : ℕ} (hp : Nat.Prime p) (h : (p ... | Mathlib/RingTheory/Int/Basic.lean | 105 | 108 | theorem Int.Prime.dvd_pow' {n : ℤ} {k p : ℕ} (hp : Nat.Prime p) (h : (p : ℤ) ∣ n ^ k) :
(p : ℤ) ∣ n := by |
rw [Int.natCast_dvd]
exact Int.Prime.dvd_pow hp h
| [
" p ∣ m.natAbs ∨ p ∣ n.natAbs",
" ↑p ∣ m ∨ ↑p ∣ n",
" p ∣ n.natAbs",
" ↑p ∣ n"
] | [
" p ∣ m.natAbs ∨ p ∣ n.natAbs",
" ↑p ∣ m ∨ ↑p ∣ n",
" p ∣ n.natAbs"
] |
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 | 56 | 72 | theorem volume_eq_stieltjes_id : (volume : Measure ℝ) = StieltjesFunction.id.measure := by |
haveI : IsAddLeftInvariant StieltjesFunction.id.measure :=
⟨fun a =>
Eq.symm <|
Real.measure_ext_Ioo_rat fun p q => by
simp only [Measure.map_apply (measurable_const_add a) measurableSet_Ioo,
sub_sub_sub_cancel_right, StieltjesFunction.measure_Ioo, StieltjesFunction.id_leftLim... | [
" volume = StieltjesFunction.id.measure",
" StieltjesFunction.id.measure (Ioo ↑p ↑q) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo ↑p ↑q)",
" StieltjesFunction.id.measure ↑(stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped = 1",
" StieltjesFunction.id.measure (parallelepiped ⇑(stdOrthonorma... | [] |
import Mathlib.Data.Multiset.Bind
import Mathlib.Control.Traversable.Lemmas
import Mathlib.Control.Traversable.Instances
#align_import data.multiset.functor from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58"
universe u
namespace Multiset
open List
instance functor : Functor Multiset... | Mathlib/Data/Multiset/Functor.lean | 119 | 126 | theorem map_traverse {G : Type* → Type _} [Applicative G] [CommApplicative G] {α β γ : Type _}
(g : α → G β) (h : β → γ) (x : Multiset α) :
Functor.map (Functor.map h) (traverse g x) = traverse (Functor.map h ∘ g) x := by |
refine Quotient.inductionOn x ?_
intro
simp only [traverse, quot_mk_to_coe, lift_coe, Function.comp_apply, Functor.map_map, map_comp_coe]
rw [LawfulFunctor.comp_map, Traversable.map_traverse']
rfl
| [
" ∀ {α : Type ?u.133} (x : Multiset α), id <$> x = x",
" ∀ {α β γ : Type ?u.133} (g : α → β) (h : β → γ) (x : Multiset α), (h ∘ g) <$> x = h <$> g <$> x",
" Multiset α' → F (Multiset β')",
" ∀ (a b : List α'),\n a ≈ b → (Functor.map Coe.coe ∘ Traversable.traverse f) a = (Functor.map Coe.coe ∘ Traversable.t... | [
" ∀ {α : Type ?u.133} (x : Multiset α), id <$> x = x",
" ∀ {α β γ : Type ?u.133} (g : α → β) (h : β → γ) (x : Multiset α), (h ∘ g) <$> x = h <$> g <$> x",
" Multiset α' → F (Multiset β')",
" ∀ (a b : List α'),\n a ≈ b → (Functor.map Coe.coe ∘ Traversable.traverse f) a = (Functor.map Coe.coe ∘ Traversable.t... |
import Mathlib.Data.Set.Prod
import Mathlib.Logic.Equiv.Fin
import Mathlib.ModelTheory.LanguageMap
#align_import model_theory.syntax from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728"
universe u v w u' v'
namespace FirstOrder
namespace Language
variable (L : Language.{u, v}) {L' : L... | Mathlib/ModelTheory/Syntax.lean | 274 | 279 | theorem id_onTerm : ((LHom.id L).onTerm : L.Term α → L.Term α) = id := by |
ext t
induction' t with _ _ _ _ ih
· rfl
· simp_rw [onTerm, ih]
rfl
| [
" (LHom.id L).onTerm = id",
" (LHom.id L).onTerm t = id t",
" (LHom.id L).onTerm (var a✝) = id (var a✝)",
" (LHom.id L).onTerm (func _f✝ _ts✝) = id (func _f✝ _ts✝)",
" (func ((LHom.id L).onFunction _f✝) fun i => id (_ts✝ i)) = id (func _f✝ _ts✝)"
] | [] |
import Mathlib.LinearAlgebra.Span
import Mathlib.RingTheory.Ideal.IsPrimary
import Mathlib.RingTheory.Ideal.QuotientOperations
import Mathlib.RingTheory.Noetherian
#align_import ring_theory.ideal.associated_prime from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
variable {R : Type*} [... | Mathlib/RingTheory/Ideal/AssociatedPrime.lean | 59 | 65 | theorem IsAssociatedPrime.map_of_injective (h : IsAssociatedPrime I M) (hf : Function.Injective f) :
IsAssociatedPrime I M' := by |
obtain ⟨x, rfl⟩ := h.2
refine ⟨h.1, ⟨f x, ?_⟩⟩
ext r
rw [Submodule.mem_annihilator_span_singleton, Submodule.mem_annihilator_span_singleton, ←
map_smul, ← f.map_zero, hf.eq_iff]
| [
" IsAssociatedPrime I M'",
" IsAssociatedPrime (Submodule.span R {x}).annihilator M'",
" (Submodule.span R {x}).annihilator = (Submodule.span R {f x}).annihilator",
" r ∈ (Submodule.span R {x}).annihilator ↔ r ∈ (Submodule.span R {f x}).annihilator"
] | [] |
import Mathlib.MeasureTheory.Measure.Typeclasses
#align_import measure_theory.measure.sub from "leanprover-community/mathlib"@"562bbf524c595c153470e53d36c57b6f891cc480"
open Set
namespace MeasureTheory
namespace Measure
noncomputable instance instSub {α : Type*} [MeasurableSpace α] : Sub (Measure α) :=
⟨fun ... | Mathlib/MeasureTheory/Measure/Sub.lean | 71 | 97 | theorem sub_apply [IsFiniteMeasure ν] (h₁ : MeasurableSet s) (h₂ : ν ≤ μ) :
(μ - ν) s = μ s - ν s := by |
-- We begin by defining `measure_sub`, which will be equal to `(μ - ν)`.
let measure_sub : Measure α := MeasureTheory.Measure.ofMeasurable
(fun (t : Set α) (_ : MeasurableSet t) => μ t - ν t) (by simp)
(fun g h_meas h_disj ↦ by
simp only [measure_iUnion h_disj h_meas]
rw [ENNReal.tsum_sub _ (h₂... | [
" μ ≤ 0 + ν",
" (μ - ν) s = μ s - ν s",
" (fun t x => μ t - ν t) ∅ ⋯ = 0",
" (fun t x => μ t - ν t) (⋃ i, g i) ⋯ = ∑' (i : ℕ), (fun t x => μ t - ν t) (g i) ⋯",
" ∑' (i : ℕ), μ (g i) - ∑' (i : ℕ), ν (g i) = ∑' (i : ℕ), (μ (g i) - ν (g i))",
" ∑' (i : ℕ), ν (g i) ≠ ⊤",
" ν (⋃ i, g i) ≠ ⊤",
" ν + measure... | [
" μ ≤ 0 + ν"
] |
import Mathlib.Probability.Process.HittingTime
import Mathlib.Probability.Martingale.Basic
#align_import probability.martingale.optional_stopping from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open scoped NNReal ENNReal MeasureTheory ProbabilityTheory
namespace MeasureTheory
vari... | Mathlib/Probability/Martingale/OptionalStopping.lean | 112 | 133 | theorem smul_le_stoppedValue_hitting [IsFiniteMeasure μ] (hsub : Submartingale f 𝒢 μ) {ε : ℝ≥0}
(n : ℕ) : ε • μ {ω | (ε : ℝ) ≤ (range (n + 1)).sup' nonempty_range_succ fun k => f k ω} ≤
ENNReal.ofReal (∫ ω in {ω | (ε : ℝ) ≤ (range (n + 1)).sup' nonempty_range_succ fun k => f k ω},
stoppedValue f (hitting... |
have hn : Set.Icc 0 n = {k | k ≤ n} := by ext x; simp
have : ∀ ω, ((ε : ℝ) ≤ (range (n + 1)).sup' nonempty_range_succ fun k => f k ω) →
(ε : ℝ) ≤ stoppedValue f (hitting f {y : ℝ | ↑ε ≤ y} 0 n) ω := by
intro x hx
simp_rw [le_sup'_iff, mem_range, Nat.lt_succ_iff] at hx
refine stoppedValue_hitting_... | [
" ∫ (x : Ω), stoppedValue f τ x ∂μ ≤ ∫ (x : Ω), stoppedValue f π x ∂μ",
" 0 ≤ ∫ (a : Ω), (fun ω => (∑ i ∈ Finset.range (N + 1), {ω | τ ω ≤ i ∧ i < π ω}.indicator (f (i + 1) - f i)) ω) a ∂μ",
" 0 ≤ ∫ (a : Ω), ∑ c ∈ Finset.range (N + 1), {ω | τ ω ≤ c ∧ c < π ω}.indicator (f (c + 1) - f c) a ∂μ",
" ∀ (i : ℕ), Me... | [
" ∫ (x : Ω), stoppedValue f τ x ∂μ ≤ ∫ (x : Ω), stoppedValue f π x ∂μ",
" 0 ≤ ∫ (a : Ω), (fun ω => (∑ i ∈ Finset.range (N + 1), {ω | τ ω ≤ i ∧ i < π ω}.indicator (f (i + 1) - f i)) ω) a ∂μ",
" 0 ≤ ∫ (a : Ω), ∑ c ∈ Finset.range (N + 1), {ω | τ ω ≤ c ∧ c < π ω}.indicator (f (c + 1) - f c) a ∂μ",
" ∀ (i : ℕ), Me... |
import Mathlib.Topology.Algebra.InfiniteSum.Defs
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Topology.Algebra.Monoid
noncomputable section
open Filter Finset Function
open scoped Topology
variable {α β γ δ : Type*}
section HasProd
variable [CommMonoid α] [TopologicalSpace α]
variable {f g : β → α} ... | Mathlib/Topology/Algebra/InfiniteSum/Basic.lean | 39 | 40 | theorem hasProd_empty [IsEmpty β] : HasProd f 1 := by |
convert @hasProd_one α β _ _
| [
" HasProd (fun x => 1) 1",
" HasProd f 1"
] | [
" HasProd (fun x => 1) 1"
] |
import Mathlib.Data.Nat.Factorial.Basic
import Mathlib.Order.Monotone.Basic
#align_import data.nat.choose.basic from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4"
open Nat
namespace Nat
def choose : ℕ → ℕ → ℕ
| _, 0 => 1
| 0, _ + 1 => 0
| n + 1, k + 1 => choose n k + choose n ... | Mathlib/Data/Nat/Choose/Basic.lean | 79 | 80 | theorem choose_self (n : ℕ) : choose n n = 1 := by |
induction n <;> simp [*, choose, choose_eq_zero_of_lt (lt_succ_self _)]
| [
" n.choose 0 = 1",
" choose 0 0 = 1",
" (n✝ + 1).choose 0 = 1",
" (n + 1).choose (k + 1) = 0",
" n.choose n = 1",
" (n✝ + 1).choose (n✝ + 1) = 1"
] | [
" n.choose 0 = 1",
" choose 0 0 = 1",
" (n✝ + 1).choose 0 = 1",
" (n + 1).choose (k + 1) = 0"
] |
import Mathlib.Algebra.QuadraticDiscriminant
import Mathlib.Analysis.Convex.SpecificFunctions.Deriv
import Mathlib.Analysis.SpecialFunctions.Pow.Complex
#align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
noncomputable secti... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean | 32 | 40 | theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by |
have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by
rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul,
add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub]
ring_nf
rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mu... | [
" θ.cos = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" (cexp (θ * I) + cexp (-θ * I)) / 2 = 0 ↔ cexp (2 * θ * I) = -1",
" cexp (θ * I - -θ * I) = -1 ↔ cexp (2 * θ * I) = -1",
" (∃ n, 2 * I * θ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" 2 * I * θ = ↑π * I + ↑x * (2 * ↑π * I) ↔ θ = (2 * ↑x +... | [] |
import Mathlib.CategoryTheory.Limits.KanExtension
import Mathlib.Topology.Category.TopCat.Opens
import Mathlib.CategoryTheory.Adjunction.Unique
import Mathlib.Topology.Sheaves.Init
import Mathlib.Data.Set.Subsingleton
#align_import topology.sheaves.presheaf from "leanprover-community/mathlib"@"5dc6092d09e5e4891068652... | Mathlib/Topology/Sheaves/Presheaf.lean | 143 | 148 | theorem restrict_restrict {X : TopCat} {C : Type*} [Category C] [ConcreteCategory C]
{F : X.Presheaf C} {U V W : Opens X} (e₁ : U ≤ V) (e₂ : V ≤ W) (x : F.obj (op W)) :
x |_ V |_ U = x |_ U := by |
delta restrictOpen restrict
rw [← comp_apply, ← Functor.map_comp]
rfl
| [] | [] |
import Mathlib.Algebra.Polynomial.Eval
#align_import data.polynomial.degree.lemmas from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
noncomputable section
open Polynomial
open Finsupp Finset
namespace Polynomial
universe u v w
variable {R : Type u} {S : Type v} {ι : Type w} {a b ... | Mathlib/Algebra/Polynomial/Degree/Lemmas.lean | 371 | 372 | theorem natDegree_C_mul (a0 : a ≠ 0) : (C a * p).natDegree = p.natDegree := by |
simp only [natDegree, degree_C_mul a0]
| [
" (p * C a).degree = p.degree",
" (C a * p).degree = p.degree",
" (p * C a).natDegree = p.natDegree",
" (C a * p).natDegree = p.natDegree"
] | [
" (p * C a).degree = p.degree",
" (C a * p).degree = p.degree",
" (p * C a).natDegree = p.natDegree"
] |
import Mathlib.ModelTheory.Basic
#align_import model_theory.language_map from "leanprover-community/mathlib"@"b3951c65c6e797ff162ae8b69eab0063bcfb3d73"
universe u v u' v' w w'
namespace FirstOrder
set_option linter.uppercaseLean3 false
namespace Language
open Structure Cardinal
open Cardinal
variable (L : L... | Mathlib/ModelTheory/LanguageMap.lean | 153 | 155 | theorem id_comp (F : L →ᴸ L') : LHom.id L' ∘ᴸ F = F := by |
cases F
rfl
| [
" F = G",
" { onFunction := Ff, onRelation := Fr } = G",
" { onFunction := Ff, onRelation := Fr } = { onFunction := Gf, onRelation := Gr }",
" Ff = Gf ∧ Fr = Gr",
" LHom.id L' ∘ᴸ F = F",
" LHom.id L' ∘ᴸ { onFunction := onFunction✝, onRelation := onRelation✝ } =\n { onFunction := onFunction✝, onRelation... | [
" F = G",
" { onFunction := Ff, onRelation := Fr } = G",
" { onFunction := Ff, onRelation := Fr } = { onFunction := Gf, onRelation := Gr }",
" Ff = Gf ∧ Fr = Gr"
] |
import Mathlib.Tactic.Ring
#align_import algebra.group_power.identities from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23"
variable {R : Type*} [CommRing R] {a b x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ y₁ y₂ y₃ y₄ y₅ y₆ y₇ y₈ n : R}
theorem sq_add_sq_mul_sq_add_sq :
(x₁ ^ 2 + x₂ ^ 2) * (y₁ ^ 2 +... | Mathlib/Algebra/Ring/Identities.lean | 67 | 78 | theorem sum_eight_sq_mul_sum_eight_sq :
(x₁ ^ 2 + x₂ ^ 2 + x₃ ^ 2 + x₄ ^ 2 + x₅ ^ 2 + x₆ ^ 2 + x₇ ^ 2 + x₈ ^ 2) *
(y₁ ^ 2 + y₂ ^ 2 + y₃ ^ 2 + y₄ ^ 2 + y₅ ^ 2 + y₆ ^ 2 + y₇ ^ 2 + y₈ ^ 2) =
(x₁ * y₁ - x₂ * y₂ - x₃ * y₃ - x₄ * y₄ - x₅ * y₅ - x₆ * y₆ - x₇ * y₇ - x₈ * y₈) ^ 2 +
(x₁ * y₂ + x₂ * y₁ + x₃ * ... |
ring
| [
" (x₁ ^ 2 + x₂ ^ 2) * (y₁ ^ 2 + y₂ ^ 2) = (x₁ * y₁ - x₂ * y₂) ^ 2 + (x₁ * y₂ + x₂ * y₁) ^ 2",
" (x₁ ^ 2 + n * x₂ ^ 2) * (y₁ ^ 2 + n * y₂ ^ 2) = (x₁ * y₁ - n * x₂ * y₂) ^ 2 + n * (x₁ * y₂ + x₂ * y₁) ^ 2",
" a ^ 4 + 4 * b ^ 4 = ((a - b) ^ 2 + b ^ 2) * ((a + b) ^ 2 + b ^ 2)",
" a ^ 4 + 4 * b ^ 4 = (a ^ 2 - 2 * a... | [
" (x₁ ^ 2 + x₂ ^ 2) * (y₁ ^ 2 + y₂ ^ 2) = (x₁ * y₁ - x₂ * y₂) ^ 2 + (x₁ * y₂ + x₂ * y₁) ^ 2",
" (x₁ ^ 2 + n * x₂ ^ 2) * (y₁ ^ 2 + n * y₂ ^ 2) = (x₁ * y₁ - n * x₂ * y₂) ^ 2 + n * (x₁ * y₂ + x₂ * y₁) ^ 2",
" a ^ 4 + 4 * b ^ 4 = ((a - b) ^ 2 + b ^ 2) * ((a + b) ^ 2 + b ^ 2)",
" a ^ 4 + 4 * b ^ 4 = (a ^ 2 - 2 * a... |
import Mathlib.MeasureTheory.Constructions.Prod.Basic
import Mathlib.MeasureTheory.Group.Measure
import Mathlib.Topology.Constructions
#align_import measure_theory.constructions.pi from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
noncomputable section
open Function Set MeasureTheory... | Mathlib/MeasureTheory/Constructions/Pi.lean | 252 | 260 | theorem tprod_tprod (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)]
(s : ∀ i, Set (π i)) :
Measure.tprod l μ (Set.tprod l s) = (l.map fun i => (μ i) (s i)).prod := by |
induction l with
| nil => simp
| cons a l ih =>
rw [tprod_cons, Set.tprod]
erw [prod_prod] -- TODO: why `rw` fails?
rw [map_cons, prod_cons, ih]
| [
" IsPiSystem (univ.pi '' univ.pi C)",
" univ.pi s₁ ∩ univ.pi s₂ ∈ univ.pi '' univ.pi C",
" (univ.pi fun i => s₁ i ∩ s₂ i) ∈ univ.pi '' univ.pi C",
" piPremeasure m (univ.pi s) = ∏ i : ι, (m i) (s i)",
" (m i) (s i) = 0",
" piPremeasure m (univ.pi fun i => eval i '' s) = piPremeasure m s",
" ∏ i : ι, (m ... | [
" IsPiSystem (univ.pi '' univ.pi C)",
" univ.pi s₁ ∩ univ.pi s₂ ∈ univ.pi '' univ.pi C",
" (univ.pi fun i => s₁ i ∩ s₂ i) ∈ univ.pi '' univ.pi C",
" piPremeasure m (univ.pi s) = ∏ i : ι, (m i) (s i)",
" (m i) (s i) = 0",
" piPremeasure m (univ.pi fun i => eval i '' s) = piPremeasure m s",
" ∏ i : ι, (m ... |
import Mathlib.RingTheory.JacobsonIdeal
#align_import ring_theory.nakayama from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
variable {R M : Type*} [CommRing R] [AddCommGroup M] [Module R M]
open Ideal
namespace Submodule
| Mathlib/RingTheory/Nakayama.lean | 52 | 61 | theorem eq_smul_of_le_smul_of_le_jacobson {I J : Ideal R} {N : Submodule R M} (hN : N.FG)
(hIN : N ≤ I • N) (hIjac : I ≤ jacobson J) : N = J • N := by |
refine le_antisymm ?_ (Submodule.smul_le.2 fun _ _ _ => Submodule.smul_mem _ _)
intro n hn
cases' Submodule.exists_sub_one_mem_and_smul_eq_zero_of_fg_of_le_smul I N hN hIN with r hr
cases' exists_mul_sub_mem_of_sub_one_mem_jacobson r (hIjac hr.1) with s hs
have : n = -(s * r - 1) • n := by
rw [neg_sub, s... | [
" N = J • N",
" N ≤ J • N",
" n ∈ J • N",
" n = -(s * r - 1) • n",
" -(s * r - 1) • n ∈ J • N"
] | [] |
import Mathlib.FieldTheory.Minpoly.Field
#align_import ring_theory.power_basis from "leanprover-community/mathlib"@"d1d69e99ed34c95266668af4e288fc1c598b9a7f"
open Polynomial
open Polynomial
variable {R S T : Type*} [CommRing R] [Ring S] [Algebra R S]
variable {A B : Type*} [CommRing A] [CommRing B] [IsDomain B]... | Mathlib/RingTheory/PowerBasis.lean | 84 | 86 | theorem finrank [StrongRankCondition R] (pb : PowerBasis R S) :
FiniteDimensional.finrank R S = pb.dim := by |
rw [FiniteDimensional.finrank_eq_card_basis pb.basis, Fintype.card_fin]
| [
" FiniteDimensional.finrank R S = pb.dim"
] | [] |
import Mathlib.Combinatorics.Quiver.Cast
import Mathlib.Combinatorics.Quiver.Symmetric
import Mathlib.Data.Sigma.Basic
import Mathlib.Logic.Equiv.Basic
import Mathlib.Tactic.Common
#align_import combinatorics.quiver.covering from "leanprover-community/mathlib"@"188a411e916e1119e502dbe35b8b475716362401"
open Funct... | Mathlib/Combinatorics/Quiver/Covering.lean | 114 | 118 | theorem Prefunctor.IsCovering.map_injective (hφ : φ.IsCovering) {u v : U} :
Injective fun f : u ⟶ v => φ.map f := by |
rintro f g he
have : φ.star u (Quiver.Star.mk f) = φ.star u (Quiver.Star.mk g) := by simpa using he
simpa using (hφ.star_bijective u).left this
| [
" Injective fun f => φ.map f",
" f = g",
" φ.star u (Star.mk f) = φ.star u (Star.mk g)"
] | [] |
import Batteries.Data.UnionFind.Basic
namespace Batteries.UnionFind
@[simp] theorem arr_empty : empty.arr = #[] := rfl
@[simp] theorem parent_empty : empty.parent a = a := rfl
@[simp] theorem rank_empty : empty.rank a = 0 := rfl
@[simp] theorem rootD_empty : empty.rootD a = a := rfl
@[simp] theorem arr_push {m : Un... | .lake/packages/batteries/Batteries/Data/UnionFind/Lemmas.lean | 41 | 51 | theorem parentD_linkAux {self} {x y : Fin self.size} :
parentD (linkAux self x y) i =
if x.1 = y then
parentD self i
else
if (self.get y).rank < (self.get x).rank then
if y = i then x else parentD self i
else
if x = i then y else parentD self i := by |
dsimp only [linkAux]; split <;> [rfl; split] <;> [rw [parentD_set]; split] <;> rw [parentD_set]
split <;> [(subst i; rwa [if_neg, parentD_eq]); rw [parentD_set]]
| [
" parentD (arr.push { parent := arr.size, rank := 0 }) a = parentD arr a",
" (if h : a < arr.size + 1 then (arr.push { parent := arr.size, rank := 0 })[a].parent else a) =\n if h : a < arr.size then arr[a].parent else a",
" (arr.push { parent := arr.size, rank := 0 })[a].parent = if h : a < arr.size then arr... | [
" parentD (arr.push { parent := arr.size, rank := 0 }) a = parentD arr a",
" (if h : a < arr.size + 1 then (arr.push { parent := arr.size, rank := 0 })[a].parent else a) =\n if h : a < arr.size then arr[a].parent else a",
" (arr.push { parent := arr.size, rank := 0 })[a].parent = if h : a < arr.size then arr... |
import Mathlib.Order.Lattice
import Mathlib.Data.List.Sort
import Mathlib.Logic.Equiv.Fin
import Mathlib.Logic.Equiv.Functor
import Mathlib.Data.Fintype.Card
import Mathlib.Order.RelSeries
#align_import order.jordan_holder from "leanprover-community/mathlib"@"91288e351d51b3f0748f0a38faa7613fb0ae2ada"
universe u
... | Mathlib/Order/JordanHolder.lean | 173 | 177 | theorem total {s : CompositionSeries X} {x y : X} (hx : x ∈ s) (hy : y ∈ s) : x ≤ y ∨ y ≤ x := by |
rcases Set.mem_range.1 hx with ⟨i, rfl⟩
rcases Set.mem_range.1 hy with ⟨j, rfl⟩
rw [s.strictMono.le_iff_le, s.strictMono.le_iff_le]
exact le_total i j
| [
" x ≤ y ∨ y ≤ x",
" s.toFun i ≤ y ∨ y ≤ s.toFun i",
" s.toFun i ≤ s.toFun j ∨ s.toFun j ≤ s.toFun i",
" i ≤ j ∨ j ≤ i"
] | [] |
import Mathlib.Algebra.Module.Submodule.Ker
#align_import linear_algebra.basic from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb"
variable {R : Type*} {R₂ : Type*}
variable {M : Type*} {M₂ : Type*}
namespace LinearMap
section AddCommMonoid
variable [Semiring R] [Semiring R₂]
varia... | Mathlib/Algebra/Module/Submodule/EqLocus.lean | 64 | 65 | theorem eqLocus_eq_top {f g : F} : eqLocus f g = ⊤ ↔ f = g := by |
simp [SetLike.ext_iff, DFunLike.ext_iff]
| [
" f (r • x) = g (r • x)",
" eqLocus f g = ⊤ ↔ f = g"
] | [
" f (r • x) = g (r • x)"
] |
import Mathlib.Analysis.Quaternion
import Mathlib.Analysis.NormedSpace.Exponential
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series
#align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open scoped Quaternion Nat
open... | Mathlib/Analysis/NormedSpace/QuaternionExponential.lean | 39 | 55 | theorem expSeries_even_of_imaginary {q : Quaternion ℝ} (hq : q.re = 0) (n : ℕ) :
expSeries ℝ (Quaternion ℝ) (2 * n) (fun _ => q) =
↑((-1 : ℝ) ^ n * ‖q‖ ^ (2 * n) / (2 * n)!) := by |
rw [expSeries_apply_eq]
have hq2 : q ^ 2 = -normSq q := sq_eq_neg_normSq.mpr hq
letI k : ℝ := ↑(2 * n)!
calc
k⁻¹ • q ^ (2 * n) = k⁻¹ • (-normSq q) ^ n := by rw [pow_mul, hq2]
_ = k⁻¹ • ↑((-1 : ℝ) ^ n * ‖q‖ ^ (2 * n)) := ?_
_ = ↑((-1 : ℝ) ^ n * ‖q‖ ^ (2 * n) / k) := ?_
· congr 1
rw [neg_pow, n... | [
" ((expSeries ℝ ℍ (2 * n)) fun x => q) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" (↑(2 * n)!)⁻¹ • q ^ (2 * n) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" k⁻¹ • q ^ (2 * n) = k⁻¹ • (-↑(normSq q)) ^ n",
" k⁻¹ • (-↑(normSq q)) ^ n = k⁻¹ • ↑((-1) ^ n * ‖q‖ ^ (2 * n))",
" (-↑(normSq q)) ^ n = ↑((-1) ^ n * ‖... | [] |
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
import Mathlib.Analysis.NormedSpace.Pointwise
#align_import analysis.normed_space.is_R_or_C from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open Metric
variable {𝕜 : Type*} [RCLike 𝕜] {E :... | Mathlib/Analysis/NormedSpace/RCLike.lean | 43 | 45 | theorem norm_smul_inv_norm {x : E} (hx : x ≠ 0) : ‖(‖x‖⁻¹ : 𝕜) • x‖ = 1 := by |
have : ‖x‖ ≠ 0 := by simp [hx]
field_simp [norm_smul]
| [
" ‖↑‖z‖‖ = ‖z‖",
" ‖(↑‖x‖)⁻¹ • x‖ = 1",
" ‖x‖ ≠ 0"
] | [
" ‖↑‖z‖‖ = ‖z‖"
] |
import Mathlib.Geometry.RingedSpace.PresheafedSpace
import Mathlib.Topology.Category.TopCat.Limits.Basic
import Mathlib.Topology.Sheaves.Limits
import Mathlib.CategoryTheory.ConcreteCategory.Elementwise
#align_import algebraic_geometry.presheafed_space.has_colimits from "leanprover-community/mathlib"@"178a32653e369dc... | Mathlib/Geometry/RingedSpace/PresheafedSpace/HasColimits.lean | 59 | 65 | theorem map_id_c_app (F : J ⥤ PresheafedSpace.{_, _, v} C) (j) (U) :
(F.map (𝟙 j)).c.app (op U) =
(Pushforward.id (F.obj j).presheaf).inv.app (op U) ≫
(pushforwardEq (by simp) (F.obj j).presheaf).hom.app
(op U) := by |
cases U
simp [PresheafedSpace.congr_app (F.map_id j)]
| [
" 𝟙 ↑(F.obj j) = (F.map (𝟙 j)).base",
" (F.map (𝟙 j)).c.app { unop := U } =\n (Pushforward.id (F.obj j).presheaf).inv.app { unop := U } ≫\n (pushforwardEq ⋯ (F.obj j).presheaf).hom.app { unop := U }",
" (F.map (𝟙 j)).c.app { unop := { carrier := carrier✝, is_open' := is_open'✝ } } =\n (Pushforwar... | [] |
import Mathlib.Algebra.Group.Prod
import Mathlib.Data.Set.Lattice
#align_import data.nat.pairing from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
assert_not_exists MonoidWithZero
open Prod Decidable Function
namespace Nat
-- Porting note: no pp_nodot
--@[pp_nodot]
def pair (a b : ... | Mathlib/Data/Nat/Pairing.lean | 117 | 119 | theorem right_le_pair (a b : ℕ) : b ≤ pair a b := by |
by_cases h : a < b <;> simp [pair, h]
exact le_trans (le_mul_self _) (Nat.le_add_right _ _)
| [
" n.unpair.1.pair n.unpair.2 = n",
" (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).1.pair\n (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).2 =\n n",
" ... | [
" n.unpair.1.pair n.unpair.2 = n",
" (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).1.pair\n (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).2 =\n n",
" ... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Algebra.Ring.Pi
import Mathlib.GroupTheory.GroupAction.Pi
#align_import algebra.big_operators.pi from "leanprover-community/mathlib"@"fa2309577c7009ea243cffdf990cd6c84f0ad497"
@[to_additive (attr := simp)]
theorem Finset.prod_apply {α : Type*} {β : α... | Mathlib/Algebra/BigOperators/Pi.lean | 81 | 84 | theorem Finset.univ_prod_mulSingle [Fintype I] (f : ∀ i, Z i) :
(∏ i, Pi.mulSingle i (f i)) = f := by |
ext a
simp
| [
" ∀ ⦃a : γ⦄ {s : Finset γ},\n a ∉ s →\n (∏ x ∈ s, f x, ∏ x ∈ s, g x) = ∏ x ∈ s, (f x, g x) →\n (∏ x ∈ insert a s, f x, ∏ x ∈ insert a s, g x) = ∏ x ∈ insert a s, (f x, g x)",
" x = ∑ i : ι, x i • fun j => if i = j then 1 else 0",
" x x✝ = (∑ i : ι, x i • fun j => if i = j then 1 else 0) x✝",
" ... | [
" ∀ ⦃a : γ⦄ {s : Finset γ},\n a ∉ s →\n (∏ x ∈ s, f x, ∏ x ∈ s, g x) = ∏ x ∈ s, (f x, g x) →\n (∏ x ∈ insert a s, f x, ∏ x ∈ insert a s, g x) = ∏ x ∈ insert a s, (f x, g x)",
" x = ∑ i : ι, x i • fun j => if i = j then 1 else 0",
" x x✝ = (∑ i : ι, x i • fun j => if i = j then 1 else 0) x✝"
] |
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 | 113 | 114 | theorem volume_closedBall (a r : ℝ) : volume (Metric.closedBall a r) = ofReal (2 * r) := by |
rw [closedBall_eq_Icc, volume_Icc, ← sub_add, add_sub_cancel_left, two_mul]
| [
" volume = StieltjesFunction.id.measure",
" StieltjesFunction.id.measure (Ioo ↑p ↑q) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo ↑p ↑q)",
" StieltjesFunction.id.measure ↑(stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped = 1",
" StieltjesFunction.id.measure (parallelepiped ⇑(stdOrthonorma... | [
" volume = StieltjesFunction.id.measure",
" StieltjesFunction.id.measure (Ioo ↑p ↑q) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo ↑p ↑q)",
" StieltjesFunction.id.measure ↑(stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped = 1",
" StieltjesFunction.id.measure (parallelepiped ⇑(stdOrthonorma... |
import Mathlib.MeasureTheory.Group.Measure
import Mathlib.MeasureTheory.Integral.IntegrableOn
import Mathlib.MeasureTheory.Function.LocallyIntegrable
open Asymptotics MeasureTheory Set Filter
variable {α E F : Type*} [MeasurableSpace α] [NormedAddCommGroup E] [NormedAddCommGroup F]
{f : α → E} {g : α → F} {a b :... | Mathlib/MeasureTheory/Integral/Asymptotics.lean | 105 | 109 | theorem LocallyIntegrable.integrable_of_isBigO_atTop [IsMeasurablyGenerated (atTop (α := α))]
[OrderBot α] (hf : LocallyIntegrable f μ) (ho : f =O[atTop] g)
(hg : IntegrableAtFilter g atTop μ) : Integrable f μ := by |
refine integrable_iff_integrableAtFilter_atTop.mpr ⟨ho.integrableAtFilter ?_ hg, hf⟩
exact hf.aestronglyMeasurable.stronglyMeasurableAtFilter
| [
" IntegrableAtFilter f l μ",
" ∀ᵐ (a : α) ∂μ.restrict s, ‖f a‖ ≤ ‖C * ‖g a‖‖",
" ‖f x‖ ≤ ‖C * ‖g x‖‖",
" Integrable f μ",
" IntegrableAtFilter f ⊤ μ",
" StronglyMeasurableAtFilter f (cocompact α) μ",
" StronglyMeasurableAtFilter f atTop μ",
" StronglyMeasurableAtFilter f atBot μ",
" IntegrableOn f (... | [
" IntegrableAtFilter f l μ",
" ∀ᵐ (a : α) ∂μ.restrict s, ‖f a‖ ≤ ‖C * ‖g a‖‖",
" ‖f x‖ ≤ ‖C * ‖g x‖‖",
" Integrable f μ",
" IntegrableAtFilter f ⊤ μ",
" StronglyMeasurableAtFilter f (cocompact α) μ",
" StronglyMeasurableAtFilter f atTop μ",
" StronglyMeasurableAtFilter f atBot μ",
" IntegrableOn f (... |
import Mathlib.Order.ConditionallyCompleteLattice.Basic
import Mathlib.Data.Int.LeastGreatest
#align_import data.int.conditionally_complete_order from "leanprover-community/mathlib"@"1e05171a5e8cf18d98d9cf7b207540acb044acae"
open Int
noncomputable section
open scoped Classical
instance instConditionallyComplet... | Mathlib/Data/Int/ConditionallyCompleteOrder.lean | 78 | 82 | theorem csInf_eq_least_of_bdd {s : Set ℤ} [DecidablePred (· ∈ s)] (b : ℤ) (Hb : ∀ z ∈ s, b ≤ z)
(Hinh : ∃ z : ℤ, z ∈ s) : sInf s = leastOfBdd b Hb Hinh := by |
have : s.Nonempty ∧ BddBelow s := ⟨Hinh, b, Hb⟩
simp only [sInf, this, and_self, dite_true]
convert (coe_leastOfBdd_eq Hb (Classical.choose_spec (⟨b, Hb⟩ : BddBelow s)) Hinh).symm
| [
" n ≤ sSup s",
" n ≤ ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯)",
" sSup s ≤ n",
" ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯) ≤ n",
" sInf s ≤ n",
" ↑((Classical.choose ⋯).leastOfBdd ⋯ ⋯) ≤ n",
" n ≤ sInf s",
" n ≤ ↑((Classical.choose ⋯).leastOfBdd ⋯ ⋯)",
" sSup s = sSup ∅",
" sInf s = sInf ∅",
" ... | [
" n ≤ sSup s",
" n ≤ ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯)",
" sSup s ≤ n",
" ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯) ≤ n",
" sInf s ≤ n",
" ↑((Classical.choose ⋯).leastOfBdd ⋯ ⋯) ≤ n",
" n ≤ sInf s",
" n ≤ ↑((Classical.choose ⋯).leastOfBdd ⋯ ⋯)",
" sSup s = sSup ∅",
" sInf s = sInf ∅",
" ... |
import Mathlib.Analysis.Convex.Slope
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Tactic.LinearCombination
#align_import analysis.convex.specific_functions.basic from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
open Real Set NNReal
theorem strictConvexOn_exp : St... | Mathlib/Analysis/Convex/SpecificFunctions/Basic.lean | 127 | 133 | theorem one_add_mul_self_le_rpow_one_add {s : ℝ} (hs : -1 ≤ s) {p : ℝ} (hp : 1 ≤ p) :
1 + p * s ≤ (1 + s) ^ p := by |
rcases eq_or_lt_of_le hp with (rfl | hp)
· simp
by_cases hs' : s = 0
· simp [hs']
exact (one_add_mul_self_lt_rpow_one_add hs hs' hp).le
| [
" StrictConvexOn ℝ univ rexp",
" ∀ {x y z : ℝ}, x ∈ univ → z ∈ univ → x < y → y < z → (rexp y - rexp x) / (y - x) < (rexp z - rexp y) / (z - y)",
" (rexp y - rexp x) / (y - x) < (rexp z - rexp y) / (z - y)",
" (rexp y - rexp x) / (y - x) < rexp y",
" 0 < y - x",
" x - y < 0",
" rexp y - rexp x < rexp y ... | [
" StrictConvexOn ℝ univ rexp",
" ∀ {x y z : ℝ}, x ∈ univ → z ∈ univ → x < y → y < z → (rexp y - rexp x) / (y - x) < (rexp z - rexp y) / (z - y)",
" (rexp y - rexp x) / (y - x) < (rexp z - rexp y) / (z - y)",
" (rexp y - rexp x) / (y - x) < rexp y",
" 0 < y - x",
" x - y < 0",
" rexp y - rexp x < rexp y ... |
import Mathlib.Data.Set.Function
import Mathlib.Logic.Relation
import Mathlib.Logic.Pairwise
#align_import data.set.pairwise.basic from "leanprover-community/mathlib"@"c4c2ed622f43768eff32608d4a0f8a6cec1c047d"
open Function Order Set
variable {α β γ ι ι' : Type*} {r p q : α → α → Prop}
section Pairwise
variabl... | Mathlib/Data/Set/Pairwise/Basic.lean | 100 | 109 | theorem Nonempty.pairwise_iff_exists_forall [IsEquiv α r] {s : Set ι} (hs : s.Nonempty) :
s.Pairwise (r on f) ↔ ∃ z, ∀ x ∈ s, r (f x) z := by |
constructor
· rcases hs with ⟨y, hy⟩
refine fun H => ⟨f y, fun x hx => ?_⟩
rcases eq_or_ne x y with (rfl | hne)
· apply IsRefl.refl
· exact H hx hy hne
· rintro ⟨z, hz⟩ x hx y hy _
exact @IsTrans.trans α r _ (f x) z (f y) (hz _ hx) (IsSymm.symm _ _ <| hz _ hy)
| [
" Pairwise (r on fun c => bif c then a else b) ↔ r a b",
" s.Pairwise (r on f) ↔ ∃ z, ∀ x ∈ s, r (f x) z",
" s.Pairwise (r on f) → ∃ z, ∀ x ∈ s, r (f x) z",
" r (f x) (f y)",
" r (f x) (f x)",
" (∃ z, ∀ x ∈ s, r (f x) z) → s.Pairwise (r on f)",
" (r on f) x y"
] | [
" Pairwise (r on fun c => bif c then a else b) ↔ r a b"
] |
import Mathlib.CategoryTheory.Limits.Types
import Mathlib.CategoryTheory.IsConnected
import Mathlib.CategoryTheory.Limits.Final
import Mathlib.CategoryTheory.Conj
universe w v u
namespace CategoryTheory.Limits.Types
variable (C : Type u) [Category.{v} C]
def constPUnitFunctor : C ⥤ Type w := (Functor.const C).o... | Mathlib/CategoryTheory/Limits/IsConnected.lean | 97 | 104 | theorem isConnected_iff_colimit_constPUnitFunctor_iso_pUnit
[HasColimit (constPUnitFunctor.{w} C)] :
IsConnected C ↔ Nonempty (colimit (constPUnitFunctor.{w} C) ≅ PUnit) := by |
refine ⟨fun _ => ⟨colimitConstPUnitIsoPUnit.{w} C⟩, fun ⟨h⟩ => ?_⟩
have : Nonempty C := nonempty_of_nonempty_colimit <| Nonempty.map h.inv inferInstance
refine zigzag_isConnected <| fun c d => ?_
refine zigzag_of_eqvGen_quot_rel _ (constPUnitFunctor C) ⟨c, PUnit.unit⟩ ⟨d, PUnit.unit⟩ ?_
exact colimit_eq <| h... | [
" (pUnitCocone C).ι.app j ≫ (fun s => s.ι.app Classical.ofNonempty) s = s.ι.app j",
" ((pUnitCocone C).ι.app j ≫ (fun s => s.ι.app Classical.ofNonempty) s) PUnit.unit = s.ι.app j PUnit.unit",
" ∀ (j₁ j₂ : C), (j₁ ⟶ j₂) → s.ι.app j₁ PUnit.unit = s.ι.app j₂ PUnit.unit",
" s.ι.app X PUnit.unit = s.ι.app Y PUnit.... | [
" (pUnitCocone C).ι.app j ≫ (fun s => s.ι.app Classical.ofNonempty) s = s.ι.app j",
" ((pUnitCocone C).ι.app j ≫ (fun s => s.ι.app Classical.ofNonempty) s) PUnit.unit = s.ι.app j PUnit.unit",
" ∀ (j₁ j₂ : C), (j₁ ⟶ j₂) → s.ι.app j₁ PUnit.unit = s.ι.app j₂ PUnit.unit",
" s.ι.app X PUnit.unit = s.ι.app Y PUnit.... |
import Mathlib.Analysis.NormedSpace.Exponential
import Mathlib.Analysis.Matrix
import Mathlib.LinearAlgebra.Matrix.ZPow
import Mathlib.LinearAlgebra.Matrix.Hermitian
import Mathlib.LinearAlgebra.Matrix.Symmetric
import Mathlib.Topology.UniformSpace.Matrix
#align_import analysis.normed_space.matrix_exponential from "l... | Mathlib/Analysis/NormedSpace/MatrixExponential.lean | 182 | 187 | theorem exp_neg (A : Matrix m m 𝔸) : exp 𝕂 (-A) = (exp 𝕂 A)⁻¹ := by |
rw [nonsing_inv_eq_ring_inverse]
letI : SeminormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
letI : NormedRing (Matrix m m 𝔸) := Matrix.linftyOpNormedRing
letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
exact (Ring.inverse_exp _ A).symm
| [
" exp 𝕂 (-A) = (exp 𝕂 A)⁻¹",
" exp 𝕂 (-A) = Ring.inverse (exp 𝕂 A)"
] | [] |
import Mathlib.Algebra.Ring.Idempotents
import Mathlib.RingTheory.Finiteness
import Mathlib.Order.Basic
#align_import ring_theory.ideal.idempotent_fg from "leanprover-community/mathlib"@"25cf7631da8ddc2d5f957c388bf5e4b25a77d8dc"
namespace Ideal
| Mathlib/RingTheory/Ideal/IdempotentFG.lean | 20 | 35 | theorem isIdempotentElem_iff_of_fg {R : Type*} [CommRing R] (I : Ideal R) (h : I.FG) :
IsIdempotentElem I ↔ ∃ e : R, IsIdempotentElem e ∧ I = R ∙ e := by |
constructor
· intro e
obtain ⟨r, hr, hr'⟩ :=
Submodule.exists_mem_and_smul_eq_self_of_fg_of_le_smul I I h
(by
rw [smul_eq_mul]
exact e.ge)
simp_rw [smul_eq_mul] at hr'
refine ⟨r, hr' r hr, antisymm ?_ ((Submodule.span_singleton_le_iff_mem _ _).mpr hr)⟩
intro x hx
... | [
" IsIdempotentElem I ↔ ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}",
" IsIdempotentElem I → ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}",
" ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}",
" I ≤ I • I",
" I ≤ I * I",
" I ≤ Submodule.span R {r}",
" x ∈ Submodule.span R {r}",
" r * x ∈... | [] |
import Mathlib.Data.Finsupp.Multiset
import Mathlib.Order.Bounded
import Mathlib.SetTheory.Cardinal.PartENat
import Mathlib.SetTheory.Ordinal.Principal
import Mathlib.Tactic.Linarith
#align_import set_theory.cardinal.ordinal from "leanprover-community/mathlib"@"7c2ce0c2da15516b4e65d0c9e254bb6dc93abd1f"
noncomputa... | Mathlib/SetTheory/Cardinal/Ordinal.lean | 111 | 112 | theorem alephIdx_le {a b} : alephIdx a ≤ alephIdx b ↔ a ≤ b := by |
rw [← not_lt, ← not_lt, alephIdx_lt]
| [
" c.ord.IsLimit",
" ℵ₀ = 0",
" c.ord ≤ a",
" c ≤ a.card",
" ℵ₀ ≤ a.card",
" ℵ₀ ≤ (succ a).card",
" ℵ₀.ord.IsLimit",
" ω.IsLimit",
" a.alephIdx ≤ b.alephIdx ↔ a ≤ b"
] | [
" c.ord.IsLimit",
" ℵ₀ = 0",
" c.ord ≤ a",
" c ≤ a.card",
" ℵ₀ ≤ a.card",
" ℵ₀ ≤ (succ a).card",
" ℵ₀.ord.IsLimit",
" ω.IsLimit"
] |
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 | 215 | 217 | theorem Right.inv_le_one_iff : a⁻¹ ≤ 1 ↔ 1 ≤ a := by |
rw [← mul_le_mul_iff_right a]
simp
| [
" b ≤ c",
" a⁻¹ ≤ 1 ↔ 1 ≤ a",
" a⁻¹ * a ≤ 1 * a ↔ 1 ≤ a"
] | [
" b ≤ c"
] |
import Mathlib.Analysis.Calculus.FDeriv.Linear
import Mathlib.Analysis.Calculus.FDeriv.Comp
#align_import analysis.calculus.fderiv.prod from "leanprover-community/mathlib"@"e354e865255654389cc46e6032160238df2e0f40"
open Filter Asymptotics ContinuousLinearMap Set Metric
open scoped Classical
open Topology NNReal ... | Mathlib/Analysis/Calculus/FDeriv/Prod.lean | 427 | 431 | theorem hasFDerivAtFilter_pi' :
HasFDerivAtFilter Φ Φ' x L ↔
∀ i, HasFDerivAtFilter (fun x => Φ x i) ((proj i).comp Φ') x L := by |
simp only [hasFDerivAtFilter_iff_isLittleO, ContinuousLinearMap.coe_pi]
exact isLittleO_pi
| [
" HasStrictFDerivAt Φ Φ' x ↔ ∀ (i : ι), HasStrictFDerivAt (fun x => Φ x i) ((proj i).comp Φ') x",
" ((fun p => Φ p.1 - Φ p.2 - Φ' (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2) ↔\n ∀ (i : ι), (fun p => Φ p.1 i - Φ p.2 i - ((proj i).comp Φ') (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2",
" HasStrictFDerivAt ... | [
" HasStrictFDerivAt Φ Φ' x ↔ ∀ (i : ι), HasStrictFDerivAt (fun x => Φ x i) ((proj i).comp Φ') x",
" ((fun p => Φ p.1 - Φ p.2 - Φ' (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2) ↔\n ∀ (i : ι), (fun p => Φ p.1 i - Φ p.2 i - ((proj i).comp Φ') (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2",
" HasStrictFDerivAt ... |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.Tactic.Abel
#align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778... | Mathlib/RingTheory/Polynomial/Pochhammer.lean | 83 | 87 | theorem ascPochhammer_map (f : S →+* T) (n : ℕ) :
(ascPochhammer S n).map f = ascPochhammer T n := by |
induction' n with n ih
· simp
· simp [ih, ascPochhammer_succ_left, map_comp]
| [
" ascPochhammer S 1 = X",
" ascPochhammer S (n + 1) = X * (ascPochhammer S n).comp (X + 1)",
" (ascPochhammer S n).Monic",
" (ascPochhammer S 0).Monic",
" (ascPochhammer S (n + 1)).Monic",
" map f (ascPochhammer S n) = ascPochhammer T n",
" map f (ascPochhammer S 0) = ascPochhammer T 0",
" map f (ascP... | [
" ascPochhammer S 1 = X",
" ascPochhammer S (n + 1) = X * (ascPochhammer S n).comp (X + 1)",
" (ascPochhammer S n).Monic",
" (ascPochhammer S 0).Monic",
" (ascPochhammer S (n + 1)).Monic"
] |
import Mathlib.Data.Set.Prod
#align_import data.set.n_ary from "leanprover-community/mathlib"@"5e526d18cea33550268dcbbddcb822d5cde40654"
open Function
namespace Set
variable {α α' β β' γ γ' δ δ' ε ε' ζ ζ' ν : Type*} {f f' : α → β → γ} {g g' : α → β → γ → δ}
variable {s s' : Set α} {t t' : Set β} {u u' : Set γ} {v... | Mathlib/Data/Set/NAry.lean | 103 | 104 | theorem image2_union_left : image2 f (s ∪ s') t = image2 f s t ∪ image2 f s' t := by |
simp_rw [← image_prod, union_prod, image_union]
| [
" f a b ∈ image2 f s t → a ∈ s ∧ b ∈ t",
" a ∈ s ∧ b ∈ t",
" a' ∈ s ∧ b' ∈ t",
" image2 f s t ⊆ image2 f s' t'",
" f a b ∈ image2 f s' t'",
" image2 f s t ⊆ u ↔ ∀ a ∈ s, (fun b => f a b) '' t ⊆ u",
" image2 f s t ⊆ u ↔ ∀ b ∈ t, (fun a => f a b) '' s ⊆ u",
" x✝ ∈ (fun x => f x.1 x.2) '' s ×ˢ t ↔ x✝ ∈ i... | [
" f a b ∈ image2 f s t → a ∈ s ∧ b ∈ t",
" a ∈ s ∧ b ∈ t",
" a' ∈ s ∧ b' ∈ t",
" image2 f s t ⊆ image2 f s' t'",
" f a b ∈ image2 f s' t'",
" image2 f s t ⊆ u ↔ ∀ a ∈ s, (fun b => f a b) '' t ⊆ u",
" image2 f s t ⊆ u ↔ ∀ b ∈ t, (fun a => f a b) '' s ⊆ u",
" x✝ ∈ (fun x => f x.1 x.2) '' s ×ˢ t ↔ x✝ ∈ i... |
import Mathlib.Algebra.Group.Equiv.Basic
import Mathlib.Algebra.Group.Aut
import Mathlib.Data.ZMod.Defs
import Mathlib.Tactic.Ring
#align_import algebra.quandle from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33"
open MulOpposite
universe u v
class Shelf (α : Type u) where
act : ... | Mathlib/Algebra/Quandle.lean | 239 | 241 | theorem self_distrib_inv {x y z : R} : x ◃⁻¹ y ◃⁻¹ z = (x ◃⁻¹ y) ◃⁻¹ x ◃⁻¹ z := by |
rw [← left_cancel (x ◃⁻¹ y), right_inv, ← left_cancel x, right_inv, self_distrib]
repeat' rw [right_inv]
| [
" x ◃ y = x ◃ y' ↔ y = y'",
" x ◃ y = x ◃ y' → y = y'",
" y = y' → x ◃ y = x ◃ y'",
" x ◃ y = x ◃ y",
" x ◃⁻¹ y = x ◃⁻¹ y' ↔ y = y'",
" x ◃⁻¹ y = x ◃⁻¹ y' → y = y'",
" y = y' → x ◃⁻¹ y = x ◃⁻¹ y'",
" x ◃⁻¹ y = x ◃⁻¹ y",
" x ◃⁻¹ y ◃⁻¹ z = (x ◃⁻¹ y) ◃⁻¹ x ◃⁻¹ z",
" (x ◃ x ◃⁻¹ y) ◃ x ◃ x ◃⁻¹ y ◃⁻¹ z ... | [
" x ◃ y = x ◃ y' ↔ y = y'",
" x ◃ y = x ◃ y' → y = y'",
" y = y' → x ◃ y = x ◃ y'",
" x ◃ y = x ◃ y",
" x ◃⁻¹ y = x ◃⁻¹ y' ↔ y = y'",
" x ◃⁻¹ y = x ◃⁻¹ y' → y = y'",
" y = y' → x ◃⁻¹ y = x ◃⁻¹ y'",
" x ◃⁻¹ y = x ◃⁻¹ y"
] |
import Mathlib.MeasureTheory.Measure.VectorMeasure
import Mathlib.MeasureTheory.Function.AEEqOfIntegral
#align_import measure_theory.measure.with_density_vector_measure from "leanprover-community/mathlib"@"d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1"
noncomputable section
open scoped Classical MeasureTheory NNReal ... | Mathlib/MeasureTheory/Measure/WithDensityVectorMeasure.lean | 69 | 76 | theorem withDensityᵥ_neg : μ.withDensityᵥ (-f) = -μ.withDensityᵥ f := by |
by_cases hf : Integrable f μ
· ext1 i hi
rw [VectorMeasure.neg_apply, withDensityᵥ_apply hf hi, ← integral_neg,
withDensityᵥ_apply hf.neg hi]
rfl
· rw [withDensityᵥ, withDensityᵥ, dif_neg hf, dif_neg, neg_zero]
rwa [integrable_neg_iff]
| [
" (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) ∅ = 0",
" HasSum (fun i => (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (s i))\n ((fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (⋃ i, s i))",
" HasSum (fun i => if MeasurableSet (s i) then ∫ (x : α) in s... | [
" (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) ∅ = 0",
" HasSum (fun i => (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (s i))\n ((fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (⋃ i, s i))",
" HasSum (fun i => if MeasurableSet (s i) then ∫ (x : α) in s... |
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.RingTheory.Localization.NormTrace
#align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
open scoped NumberField
open Finset NumberField Algebra FiniteDimensional
namespace RingOfIn... | Mathlib/NumberTheory/NumberField/Norm.lean | 72 | 85 | theorem isUnit_norm_of_isGalois [IsGalois K L] {x : 𝓞 L} : IsUnit (norm K x) ↔ IsUnit x := by |
classical
refine ⟨fun hx => ?_, IsUnit.map _⟩
replace hx : IsUnit (algebraMap (𝓞 K) (𝓞 L) <| norm K x) := hx.map (algebraMap (𝓞 K) <| 𝓞 L)
refine @isUnit_of_mul_isUnit_right (𝓞 L) _
⟨(univ \ {AlgEquiv.refl}).prod fun σ : L ≃ₐ[K] L => σ x,
prod_mem fun σ _ => x.2.map (σ : L →+* L).toIntAlgHom⟩ _ ... | [
" (norm K) ((algebraMap (𝓞 K) (𝓞 L)) x) = x ^ finrank K L",
" IsUnit ((norm K) x) ↔ IsUnit x",
" IsUnit x",
" IsUnit (⟨∏ σ ∈ univ \\ {AlgEquiv.refl}, σ ↑x, ⋯⟩ * x)",
" ⟨∏ σ ∈ univ \\ {AlgEquiv.refl}, σ ↑x, ⋯⟩ * x = (algebraMap (𝓞 K) (𝓞 L)) ((norm K) x)",
" ↑(⟨∏ σ ∈ univ \\ {AlgEquiv.refl}, σ ↑x, ⋯⟩ * ... | [
" (norm K) ((algebraMap (𝓞 K) (𝓞 L)) x) = x ^ finrank K L"
] |
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Algebra.Order.Group.Indicator
import Mathlib.Order.LiminfLimsup
import Mathlib.Order.Filter.Archimedean
import Mathlib.Order.Filter.CountableInter
import Mathlib.Topology.Algebra.Group.Basic
import Mathlib.Data.Set.La... | Mathlib/Topology/Algebra/Order/LiminfLimsup.lean | 568 | 578 | theorem limsup_eq_tendsto_sum_indicator_atTop (R : Type*) [StrictOrderedSemiring R] [Archimedean R]
(s : ℕ → Set α) : limsup s atTop = { ω | Tendsto
(fun n ↦ ∑ k ∈ Finset.range n, (s (k + 1)).indicator (1 : α → R) ω) atTop atTop } := by |
rw [limsup_eq_tendsto_sum_indicator_nat_atTop s]
ext ω
simp only [Set.mem_setOf_eq]
rw [(_ : (fun n ↦ ∑ k ∈ Finset.range n, (s (k + 1)).indicator (1 : α → R) ω) = fun n ↦
↑(∑ k ∈ Finset.range n, (s (k + 1)).indicator (1 : α → ℕ) ω))]
· exact tendsto_natCast_atTop_iff.symm
· ext n
simp only [Set.ind... | [
" limsup s atTop = {ω | Tendsto (fun n => ∑ k ∈ Finset.range n, (s (k + 1)).indicator 1 ω) atTop atTop}",
" ω ∈ limsup s atTop ↔ ω ∈ {ω | Tendsto (fun n => ∑ k ∈ Finset.range n, (s (k + 1)).indicator 1 ω) atTop atTop}",
" (∀ (i : ℕ), ∃ i_1, i ≤ i_1 ∧ ω ∈ s i_1) ↔\n ω ∈ {ω | Tendsto (fun n => ∑ k ∈ Finset.ran... | [
" limsup s atTop = {ω | Tendsto (fun n => ∑ k ∈ Finset.range n, (s (k + 1)).indicator 1 ω) atTop atTop}",
" ω ∈ limsup s atTop ↔ ω ∈ {ω | Tendsto (fun n => ∑ k ∈ Finset.range n, (s (k + 1)).indicator 1 ω) atTop atTop}",
" (∀ (i : ℕ), ∃ i_1, i ≤ i_1 ∧ ω ∈ s i_1) ↔\n ω ∈ {ω | Tendsto (fun n => ∑ k ∈ Finset.ran... |
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 | 142 | 155 | theorem addHaar_eq_zero_of_disjoint_translates_aux {E : Type*} [NormedAddCommGroup E]
[NormedSpace ℝ E] [MeasurableSpace E] [BorelSpace E] [FiniteDimensional ℝ E] (μ : Measure E)
[IsAddHaarMeasure μ] {s : Set E} (u : ℕ → E) (sb : IsBounded s) (hu : IsBounded (range u))
(hs : Pairwise (Disjoint on fun n => {... |
by_contra h
apply lt_irrefl ∞
calc
∞ = ∑' _ : ℕ, μ s := (ENNReal.tsum_const_eq_top_of_ne_zero h).symm
_ = ∑' n : ℕ, μ ({u n} + s) := by
congr 1; ext1 n; simp only [image_add_left, measure_preimage_add, singleton_add]
_ = μ (⋃ n, {u n} + s) := Eq.symm <| measure_iUnion hs fun n => by
simpa... | [
" (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.Analysis.Calculus.Deriv.ZPow
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.SpecialFunctions.Log.Deriv
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
import Mathlib.Analysis.Convex.Deriv
#align_import analysis.convex.specific_functions.deriv from "leanprover-communi... | Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean | 115 | 119 | theorem hasDerivAt_sqrt_mul_log {x : ℝ} (hx : x ≠ 0) :
HasDerivAt (fun x => √x * log x) ((2 + log x) / (2 * √x)) x := by |
convert (hasDerivAt_sqrt hx).mul (hasDerivAt_log hx) using 1
rw [add_div, div_mul_cancel_left₀ two_ne_zero, ← div_eq_mul_inv, sqrt_div_self', add_comm,
one_div, one_div, ← div_eq_inv_mul]
| [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)",
" 0 ≤ (if f x ≤... | [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)",
" 0 ≤ (if f x ≤... |
import Mathlib.Logic.Equiv.Defs
#align_import data.erased from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
universe u
def Erased (α : Sort u) : Sort max 1 u :=
Σ's : α → Prop, ∃ a, (fun b => a = b) = s
#align erased Erased
namespace Erased
@[inline]
def mk {α} (a : α) : Erased... | Mathlib/Data/Erased.lean | 131 | 131 | theorem map_out {α β} {f : α → β} (a : Erased α) : (a.map f).out = f a.out := by | simp [map]
| [
" (mk a).out = a",
" Classical.choose h = a",
" mk (out ⟨s, h⟩) = ⟨s, h⟩",
" ⟨fun b => out ⟨s, h⟩ = b, ⋯⟩ = ⟨s, h⟩",
" (fun b => out ⟨s, h⟩ = b) = s",
" a = b",
" (map f a).out = f a.out"
] | [
" (mk a).out = a",
" Classical.choose h = a",
" mk (out ⟨s, h⟩) = ⟨s, h⟩",
" ⟨fun b => out ⟨s, h⟩ = b, ⋯⟩ = ⟨s, h⟩",
" (fun b => out ⟨s, h⟩ = b) = s",
" a = b"
] |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.Module.Submodule.Basic
#align_import algebra.direct_sum.decomposition from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441"
variable {ι R M σ : Type*}
open DirectSum
namespace DirectSum
section AddCommMonoid
variable [Deci... | Mathlib/Algebra/DirectSum/Decomposition.lean | 127 | 128 | theorem decompose_coe {i : ι} (x : ℳ i) : decompose ℳ (x : M) = DirectSum.of _ i x := by |
rw [← decompose_symm_of _, Equiv.apply_symm_apply]
| [
" x = y",
" { decompose' := x, left_inv := xl, right_inv := xr } = y",
" { decompose' := x, left_inv := xl, right_inv := xr } = { decompose' := y, left_inv := yl, right_inv := yr }",
" ∀ (m : M), p m",
" (decompose ℳ) ↑x = (of (fun i => ↥(ℳ i)) i) x"
] | [
" x = y",
" { decompose' := x, left_inv := xl, right_inv := xr } = y",
" { decompose' := x, left_inv := xl, right_inv := xr } = { decompose' := y, left_inv := yl, right_inv := yr }",
" ∀ (m : M), p m"
] |
import Mathlib.Topology.Algebra.GroupWithZero
import Mathlib.Topology.Order.OrderClosed
#align_import topology.algebra.with_zero_topology from "leanprover-community/mathlib"@"3e0c4d76b6ebe9dfafb67d16f7286d2731ed6064"
open Topology Filter TopologicalSpace Filter Set Function
namespace WithZeroTopology
variable {α... | Mathlib/Topology/Algebra/WithZeroTopology.lean | 142 | 144 | theorem isClosed_iff {s : Set Γ₀} : IsClosed s ↔ (0 : Γ₀) ∈ s ∨ ∃ γ, γ ≠ 0 ∧ s ⊆ Ici γ := by |
simp only [← isOpen_compl_iff, isOpen_iff, mem_compl_iff, not_not, ← compl_Ici,
compl_subset_compl]
| [
" 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))",
" pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)",
" 𝓝 0 = ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)",
" (𝓝 0).HasBasis (fun γ => γ ≠ 0) Iio",
" (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)).HasBasis (fun γ => γ ≠ 0) Iio",
" DirectedOn ((fun γ => Iio γ) ⁻¹'o fun x x_1 => x ≥ x_1... | [
" 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))",
" pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)",
" 𝓝 0 = ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)",
" (𝓝 0).HasBasis (fun γ => γ ≠ 0) Iio",
" (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)).HasBasis (fun γ => γ ≠ 0) Iio",
" DirectedOn ((fun γ => Iio γ) ⁻¹'o fun x x_1 => x ≥ x_1... |
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
import Mathlib.LinearAlgebra.BilinearForm.DualLattice
import Mathlib.RingTheory.DedekindDomain.Basic
import Mathlib.RingTheory.Localization.Module
import Mathlib.RingTheory.Trace
#align_import ring_theory.dedekind_domain.... | Mathlib/RingTheory/DedekindDomain/IntegralClosure.lean | 65 | 83 | theorem IsIntegralClosure.isLocalization [Algebra.IsAlgebraic K L] :
IsLocalization (Algebra.algebraMapSubmonoid C A⁰) L := by |
haveI : IsDomain C :=
(IsIntegralClosure.equiv A C L (integralClosure A L)).toMulEquiv.isDomain (integralClosure A L)
haveI : NoZeroSMulDivisors A L := NoZeroSMulDivisors.trans A K L
haveI : NoZeroSMulDivisors A C := IsIntegralClosure.noZeroSMulDivisors A L
refine ⟨?_, fun z => ?_, fun {x y} h => ⟨1, ?_⟩⟩
... | [
" IsLocalization (algebraMapSubmonoid C A⁰) L",
" ∀ (y : ↥(algebraMapSubmonoid C A⁰)), IsUnit ((algebraMap C L) ↑y)",
" IsUnit ((algebraMap C L) ↑⟨(algebraMap A C) x, ⋯⟩)",
" x ≠ 0",
" ∃ x, z * (algebraMap C L) ↑x.2 = (algebraMap C L) x.1",
" z * (algebraMap C L) ↑(x, ⟨(algebraMap A C) ↑m, ⋯⟩).2 = (algebr... | [] |
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.Data.Real.Sqrt
import Mathlib.RingTheory.Ideal.QuotientOperations
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008... | Mathlib/Analysis/Normed/Group/Quotient.lean | 187 | 190 | theorem QuotientAddGroup.norm_lt_iff {S : AddSubgroup M} {x : M ⧸ S} {r : ℝ} :
‖x‖ < r ↔ ∃ m : M, ↑m = x ∧ ‖m‖ < r := by |
rw [isGLB_lt_iff (isGLB_quotient_norm _), exists_mem_image]
rfl
| [
" ‖x‖ = infDist 0 {m | ↑m = x}",
" ‖↑x‖ = infDist x ↑S",
" infDist x (⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x}) = infDist x ↑S",
" y ∈ ⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x} ↔ y ∈ ↑S",
" ‖-x‖ = ‖x‖",
" sInf (norm '' {m | ↑m = -x}) = sInf (norm '' {m | ↑m = x})",
" r ∈ norm '' {m | ↑m... | [
" ‖x‖ = infDist 0 {m | ↑m = x}",
" ‖↑x‖ = infDist x ↑S",
" infDist x (⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x}) = infDist x ↑S",
" y ∈ ⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x} ↔ y ∈ ↑S",
" ‖-x‖ = ‖x‖",
" sInf (norm '' {m | ↑m = -x}) = sInf (norm '' {m | ↑m = x})",
" r ∈ norm '' {m | ↑m... |
import Batteries.Tactic.Init
import Batteries.Tactic.Alias
import Batteries.Tactic.Lint.Misc
instance {f : α → β} [DecidablePred p] : DecidablePred (p ∘ f) :=
inferInstanceAs <| DecidablePred fun x => p (f x)
@[deprecated] alias proofIrrel := proof_irrel
theorem Function.id_def : @id α = fun x => x := rfl
al... | .lake/packages/batteries/Batteries/Logic.lean | 142 | 143 | theorem congr_eqRec {β : α → Sort _} (f : (x : α) → β x → γ) (h : x = x') (y : β x) :
f x' (Eq.rec y h) = f x y := by | cases h; rfl
| [
" h ▸ y = y",
" ⋯ ▸ y = y",
" f x y = f x' y'",
" f x y = f x y",
" x₁ = x₂ ↔ y₁ = y₂",
" x₁ = x₂ ↔ x₁ = y₂",
" x₁ = x₂ ↔ x₁ = x₂",
" x = z ↔ y = z",
" z = x ↔ z = y",
" cast e a = a'",
" cast e a = a",
" e ▸ x = cast ⋯ x",
" ⋯ ▸ x = cast ⋯ x",
" HEq (e ▸ x) x",
" HEq (⋯ ▸ x) x",
" HEq... | [
" h ▸ y = y",
" ⋯ ▸ y = y",
" f x y = f x' y'",
" f x y = f x y",
" x₁ = x₂ ↔ y₁ = y₂",
" x₁ = x₂ ↔ x₁ = y₂",
" x₁ = x₂ ↔ x₁ = x₂",
" x = z ↔ y = z",
" z = x ↔ z = y",
" cast e a = a'",
" cast e a = a",
" e ▸ x = cast ⋯ x",
" ⋯ ▸ x = cast ⋯ x",
" HEq (e ▸ x) x",
" HEq (⋯ ▸ x) x",
" HEq... |
import Mathlib.Algebra.Order.Group.Nat
import Mathlib.Data.List.Rotate
import Mathlib.GroupTheory.Perm.Support
#align_import group_theory.perm.list from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace List
variable {α β : Type*}
section FormPerm
variable [DecidableEq α] (l :... | Mathlib/GroupTheory/Perm/List.lean | 156 | 158 | theorem formPerm_apply_get_length (x : α) (xs : List α) :
formPerm (x :: xs) ((x :: xs).get (Fin.mk xs.length (by simp))) = x := by |
rw [get_cons_length, formPerm_apply_getLast]; rfl;
| [
" (zipWith swap [] x✝¹).prod x✝ ≠ x✝ → x✝ ∈ [] ∨ x✝ ∈ x✝¹",
" (zipWith swap x✝¹ []).prod x✝ ≠ x✝ → x✝ ∈ x✝¹ ∨ x✝ ∈ []",
" (swap (?m.1920 a l b l' x hx h) (?m.1921 a l b l' x hx h)) (?m.1919 a l b l' x hx h) ≠ ?m.1919 a l b l' x hx h",
" x = a → x ∈ a :: l",
" x ∈ x :: l",
" x = b → x ∈ b :: l'",
" x ∈ x... | [
" (zipWith swap [] x✝¹).prod x✝ ≠ x✝ → x✝ ∈ [] ∨ x✝ ∈ x✝¹",
" (zipWith swap x✝¹ []).prod x✝ ≠ x✝ → x✝ ∈ x✝¹ ∨ x✝ ∈ []",
" (swap (?m.1920 a l b l' x hx h) (?m.1921 a l b l' x hx h)) (?m.1919 a l b l' x hx h) ≠ ?m.1919 a l b l' x hx h",
" x = a → x ∈ a :: l",
" x ∈ x :: l",
" x = b → x ∈ b :: l'",
" x ∈ x... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.