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.Analysis.NormedSpace.AddTorsor import Mathlib.LinearAlgebra.AffineSpace.Ordered import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Topology.GDelta import Mathlib.Analysis.NormedSpace.FunctionSeries import Mathlib.Analysis.SpecificLimits.Basic #align_import topology.urysohns_lemma from "lea...
Mathlib/Topology/UrysohnsLemma.lean
185
192
theorem approx_le_one (c : CU P) (n : β„•) (x : X) : c.approx n x ≀ 1 := by
induction' n with n ihn generalizing c Β· exact indicator_apply_le' (fun _ => le_rfl) fun _ => zero_le_one Β· simp only [approx, midpoint_eq_smul_add, invOf_eq_inv, smul_eq_mul, ← div_eq_inv_mul] have := add_le_add (ihn (left c)) (ihn (right c)) set_option tactic.skipAssignedInstances false in norm_num...
[ " approx n c x = 0", " approx 0 c x = 0", " approx (n + 1) c x = 0", " midpoint ℝ (approx n c.left x) (approx n c.right x) = 0", " x ∈ c.left.C", " approx n c x = 1", " approx 0 c x = 1", " approx (n + 1) c x = 1", " midpoint ℝ (approx n c.left x) (approx n c.right x) = 1", " x βˆ‰ c.left.U", " 0 ...
[ " approx n c x = 0", " approx 0 c x = 0", " approx (n + 1) c x = 0", " midpoint ℝ (approx n c.left x) (approx n c.right x) = 0", " x ∈ c.left.C", " approx n c x = 1", " approx 0 c x = 1", " approx (n + 1) c x = 1", " midpoint ℝ (approx n c.left x) (approx n c.right x) = 1", " x βˆ‰ c.left.U", " 0 ...
import Mathlib.Data.Real.Irrational import Mathlib.Data.Nat.Fib.Basic import Mathlib.Data.Fin.VecNotation import Mathlib.Algebra.LinearRecurrence import Mathlib.Tactic.NormNum.NatFib import Mathlib.Tactic.NormNum.Prime #align_import data.real.golden_ratio from "leanprover-community/mathlib"@"2196ab363eb097c008d449712...
Mathlib/Data/Real/GoldenRatio.lean
121
122
theorem goldConj_neg : ψ < 0 := by
linarith [one_sub_goldConj, one_lt_gold]
[ " φ⁻¹ = -ψ", " 0 < 1", " 0 < 5", " 2 * 2 = 5 - 1", " ψ⁻¹ = -Ο†", " -ψ = φ⁻¹", " Ο† * ψ = -1", " (1 + √5) * (1 - √5) = -(2 * 2)", " 1 ^ 2 - √5 ^ 2 = -(2 * 2)", " ψ * Ο† = -1", " Ο† + ψ = 1", " (1 + √5) / 2 + (1 - √5) / 2 = 1", " 1 - Ο† = ψ", " 1 - ψ = Ο†", " Ο† - ψ = √5", " Ο† ^ (n + 2) - Ο† ^ (...
[ " φ⁻¹ = -ψ", " 0 < 1", " 0 < 5", " 2 * 2 = 5 - 1", " ψ⁻¹ = -Ο†", " -ψ = φ⁻¹", " Ο† * ψ = -1", " (1 + √5) * (1 - √5) = -(2 * 2)", " 1 ^ 2 - √5 ^ 2 = -(2 * 2)", " ψ * Ο† = -1", " Ο† + ψ = 1", " (1 + √5) / 2 + (1 - √5) / 2 = 1", " 1 - Ο† = ψ", " 1 - ψ = Ο†", " Ο† - ψ = √5", " Ο† ^ (n + 2) - Ο† ^ (...
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse #align_import analysis.special_functions.complex.arg from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Filter Metric Set open scoped ComplexConjugate Real To...
Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
33
37
theorem sin_arg (x : β„‚) : Real.sin (arg x) = x.im / abs x := by
unfold arg; split_ifs <;> simp [sub_eq_add_neg, arg, Real.sin_arcsin (abs_le.1 (abs_im_div_abs_le_one x)).1 (abs_le.1 (abs_im_div_abs_le_one x)).2, Real.sin_add, neg_div, Real.arcsin_neg, Real.sin_neg]
[ " x.arg.sin = x.im / abs x", " (if 0 ≀ x.re then (x.im / abs x).arcsin\n else if 0 ≀ x.im then ((-x).im / abs x).arcsin + Ο€ else ((-x).im / abs x).arcsin - Ο€).sin =\n x.im / abs x", " (x.im / abs x).arcsin.sin = x.im / abs x", " (((-x).im / abs x).arcsin + Ο€).sin = x.im / abs x", " (((-x).im / abs x...
[]
import Mathlib.Geometry.Manifold.ChartedSpace #align_import geometry.manifold.local_invariant_properties from "leanprover-community/mathlib"@"431589bce478b2229eba14b14a283250428217db" noncomputable section open scoped Classical open Manifold Topology open Set Filter TopologicalSpace variable {H M H' M' X : Typ...
Mathlib/Geometry/Manifold/LocalInvariantProperties.lean
648
666
theorem _root_.PartialHomeomorph.isLocalStructomorphWithinAt_iff {G : StructureGroupoid H} [ClosedUnderRestriction G] (f : PartialHomeomorph H H) {s : Set H} {x : H} (hx : x ∈ f.source βˆͺ sᢜ) : G.IsLocalStructomorphWithinAt (⇑f) s x ↔ x ∈ s β†’ βˆƒ e : PartialHomeomorph H H, e ∈ G ∧ e.source βŠ† f.sour...
constructor · intro hf h2x obtain ⟨e, he, hfe, hxe⟩ := hf h2x refine ⟨e.restr f.source, closedUnderRestriction' he f.open_source, ?_, ?_, hxe, ?_⟩ · simp_rw [PartialHomeomorph.restr_source] exact inter_subset_right.trans interior_subset · intro x' hx' exact hfe ⟨hx'.1, hx'.2.1⟩ · rw...
[ " βˆ€ {s : Set H} {x : H} {u : Set H} {f : H β†’ H},\n IsOpen u β†’ x ∈ u β†’ (G.IsLocalStructomorphWithinAt f s x ↔ G.IsLocalStructomorphWithinAt f (s ∩ u) x)", " G.IsLocalStructomorphWithinAt f s x ↔ G.IsLocalStructomorphWithinAt f (s ∩ u) x", " G.IsLocalStructomorphWithinAt f s x β†’ G.IsLocalStructomorphWithinAt f...
[ " βˆ€ {s : Set H} {x : H} {u : Set H} {f : H β†’ H},\n IsOpen u β†’ x ∈ u β†’ (G.IsLocalStructomorphWithinAt f s x ↔ G.IsLocalStructomorphWithinAt f (s ∩ u) x)", " G.IsLocalStructomorphWithinAt f s x ↔ G.IsLocalStructomorphWithinAt f (s ∩ u) x", " G.IsLocalStructomorphWithinAt f s x β†’ G.IsLocalStructomorphWithinAt f...
import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Localization.Ideal import Mathlib.RingTheory.Noetherian #align_import ring_theory.localization.submodule from "leanprover-community/mathlib"@"1ebb20602a8caef435ce47f6373e1aa40851a177" variable {R : Type*} [CommRing R] (M : Submonoid R) ...
Mathlib/RingTheory/Localization/Submodule.lean
75
78
theorem coeSubmodule_span (s : Set R) : coeSubmodule S (Ideal.span s) = Submodule.span R (algebraMap R S '' s) := by
rw [IsLocalization.coeSubmodule, Ideal.span, Submodule.map_span] rfl
[ " coeSubmodule S βŠ₯ = βŠ₯", " coeSubmodule S ⊀ = 1", " coeSubmodule S (Ideal.span s) = Submodule.span R (⇑(algebraMap R S) '' s)", " Submodule.span R (⇑(Algebra.linearMap R S) '' s) = Submodule.span R (⇑(algebraMap R S) '' s)" ]
[ " coeSubmodule S βŠ₯ = βŠ₯", " coeSubmodule S ⊀ = 1" ]
import Mathlib.Combinatorics.Quiver.Basic import Mathlib.Combinatorics.Quiver.Path #align_import combinatorics.quiver.cast from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" universe v v₁ vβ‚‚ u u₁ uβ‚‚ variable {U : Type*} [Quiver.{u + 1} U] namespace Quiver def Hom.cast {u v u' v...
Mathlib/Combinatorics/Quiver/Cast.lean
87
90
theorem Path.cast_eq_cast {u v u' v' : U} (hu : u = u') (hv : v = v') (p : Path u v) : p.cast hu hv = _root_.cast (by rw [hu, hv]) p := by
subst_vars rfl
[ " (u ⟢ v) = (u' ⟢ v')", " cast hu hv e = _root_.cast β‹― e", " cast β‹― β‹― e = _root_.cast β‹― e", " cast hu' hv' (cast hu hv e) = cast β‹― β‹― e", " cast β‹― β‹― (cast β‹― β‹― e) = cast β‹― β‹― e", " HEq (cast hu hv e) e", " HEq (cast β‹― β‹― e) e", " cast hu hv e = e' ↔ HEq e e'", " _root_.cast β‹― e = e' ↔ HEq e e'", " e' ...
[ " (u ⟢ v) = (u' ⟢ v')", " cast hu hv e = _root_.cast β‹― e", " cast β‹― β‹― e = _root_.cast β‹― e", " cast hu' hv' (cast hu hv e) = cast β‹― β‹― e", " cast β‹― β‹― (cast β‹― β‹― e) = cast β‹― β‹― e", " HEq (cast hu hv e) e", " HEq (cast β‹― β‹― e) e", " cast hu hv e = e' ↔ HEq e e'", " _root_.cast β‹― e = e' ↔ HEq e e'", " e' ...
import Mathlib.Analysis.RCLike.Lemmas import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad" set_option linter.uppercaseLean3 false...
Mathlib/MeasureTheory/Function/L2Space.lean
154
167
theorem integral_inner_eq_sq_snorm (f : Ξ± β†’β‚‚[ΞΌ] E) : ∫ a, βŸͺf a, f a⟫ βˆ‚ΞΌ = ENNReal.toReal (∫⁻ a, (β€–f aβ€–β‚Š : ℝβ‰₯0∞) ^ (2 : ℝ) βˆ‚ΞΌ) := by
simp_rw [inner_self_eq_norm_sq_to_K] norm_cast rw [integral_eq_lintegral_of_nonneg_ae] rotate_left Β· exact Filter.eventually_of_forall fun x => sq_nonneg _ Β· exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable congr ext1 x have h_two : (2 : ℝ) = ((2 : β„•) : ℝ) := by ...
[ " Integrable (fun x => f x ^ 2) ΞΌ", " Memβ„’p f 2 ΞΌ ↔ Integrable (fun x => β€–f xβ€– ^ 2) ΞΌ", " Memβ„’p f 2 ΞΌ ↔ Memβ„’p (fun x => β€–f xβ€– ^ 2) 1 ΞΌ", " β€–f xβœβ€– ^ 2 = β€–f xβœβ€– ^ ENNReal.toReal 2", " 1 = 2 / 2", " Memβ„’p f 2 ΞΌ ↔ Integrable (fun x => f x ^ 2) ΞΌ", " f x✝ ^ 2 = β€–f xβœβ€– ^ 2", " snorm (fun x => ‖↑↑f xβ€– ^ 2) 1...
[ " Integrable (fun x => f x ^ 2) ΞΌ", " Memβ„’p f 2 ΞΌ ↔ Integrable (fun x => β€–f xβ€– ^ 2) ΞΌ", " Memβ„’p f 2 ΞΌ ↔ Memβ„’p (fun x => β€–f xβ€– ^ 2) 1 ΞΌ", " β€–f xβœβ€– ^ 2 = β€–f xβœβ€– ^ ENNReal.toReal 2", " 1 = 2 / 2", " Memβ„’p f 2 ΞΌ ↔ Integrable (fun x => f x ^ 2) ΞΌ", " f x✝ ^ 2 = β€–f xβœβ€– ^ 2", " snorm (fun x => ‖↑↑f xβ€– ^ 2) 1...
import Mathlib.Algebra.Lie.Nilpotent import Mathlib.Algebra.Lie.Normalizer #align_import algebra.lie.cartan_subalgebra from "leanprover-community/mathlib"@"938fead7abdc0cbbca8eba7a1052865a169dc102" universe u v w w₁ wβ‚‚ variable {R : Type u} {L : Type v} variable [CommRing R] [LieRing L] [LieAlgebra R L] (H : Lie...
Mathlib/Algebra/Lie/CartanSubalgebra.lean
65
69
theorem ucs_eq_self_of_isCartanSubalgebra (H : LieSubalgebra R L) [H.IsCartanSubalgebra] (k : β„•) : H.toLieSubmodule.ucs k = H.toLieSubmodule := by
induction' k with k ih Β· simp Β· simp [ih]
[ " H.toLieSubmodule.normalizer = H.toLieSubmodule", " LieSubmodule.ucs k H.toLieSubmodule = H.toLieSubmodule", " LieSubmodule.ucs 0 H.toLieSubmodule = H.toLieSubmodule", " LieSubmodule.ucs (k + 1) H.toLieSubmodule = H.toLieSubmodule" ]
[ " H.toLieSubmodule.normalizer = H.toLieSubmodule" ]
import Mathlib.RingTheory.Valuation.Basic import Mathlib.NumberTheory.Padics.PadicNorm import Mathlib.Analysis.Normed.Field.Basic #align_import number_theory.padics.padic_numbers from "leanprover-community/mathlib"@"b9b2114f7711fec1c1e055d507f082f8ceb2c3b7" noncomputable section open scoped Classical open Nat m...
Mathlib/NumberTheory/Padics/PadicNumbers.lean
234
238
theorem val_eq_iff_norm_eq {f g : PadicSeq p} (hf : Β¬f β‰ˆ 0) (hg : Β¬g β‰ˆ 0) : f.valuation = g.valuation ↔ f.norm = g.norm := by
rw [norm_eq_pow_val hf, norm_eq_pow_val hg, ← neg_inj, zpow_inj] Β· exact mod_cast (Fact.out : p.Prime).pos Β· exact mod_cast (Fact.out : p.Prime).ne_one
[ " padicNorm p (↑f m) = padicNorm p (↑f n)", " False", " f.norm = 0 ↔ f β‰ˆ 0", " f.norm = 0 β†’ f β‰ˆ 0", " f β‰ˆ 0", " βˆƒ i, βˆ€ j β‰₯ i, padicNorm p (↑(f - 0) j) < Ξ΅", " βˆ€ j β‰₯ stationaryPoint hf, padicNorm p (↑(f - 0) j) < Ξ΅", " padicNorm p (↑(f - 0) j) < Ξ΅", " f β‰ˆ 0 β†’ f.norm = 0", " f.norm = 0", " f.norm ...
[ " padicNorm p (↑f m) = padicNorm p (↑f n)", " False", " f.norm = 0 ↔ f β‰ˆ 0", " f.norm = 0 β†’ f β‰ˆ 0", " f β‰ˆ 0", " βˆƒ i, βˆ€ j β‰₯ i, padicNorm p (↑(f - 0) j) < Ξ΅", " βˆ€ j β‰₯ stationaryPoint hf, padicNorm p (↑(f - 0) j) < Ξ΅", " padicNorm p (↑(f - 0) j) < Ξ΅", " f β‰ˆ 0 β†’ f.norm = 0", " f.norm = 0", " f.norm ...
import Mathlib.MeasureTheory.Integral.IntervalIntegral #align_import measure_theory.integral.layercake from "leanprover-community/mathlib"@"08a4542bec7242a5c60f179e4e49de8c0d677b1b" noncomputable section open scoped ENNReal MeasureTheory Topology open Set MeasureTheory Filter Measure namespace MeasureTheory se...
Mathlib/MeasureTheory/Integral/Layercake.lean
73
82
theorem countable_meas_le_ne_meas_lt (g : Ξ± β†’ R) : {t : R | ΞΌ {a : Ξ± | t ≀ g a} β‰  ΞΌ {a : Ξ± | t < g a}}.Countable := by
-- the target set is contained in the set of points where the function `t ↦ ΞΌ {a : Ξ± | t ≀ g a}` -- jumps down on the right of `t`. This jump set is countable for any function. let F : R β†’ ℝβ‰₯0∞ := fun t ↦ ΞΌ {a : Ξ± | t ≀ g a} apply (countable_image_gt_image_Ioi F).mono intro t ht have : ΞΌ {a | t < g a} < ΞΌ ...
[ " {t | ΞΌ {a | t ≀ g a} β‰  ΞΌ {a | t < g a}}.Countable", " {t | ΞΌ {a | t ≀ g a} β‰  ΞΌ {a | t < g a}} βŠ† {x | βˆƒ z < F x, βˆ€ (y : R), x < y β†’ F y ≀ z}", " t ∈ {x | βˆƒ z < F x, βˆ€ (y : R), x < y β†’ F y ≀ z}" ]
[]
import Mathlib.LinearAlgebra.Span import Mathlib.LinearAlgebra.BilinearMap #align_import algebra.module.submodule.bilinear from "leanprover-community/mathlib"@"6010cf523816335f7bae7f8584cb2edaace73940" universe uΞΉ u v open Set open Pointwise namespace Submodule variable {ΞΉ : Sort uΞΉ} {R M N P : Type*} variabl...
Mathlib/Algebra/Module/Submodule/Bilinear.lean
59
73
theorem mapβ‚‚_span_span (f : M β†’β‚—[R] N β†’β‚—[R] P) (s : Set M) (t : Set N) : mapβ‚‚ f (span R s) (span R t) = span R (Set.image2 (fun m n => f m n) s t) := by
apply le_antisymm Β· rw [mapβ‚‚_le] apply @span_induction' R M _ _ _ s intro a ha apply @span_induction' R N _ _ _ t intro b hb exact subset_span ⟨_, β€Ή_β€Ί, _, β€Ή_β€Ί, rfl⟩ all_goals intros; simp only [*, add_mem, smul_mem, zero_mem, _root_.map_zero, map_add, Linear...
[ " (f β†‘βŸ¨m, hm⟩) n = (f m) n", " mapβ‚‚ f (span R s) (span R t) = span R (image2 (fun m n => (f m) n) s t)", " mapβ‚‚ f (span R s) (span R t) ≀ span R (image2 (fun m n => (f m) n) s t)", " βˆ€ m ∈ span R s, βˆ€ n ∈ span R t, (f m) n ∈ span R (image2 (fun m n => (f m) n) s t)", " βˆ€ (a : R),\n βˆ€ x ∈ span R s,\n ...
[ " (f β†‘βŸ¨m, hm⟩) n = (f m) n" ]
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
178
179
theorem inv_mul_lt_iff_lt_mul : b⁻¹ * a < c ↔ a < b * c := by
rw [← mul_lt_mul_iff_left b, mul_inv_cancel_left]
[ " b ≀ c", " 1 < a⁻¹ ↔ a < 1", " a⁻¹ < 1 ↔ 1 < a", " b < a⁻¹ * c ↔ a * b < c", " a * b < a * (a⁻¹ * c) ↔ a * b < c", " b⁻¹ * a < c ↔ a < b * c" ]
[ " b ≀ c", " 1 < a⁻¹ ↔ a < 1", " a⁻¹ < 1 ↔ 1 < a", " b < a⁻¹ * c ↔ a * b < c", " a * b < a * (a⁻¹ * c) ↔ a * b < c" ]
import Mathlib.Algebra.PUnitInstances import Mathlib.Tactic.Abel import Mathlib.Tactic.Ring import Mathlib.Order.Hom.Lattice #align_import algebra.ring.boolean_ring from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open scoped symmDiff variable {Ξ± Ξ² Ξ³ : Type*} class BooleanRing (Ξ±) ...
Mathlib/Algebra/Ring/BooleanRing.lean
105
105
theorem mul_one_add_self : a * (1 + a) = 0 := by
rw [mul_add, mul_one, mul_self, add_self]
[ " a + a = 0", " a + a = (a + a) * (a + a)", " (a + a) * (a + a) = a * a + a * a + (a * a + a * a)", " a * a + a * a + (a * a + a * a) = a + a + (a + a)", " -a = -a + 0", " -a + 0 = -a + -a + a", " -a + -a + a = a", " a = -b ↔ a = b", " a * b + b * a = 0", " a + b = (a + b) * (a + b)", " (a + b) ...
[ " a + a = 0", " a + a = (a + a) * (a + a)", " (a + a) * (a + a) = a * a + a * a + (a * a + a * a)", " a * a + a * a + (a * a + a * a) = a + a + (a + a)", " -a = -a + 0", " -a + 0 = -a + -a + a", " -a + -a + a = a", " a = -b ↔ a = b", " a * b + b * a = 0", " a + b = (a + b) * (a + b)", " (a + b) ...
import Mathlib.Data.Fintype.Option import Mathlib.Topology.Separation import Mathlib.Topology.Sets.Opens #align_import topology.alexandroff from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" open Set Filter Topology variable {X : Type*} def OnePoint (X : Type*) := Option X #ali...
Mathlib/Topology/Compactification/OnePoint.lean
144
145
theorem ne_infty_iff_exists {x : OnePoint X} : x β‰  ∞ ↔ βˆƒ y : X, (y : OnePoint X) = x := by
induction x using OnePoint.rec <;> simp
[ " (some '' s)ᢜ = some '' sᢜ βˆͺ {∞}", " x β‰  ∞ ↔ βˆƒ y, ↑y = x", " ∞ β‰  ∞ ↔ βˆƒ y, ↑y = ∞", " ↑x✝ β‰  ∞ ↔ βˆƒ y, ↑y = ↑x✝" ]
[ " (some '' s)ᢜ = some '' sᢜ βˆͺ {∞}" ]
import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Combinatorics.SimpleGraph.Maps open Finset namespace SimpleGraph variable {V : Type*} [DecidableEq V] (G : SimpleGraph V) (s t : V) section ReplaceVertex def replaceVertex : SimpleGraph V where Adj v w := if v = t then if w = t then False else G...
Mathlib/Combinatorics/SimpleGraph/Operations.lean
82
86
theorem edgeSet_replaceVertex_of_adj (ha : G.Adj s t) : (G.replaceVertex s t).edgeSet = (G.edgeSet \ G.incidenceSet t βˆͺ (s(Β·, t)) '' (G.neighborSet s)) \ {s(t, t)} := by
ext e; refine e.inductionOn ?_ simp only [replaceVertex, mem_edgeSet, Set.mem_union, Set.mem_diff, mk'_mem_incidenceSet_iff] intros; split_ifs; exacts [by simp_all, by aesop, by rw [adj_comm]; aesop, by aesop]
[ " (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) v w β†’\n (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) w v", " (if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s el...
[ " (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) v w β†’\n (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) w v", " (if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s el...
import Mathlib.Algebra.ContinuedFractions.Basic import Mathlib.Algebra.GroupWithZero.Basic #align_import algebra.continued_fractions.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace GeneralizedContinuedFraction section WithDivisionRing variable {K : Type*}...
Mathlib/Algebra/ContinuedFractions/Translations.lean
180
181
theorem convergents'Aux_succ_none {s : Stream'.Seq (Pair K)} (h : s.head = none) (n : β„•) : convergents'Aux s (n + 1) = 0 := by
simp [convergents'Aux, h, convergents'Aux.match_1]
[ " βˆƒ conts, g.continuants n = conts ∧ conts.a = A", " βˆƒ conts, g.continuants n = conts ∧ conts.b = B", " g.convergents 0 = g.h", " g.continuantsAux 2 = { a := gp.b * g.h + gp.a, b := gp.b }", " g.continuants 1 = { a := gp.b * g.h + gp.a, b := gp.b }", " g.numerators 1 = gp.b * g.h + gp.a", " g.denominato...
[ " βˆƒ conts, g.continuants n = conts ∧ conts.a = A", " βˆƒ conts, g.continuants n = conts ∧ conts.b = B", " g.convergents 0 = g.h", " g.continuantsAux 2 = { a := gp.b * g.h + gp.a, b := gp.b }", " g.continuants 1 = { a := gp.b * g.h + gp.a, b := gp.b }", " g.numerators 1 = gp.b * g.h + gp.a", " g.denominato...
import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.Asymptotics.Theta import Mathlib.Analysis.Normed.Order.Basic #align_import analysis.asymptotics.asymptotic_equivalent from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" namespace Asymptotics open Filter Function ...
Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean
128
130
theorem isEquivalent_zero_iff_eventually_zero : u ~[l] 0 ↔ u =αΆ [l] 0 := by
rw [IsEquivalent, sub_zero] exact isLittleO_zero_right_iff
[ " v =O[l] u", " u x✝ = (u - v) x✝ + v x✝", " u ~[l] u", " 0 =o[l] u", " u ~[l] 0 ↔ u =αΆ [l] 0", " u =o[l] 0 ↔ u =αΆ [l] 0" ]
[ " v =O[l] u", " u x✝ = (u - v) x✝ + v x✝", " u ~[l] u", " 0 =o[l] u" ]
import Mathlib.Algebra.MvPolynomial.Equiv import Mathlib.Algebra.Polynomial.Eval #align_import data.mv_polynomial.polynomial from "leanprover-community/mathlib"@"0b89934139d3be96f9dab477f10c20f9f93da580" namespace MvPolynomial variable {R S Οƒ : Type*}
Mathlib/Algebra/MvPolynomial/Polynomial.lean
19
28
theorem polynomial_eval_evalβ‚‚ [CommSemiring R] [CommSemiring S] {x : S} (f : R β†’+* Polynomial S) (g : Οƒ β†’ Polynomial S) (p : MvPolynomial Οƒ R) : Polynomial.eval x (evalβ‚‚ f g p) = evalβ‚‚ ((Polynomial.evalRingHom x).comp f) (fun s => Polynomial.eval x (g s)) p := by
apply induction_on p Β· simp Β· intro p q hp hq simp [hp, hq] Β· intro p n hp simp [hp]
[ " Polynomial.eval x (evalβ‚‚ f g p) = evalβ‚‚ ((Polynomial.evalRingHom x).comp f) (fun s => Polynomial.eval x (g s)) p", " βˆ€ (a : R),\n Polynomial.eval x (evalβ‚‚ f g (C a)) =\n evalβ‚‚ ((Polynomial.evalRingHom x).comp f) (fun s => Polynomial.eval x (g s)) (C a)", " βˆ€ (p q : MvPolynomial Οƒ R),\n Polynomial.e...
[]
import Mathlib.Data.Matrix.Kronecker import Mathlib.LinearAlgebra.Matrix.ToLin import Mathlib.LinearAlgebra.TensorProduct.Basis #align_import linear_algebra.tensor_product.matrix from "leanprover-community/mathlib"@"f784cc6142443d9ee623a20788c282112c322081" variable {R : Type*} {M N P M' N' : Type*} {ΞΉ ΞΊ Ο„ ΞΉ' ΞΊ' ...
Mathlib/LinearAlgebra/TensorProduct/Matrix.lean
49
53
theorem Matrix.toLin_kronecker (A : Matrix ΞΉ' ΞΉ R) (B : Matrix ΞΊ' ΞΊ R) : toLin (bM.tensorProduct bN) (bM'.tensorProduct bN') (A βŠ—β‚– B) = TensorProduct.map (toLin bM bM' A) (toLin bN bN' B) := by
rw [← LinearEquiv.eq_symm_apply, toLin_symm, TensorProduct.toMatrix_map, toMatrix_toLin, toMatrix_toLin]
[ " (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMatrix bN bN') g)", " (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) (i, j) (i', j') =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMa...
[ " (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMatrix bN bN') g)", " (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) (i, j) (i', j') =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMa...
import Mathlib.Algebra.Algebra.Defs import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.RingTheory.Localization.Basic import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Surreal.Basic #align_import set_theory.surreal.dyadic from "leanprover-community/mathlib"@"9...
Mathlib/SetTheory/Surreal/Dyadic.lean
52
52
theorem powHalf_leftMoves (n) : (powHalf n).LeftMoves = PUnit := by
cases n <;> rfl
[ " (powHalf n).LeftMoves = PUnit.{u_1 + 1}", " (powHalf 0).LeftMoves = PUnit.{u_1 + 1}", " (powHalf (n✝ + 1)).LeftMoves = PUnit.{u_1 + 1}" ]
[]
import Mathlib.Algebra.Ring.Idempotents import Mathlib.Analysis.Normed.Group.Basic import Mathlib.Order.Basic import Mathlib.Tactic.NoncommRing #align_import analysis.normed_space.M_structure from "leanprover-community/mathlib"@"d11893b411025250c8e61ff2f12ccbd7ee35ab15" variable (X : Type*) [NormedAddCommGroup X] ...
Mathlib/Analysis/NormedSpace/MStructure.lean
105
144
theorem commute [FaithfulSMul M X] {P Q : M} (h₁ : IsLprojection X P) (hβ‚‚ : IsLprojection X Q) : Commute P Q := by
have PR_eq_RPR : βˆ€ R : M, IsLprojection X R β†’ P * R = R * P * R := fun R h₃ => by -- Porting note: Needed to fix function, which changes indent of following lines refine @eq_of_smul_eq_smul _ X _ _ _ _ fun x => by rw [← norm_sub_eq_zero_iff] have e1 : β€–R β€’ xβ€– β‰₯ β€–R β€’ xβ€– + 2 β€’ β€–(P * R) β€’ x - (R * P...
[ " β€–xβ€– = β€–(1 - P) β€’ xβ€– + β€–(1 - (1 - P)) β€’ xβ€–", " β€–xβ€– = β€–P β€’ xβ€– + β€–(1 - P) β€’ xβ€–", " Commute P Q", " P * R = R * P * R", " (P * R) β€’ x = (R * P * R) β€’ x", " β€–(P * R) β€’ x - (R * P * R) β€’ xβ€– = 0", " β€–R β€’ xβ€– = β€–R β€’ P β€’ R β€’ xβ€– + β€–(1 - R) β€’ P β€’ R β€’ xβ€– + (β€–(R * R) β€’ x - R β€’ P β€’ R β€’ xβ€– + β€–(1 - R) β€’ (1 - P) β€’ R β€’ ...
[ " β€–xβ€– = β€–(1 - P) β€’ xβ€– + β€–(1 - (1 - P)) β€’ xβ€–", " β€–xβ€– = β€–P β€’ xβ€– + β€–(1 - P) β€’ xβ€–" ]
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Unary variable (xs : Vector Ξ± n) (f₁ : Ξ² β†’ σ₁ β†’ σ₁ Γ— Ξ³) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ²) @[simp] theorem mapAccumr_mapAccumr : mapAccumr f₁ (mapAccumr fβ‚‚ xs sβ‚‚).snd s₁ = let m := (...
Mathlib/Data/Vector/MapLemmas.lean
38
40
theorem mapAccumr_map (fβ‚‚ : Ξ± β†’ Ξ²) : (mapAccumr f₁ (map fβ‚‚ xs) s) = (mapAccumr (fun x s => f₁ (fβ‚‚ x) s) xs s) := by
induction xs using Vector.revInductionOn generalizing s <;> simp_all
[ " mapAccumr f₁ (mapAccumr fβ‚‚ xs sβ‚‚).2 s₁ =\n let m :=\n mapAccumr\n (fun x s =>\n let rβ‚‚ := fβ‚‚ x s.2;\n let r₁ := f₁ rβ‚‚.2 s.1;\n ((r₁.1, rβ‚‚.1), r₁.2))\n xs (s₁, sβ‚‚);\n (m.1.1, m.2)", " mapAccumr f₁ (mapAccumr fβ‚‚ nil sβ‚‚).2 s₁ =\n let m :=\n mapAccumr\n ...
[ " mapAccumr f₁ (mapAccumr fβ‚‚ xs sβ‚‚).2 s₁ =\n let m :=\n mapAccumr\n (fun x s =>\n let rβ‚‚ := fβ‚‚ x s.2;\n let r₁ := f₁ rβ‚‚.2 s.1;\n ((r₁.1, rβ‚‚.1), r₁.2))\n xs (s₁, sβ‚‚);\n (m.1.1, m.2)", " mapAccumr f₁ (mapAccumr fβ‚‚ nil sβ‚‚).2 s₁ =\n let m :=\n mapAccumr\n ...
import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Order.LatticeIntervals import Mathlib.Order.Interval.Set.OrdConnected #align_import order.complete_lattice_intervals from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open scoped Classical open Set variable {ΞΉ : ...
Mathlib/Order/CompleteLatticeIntervals.lean
106
108
theorem subset_sInf_of_not_bddBelow [Inhabited s] {t : Set s} (ht : Β¬BddBelow t) : sInf t = default := by
simp [sInf, ht]
[ " sInf (Subtype.val '' t) = ↑(sInf t)", " sInf βˆ… = default", " sInf t = default" ]
[ " sInf (Subtype.val '' t) = ↑(sInf t)", " sInf βˆ… = default" ]
import Mathlib.CategoryTheory.Balanced import Mathlib.CategoryTheory.Limits.EssentiallySmall import Mathlib.CategoryTheory.Limits.Opposites import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms import Mathlib.CategoryTheory.Subobject.Lattice import Mathlib.CategoryTheory.Subobject.WellPowered import Mathlib.Data.S...
Mathlib/CategoryTheory/Generator.lean
117
126
theorem isDetecting_op_iff (𝒒 : Set C) : IsDetecting 𝒒.op ↔ IsCodetecting 𝒒 := by
refine ⟨fun h𝒒 X Y f hf => ?_, fun h𝒒 X Y f hf => ?_⟩ Β· refine (isIso_op_iff _).1 (h𝒒 _ fun G hG h => ?_) obtain ⟨t, ht, ht'⟩ := hf (unop G) (Set.mem_op.1 hG) h.unop exact ⟨t.op, Quiver.Hom.unop_inj ht, fun y hy => Quiver.Hom.unop_inj (ht' _ (Quiver.Hom.op_inj hy))⟩ Β· refine (isIso_unop_iff _).1...
[ " IsSeparating 𝒒.op ↔ IsCoseparating 𝒒", " f = g", " (h ≫ f.op).unop = (h ≫ g.op).unop", " (f.unop ≫ h).op = (g.unop ≫ h).op", " IsCoseparating 𝒒.op ↔ IsSeparating 𝒒", " (f.op ≫ h).unop = (g.op ≫ h).unop", " (h ≫ f.unop).op = (h ≫ g.unop).op", " IsCoseparating 𝒒.unop ↔ IsSeparating 𝒒", " IsSep...
[ " IsSeparating 𝒒.op ↔ IsCoseparating 𝒒", " f = g", " (h ≫ f.op).unop = (h ≫ g.op).unop", " (f.unop ≫ h).op = (g.unop ≫ h).op", " IsCoseparating 𝒒.op ↔ IsSeparating 𝒒", " (f.op ≫ h).unop = (g.op ≫ h).unop", " (h ≫ f.unop).op = (h ≫ g.unop).op", " IsCoseparating 𝒒.unop ↔ IsSeparating 𝒒", " IsSep...
import Mathlib.Analysis.SpecialFunctions.Complex.Arg import Mathlib.Analysis.SpecialFunctions.Log.Basic #align_import analysis.special_functions.complex.log from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section namespace Complex open Set Filter Bornology open scop...
Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
120
120
theorem log_neg_I : log (-I) = -(Ο€ / 2) * I := by
simp [log]
[ " x.log.re = (abs x).log", " x.log.im = x.arg", " -Ο€ < x.log.im", " x.log.im ≀ Ο€", " cexp x.log = x", " x ∈ Set.range cexp β†’ x ∈ {0}ᢜ", " cexp x ∈ {0}ᢜ", " (cexp x).log = x", " x = y", " (↑x.log).re = (↑x).log.re", " (↑x.log).im = (↑x).log.im", " (↑x).log.re = x.log", " (↑r * x).log = ↑r.log...
[ " x.log.re = (abs x).log", " x.log.im = x.arg", " -Ο€ < x.log.im", " x.log.im ≀ Ο€", " cexp x.log = x", " x ∈ Set.range cexp β†’ x ∈ {0}ᢜ", " cexp x ∈ {0}ᢜ", " (cexp x).log = x", " x = y", " (↑x.log).re = (↑x).log.re", " (↑x.log).im = (↑x).log.im", " (↑x).log.re = x.log", " (↑r * x).log = ↑r.log...
import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.Asymptotics.Theta import Mathlib.Analysis.Normed.Order.Basic #align_import analysis.asymptotics.asymptotic_equivalent from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" namespace Asymptotics open Filter Function ...
Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean
151
154
theorem IsEquivalent.tendsto_const {c : Ξ²} (hu : u ~[l] const _ c) : Tendsto u l (𝓝 c) := by
rcases em <| c = 0 with rfl | h Β· exact (tendsto_congr' <| isEquivalent_zero_iff_eventually_zero.mp hu).mpr tendsto_const_nhds Β· exact (isEquivalent_const_iff_tendsto h).mp hu
[ " v =O[l] u", " u x✝ = (u - v) x✝ + v x✝", " u ~[l] u", " 0 =o[l] u", " u ~[l] 0 ↔ u =αΆ [l] 0", " u =o[l] 0 ↔ u =αΆ [l] 0", " u ~[l] 0 ↔ u =O[l] 0", " u ~[l] 0", " βˆƒ s ∈ l, Set.EqOn u 0 s", " u ~[l] const Ξ± c ↔ Tendsto u l (𝓝 c)", " Tendsto (u - fun x => c) l (𝓝 0) ↔ Tendsto u l (𝓝 c)", " Tend...
[ " v =O[l] u", " u x✝ = (u - v) x✝ + v x✝", " u ~[l] u", " 0 =o[l] u", " u ~[l] 0 ↔ u =αΆ [l] 0", " u =o[l] 0 ↔ u =αΆ [l] 0", " u ~[l] 0 ↔ u =O[l] 0", " u ~[l] 0", " βˆƒ s ∈ l, Set.EqOn u 0 s", " u ~[l] const Ξ± c ↔ Tendsto u l (𝓝 c)", " Tendsto (u - fun x => c) l (𝓝 0) ↔ Tendsto u l (𝓝 c)", " Tend...
import Mathlib.Data.Matrix.Invertible import Mathlib.LinearAlgebra.Matrix.Adjugate import Mathlib.LinearAlgebra.FiniteDimensional #align_import linear_algebra.matrix.nonsingular_inverse from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422" namespace Matrix universe u u' v variable {l : ...
Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
120
129
theorem mul_eq_one_comm : A * B = 1 ↔ B * A = 1 := suffices βˆ€ A B : Matrix n n Ξ±, A * B = 1 β†’ B * A = 1 from ⟨this A B, this B A⟩ fun A B h => by letI : Invertible B.det := detInvertibleOfLeftInverse _ _ h letI : Invertible B := invertibleOfDetInvertible B calc B * A = B * A * (B * β…Ÿ B) := by
rw [mul_invOf_self, Matrix.mul_one] _ = B * (A * B * β…Ÿ B) := by simp only [Matrix.mul_assoc] _ = B * β…Ÿ B := by rw [h, Matrix.one_mul] _ = 1 := mul_invOf_self B
[ " β…ŸA.det β€’ A.adjugate * A = 1", " A * β…ŸA.det β€’ A.adjugate = 1", " β…ŸA = β…ŸA.det β€’ A.adjugate", " B.det * A.det = 1", " A.det * B.det = 1", " (β…ŸA).det = β…ŸA.det", " B * A = 1", " B * A = B * A * (B * β…ŸB)", " B * A * (B * β…ŸB) = B * (A * B * β…ŸB)", " B * (A * B * β…ŸB) = B * β…ŸB" ]
[ " β…ŸA.det β€’ A.adjugate * A = 1", " A * β…ŸA.det β€’ A.adjugate = 1", " β…ŸA = β…ŸA.det β€’ A.adjugate", " B.det * A.det = 1", " A.det * B.det = 1", " (β…ŸA).det = β…ŸA.det" ]
import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots import Mathlib.FieldTheory.Finite.Trace import Mathlib.Algebra.Group.AddChar import Mathlib.Data.ZMod.Units import Mathlib.Analysis.Complex.Polynomial #align_import number_theory.legendre_symbol.add_character from "leanprover-community/mathlib"@"0723536a0522d24fc2...
Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean
189
192
theorem IsPrimitive.zmod_char_eq_one_iff (n : β„•+) {ψ : AddChar (ZMod n) C} (hψ : IsPrimitive ψ) (a : ZMod n) : ψ a = 1 ↔ a = 0 := by
refine ⟨fun h => not_imp_comm.mp (hψ a) ?_, fun ha => by rw [ha, map_zero_eq_one]⟩ rw [zmod_char_isNontrivial_iff n (mulShift ψ a), mulShift_apply, mul_one, h, Classical.not_not]
[ " β‹―.unit ∈ rootsOfUnity (ringChar R).toPNat' R'", " (f.compAddChar Ο†).IsPrimitive", " ((f.compAddChar Ο†).mulShift a).IsNontrivial", " βˆƒ a_1, f (Ο† (a * a_1)) β‰  1", " Function.Injective ψ.mulShift", " a = b", " ψ.IsPrimitive", " (ψ.mulShift a).IsNontrivial", " (ψ.mulShift a) (a⁻¹ * x) β‰  1", " Β¬(e.mu...
[ " β‹―.unit ∈ rootsOfUnity (ringChar R).toPNat' R'", " (f.compAddChar Ο†).IsPrimitive", " ((f.compAddChar Ο†).mulShift a).IsNontrivial", " βˆƒ a_1, f (Ο† (a * a_1)) β‰  1", " Function.Injective ψ.mulShift", " a = b", " ψ.IsPrimitive", " (ψ.mulShift a).IsNontrivial", " (ψ.mulShift a) (a⁻¹ * x) β‰  1", " Β¬(e.mu...
import Mathlib.CategoryTheory.Sites.Coherent.ReflectsPreregular import Mathlib.Topology.Category.CompHaus.EffectiveEpi import Mathlib.Topology.Category.Profinite.Limits import Mathlib.Topology.Category.Stonean.Basic universe u attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike open CategoryTh...
Mathlib/Topology/Category/Profinite/EffectiveEpi.lean
110
128
theorem effectiveEpiFamily_tfae {Ξ± : Type} [Finite Ξ±] {B : Profinite.{u}} (X : Ξ± β†’ Profinite.{u}) (Ο€ : (a : Ξ±) β†’ (X a ⟢ B)) : TFAE [ EffectiveEpiFamily X Ο€ , Epi (Sigma.desc Ο€) , βˆ€ b : B, βˆƒ (a : Ξ±) (x : X a), Ο€ a x = b ] := by
tfae_have 2 β†’ 1 Β· intro simpa [← effectiveEpi_desc_iff_effectiveEpiFamily, (effectiveEpi_tfae (Sigma.desc Ο€)).out 0 1] tfae_have 1 β†’ 2 Β· intro; infer_instance tfae_have 3 ↔ 1 Β· erw [((CompHaus.effectiveEpiFamily_tfae (fun a ↦ profiniteToCompHaus.obj (X a)) (fun a ↦ profiniteToCompHaus.map (Ο€ a)))...
[ " { toFun := fun x => a, continuous_toFun := β‹― } ≫ Ο€ = { toFun := fun x => b, continuous_toFun := β‹― } ≫ Ο€", " ({ toFun := fun x => a, continuous_toFun := β‹― } ≫ Ο€) x✝ = ({ toFun := fun x => b, continuous_toFun := β‹― } ≫ Ο€) x✝", " g = (fun {W} e h => β‹―.lift e β‹―) e β‹―", " g = β‹―.liftEquiv ⟨e, β‹―βŸ©", " β‹―.liftEquiv.s...
[ " { toFun := fun x => a, continuous_toFun := β‹― } ≫ Ο€ = { toFun := fun x => b, continuous_toFun := β‹― } ≫ Ο€", " ({ toFun := fun x => a, continuous_toFun := β‹― } ≫ Ο€) x✝ = ({ toFun := fun x => b, continuous_toFun := β‹― } ≫ Ο€) x✝", " g = (fun {W} e h => β‹―.lift e β‹―) e β‹―", " g = β‹―.liftEquiv ⟨e, β‹―βŸ©", " β‹―.liftEquiv.s...
import Mathlib.Algebra.EuclideanDomain.Defs import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Algebra.Ring.Regular import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Ring.Basic #align_import algebra.euclidean_domain.basic from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d0...
Mathlib/Algebra/EuclideanDomain/Basic.lean
84
85
theorem div_self {a : R} (a0 : a β‰  0) : a / a = 1 := by
simpa only [one_mul] using mul_div_cancel_rightβ‚€ 1 a0
[ " a * b / b = a", " a - a * b / b = 0", " False", " b ∣ a", " b ∣ b * (a / b)", " a % b = 0", " b * c = b * (b * c / b)", " c ∣ a % b ↔ c ∣ a", " 0 / a = 0", " a / a = 1" ]
[ " a * b / b = a", " a - a * b / b = 0", " False", " b ∣ a", " b ∣ b * (a / b)", " a % b = 0", " b * c = b * (b * c / b)", " c ∣ a % b ↔ c ∣ a", " 0 / a = 0" ]
import Mathlib.Data.Set.Image import Mathlib.Data.List.GetD #align_import data.set.list from "leanprover-community/mathlib"@"2ec920d35348cb2d13ac0e1a2ad9df0fdf1a76b4" open List variable {Ξ± Ξ² : Type*} (l : List Ξ±) namespace Set theorem range_list_map (f : Ξ± β†’ Ξ²) : range (map f) = { l | βˆ€ x ∈ l, x ∈ range f } :=...
Mathlib/Data/Set/List.lean
38
40
theorem range_list_get : range l.get = { x | x ∈ l } := by
ext x rw [mem_setOf_eq, mem_iff_get, mem_range]
[ " range (map f) = {l | βˆ€ x ∈ l, x ∈ range f}", " l ∈ range (map f)", " [] ∈ range (map f)", " a :: l ∈ range (map f)", " a :: map f l ∈ range (map f)", " f a :: map f l ∈ range (map f)", " range (map Subtype.val) = {l | βˆ€ x ∈ l, x ∈ s}", " range l.get = {x | x ∈ l}", " x ∈ range l.get ↔ x ∈ {x | x ∈...
[ " range (map f) = {l | βˆ€ x ∈ l, x ∈ range f}", " l ∈ range (map f)", " [] ∈ range (map f)", " a :: l ∈ range (map f)", " a :: map f l ∈ range (map f)", " f a :: map f l ∈ range (map f)", " range (map Subtype.val) = {l | βˆ€ x ∈ l, x ∈ s}" ]
import Mathlib.Analysis.Normed.Group.Quotient import Mathlib.Topology.Instances.AddCircle #align_import analysis.normed.group.add_circle from "leanprover-community/mathlib"@"084f76e20c88eae536222583331abd9468b08e1c" noncomputable section open Set open Int hiding mem_zmultiples_iff open AddSubgroup namespace A...
Mathlib/Analysis/Normed/Group/AddCircle.lean
44
68
theorem norm_coe_mul (x : ℝ) (t : ℝ) : β€–(↑(t * x) : AddCircle (t * p))β€– = |t| * β€–(x : AddCircle p)β€– := by
have aux : βˆ€ {a b c : ℝ}, a ∈ zmultiples b β†’ c * a ∈ zmultiples (c * b) := fun {a b c} h => by simp only [mem_zmultiples_iff] at h ⊒ obtain ⟨n, rfl⟩ := h exact ⟨n, (mul_smul_comm n c b).symm⟩ rcases eq_or_ne t 0 with (rfl | ht); Β· simp have ht' : |t| β‰  0 := (not_congr abs_eq_zero).mpr ht simp only ...
[ " ‖↑(t * x)β€– = |t| * ‖↑xβ€–", " c * a ∈ zmultiples (c * b)", " βˆƒ k, k β€’ (c * b) = c * a", " βˆƒ k, k β€’ (c * b) = c * n β€’ b", " ‖↑(0 * x)β€– = |0| * ‖↑xβ€–", " sInf ((fun a => |a|) '' {m | ↑m = ↑(t * x)}) = |t| * sInf ((fun a => |a|) '' {m | ↑m = ↑x})", "p x t : ℝ\naux : βˆ€ {a b c : ℝ}, a ∈ zmultiples b β†’ c * a ∈...
[]
import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.OrdConnected #align_import data.set.intervals.proj_Icc from "leanprover-community/mathlib"@"4e24c4bfcff371c71f7ba22050308aa17815626c" variable {α β : Type*} [LinearOrder α] open Function namespace Set def projIci (a x : α) : Ici a := ⟨max a x,...
Mathlib/Order/Interval/Set/ProjIcc.lean
99
99
theorem projIci_eq_self : projIci a x = ⟨a, le_rfl⟩ ↔ x ≀ a := by
simp [projIci, Subtype.ext_iff]
[ " projIcc a b h x = ⟨a, β‹―βŸ©", " projIcc a b h x = ⟨b, β‹―βŸ©", " projIci a x = ⟨a, β‹―βŸ© ↔ x ≀ a" ]
[ " projIcc a b h x = ⟨a, β‹―βŸ©", " projIcc a b h x = ⟨b, β‹―βŸ©" ]
import Mathlib.Analysis.Complex.UpperHalfPlane.Topology import Mathlib.Analysis.SpecialFunctions.Arsinh import Mathlib.Geometry.Euclidean.Inversion.Basic #align_import analysis.complex.upper_half_plane.metric from "leanprover-community/mathlib"@"caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c" noncomputable section ope...
Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean
76
84
theorem sinh_half_dist_add_dist (a b c : ℍ) : sinh ((dist a b + dist b c) / 2) = (dist (a : β„‚) b * dist (c : β„‚) (conj ↑b) + dist (b : β„‚) c * dist (a : β„‚) (conj ↑b)) / (2 * √(a.im * c.im) * dist (b : β„‚) (conj ↑b)) := by
simp only [add_div _ _ (2 : ℝ), sinh_add, sinh_half_dist, cosh_half_dist, div_mul_div_comm] rw [← add_div, Complex.dist_self_conj, coe_im, abs_of_pos b.im_pos, mul_comm (dist (b : β„‚) _), dist_comm (b : β„‚), Complex.dist_conj_comm, mul_mul_mul_comm, mul_mul_mul_comm _ _ _ b.im] congr 2 rw [sqrt_mul, sqrt_mul...
[ " (dist z w / 2).sinh = dist ↑z ↑w / (2 * √(z.im * w.im))", " (dist z w / 2).cosh = dist (↑z) ((starRingEnd β„‚) ↑w) / (2 * √(z.im * w.im))", " (2 ^ 2 * (z.im * w.im) + dist ↑z ↑w ^ 2) / (2 ^ 2 * (z.im * w.im)) =\n dist (↑z) ((starRingEnd β„‚) ↑w) ^ 2 / (2 ^ 2 * (z.im * w.im))", " 2 ^ 2 * (z.im * w.im) + dist ...
[ " (dist z w / 2).sinh = dist ↑z ↑w / (2 * √(z.im * w.im))", " (dist z w / 2).cosh = dist (↑z) ((starRingEnd β„‚) ↑w) / (2 * √(z.im * w.im))", " (2 ^ 2 * (z.im * w.im) + dist ↑z ↑w ^ 2) / (2 ^ 2 * (z.im * w.im)) =\n dist (↑z) ((starRingEnd β„‚) ↑w) ^ 2 / (2 ^ 2 * (z.im * w.im))", " 2 ^ 2 * (z.im * w.im) + dist ...
import Mathlib.Analysis.Calculus.TangentCone import Mathlib.Analysis.NormedSpace.OperatorNorm.Asymptotics #align_import analysis.calculus.fderiv.basic from "leanprover-community/mathlib"@"41bef4ae1254365bc190aee63b947674d2977f01" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open To...
Mathlib/Analysis/Calculus/FDeriv/Basic.lean
216
217
theorem fderivWithin_zero_of_isolated (h : 𝓝[s \ {x}] x = βŠ₯) : fderivWithin π•œ f s x = 0 := by
rw [fderivWithin, if_pos h]
[ " fderivWithin π•œ f s x = 0" ]
[]
import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Ring.Commute import Mathlib.Algebra.Ring.Invertible import Mathlib.Order.Synonym #align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102" open Function ...
Mathlib/Algebra/Field/Basic.lean
126
126
theorem neg_div_neg_eq (a b : K) : -a / -b = a / b := by
rw [div_neg_eq_neg_div, neg_div, neg_neg]
[ " -1 * -1 = 1", " 1 / -a = 1 / (-1 * a)", " 1 / (-1 * a) = 1 / a * (1 / -1)", " 1 / a * (1 / -1) = 1 / a * -1", " 1 / a * -1 = -(1 / a)", " b / -a = b * (1 / -a)", " b * (1 / -a) = b * -(1 / a)", " b * -(1 / a) = -(b * (1 / a))", " -(b * (1 / a)) = -(b / a)", " -b / a = -(b / a)", " -(b / a) = -...
[ " -1 * -1 = 1", " 1 / -a = 1 / (-1 * a)", " 1 / (-1 * a) = 1 / a * (1 / -1)", " 1 / a * (1 / -1) = 1 / a * -1", " 1 / a * -1 = -(1 / a)", " b / -a = b * (1 / -a)", " b * (1 / -a) = b * -(1 / a)", " b * -(1 / a) = -(b * (1 / a))", " -(b * (1 / a)) = -(b / a)", " -b / a = -(b / a)", " -(b / a) = -...
import Mathlib.Algebra.Polynomial.Monic #align_import algebra.polynomial.big_operators from "leanprover-community/mathlib"@"47adfab39a11a072db552f47594bf8ed2cf8a722" open Finset open Multiset open Polynomial universe u w variable {R : Type u} {ΞΉ : Type w} namespace Polynomial variable (s : Finset ΞΉ) sectio...
Mathlib/Algebra/Polynomial/BigOperators.lean
263
265
theorem prod_X_sub_C_nextCoeff {s : Finset ΞΉ} (f : ΞΉ β†’ R) : nextCoeff (∏ i ∈ s, (X - C (f i))) = -βˆ‘ i ∈ s, f i := by
simpa using multiset_prod_X_sub_C_nextCoeff (s.1.map f)
[ " (Multiset.map (fun x => X - C x) t).prod.nextCoeff = -t.sum", " (Multiset.map (fun i => (X - C i).nextCoeff) t).sum = -t.sum", " (Multiset.map (fun x => -x) t).sum = -t.sum", " βˆ€ i ∈ t, (X - C i).Monic", " (X - C i✝).Monic", " (∏ i ∈ s, (X - C (f i))).nextCoeff = -βˆ‘ i ∈ s, f i" ]
[ " (Multiset.map (fun x => X - C x) t).prod.nextCoeff = -t.sum", " (Multiset.map (fun i => (X - C i).nextCoeff) t).sum = -t.sum", " (Multiset.map (fun x => -x) t).sum = -t.sum", " βˆ€ i ∈ t, (X - C i).Monic", " (X - C i✝).Monic" ]
import Mathlib.RingTheory.Polynomial.Cyclotomic.Basic import Mathlib.RingTheory.RootsOfUnity.Minpoly #align_import ring_theory.polynomial.cyclotomic.roots from "leanprover-community/mathlib"@"7fdeecc0d03cd40f7a165e6cf00a4d2286db599f" namespace Polynomial variable {R : Type*} [CommRing R] {n : β„•}
Mathlib/RingTheory/Polynomial/Cyclotomic/Roots.lean
40
49
theorem isRoot_of_unity_of_root_cyclotomic {ΞΆ : R} {i : β„•} (hi : i ∈ n.divisors) (h : (cyclotomic i R).IsRoot ΞΆ) : ΞΆ ^ n = 1 := by
rcases n.eq_zero_or_pos with (rfl | hn) Β· exact pow_zero _ have := congr_arg (eval ΞΆ) (prod_cyclotomic_eq_X_pow_sub_one hn R).symm rw [eval_sub, eval_pow, eval_X, eval_one] at this convert eq_add_of_sub_eq' this convert (add_zero (M := R) _).symm apply eval_eq_zero_of_dvd_of_eval_eq_zero _ h exact Fins...
[ " ΢ ^ n = 1", " ΢ ^ 0 = 1", " 1 = 1 + eval ΢ (∏ i ∈ n.divisors, cyclotomic i R)", " eval ΢ (∏ i ∈ n.divisors, cyclotomic i R) = 0", " cyclotomic i R ∣ ∏ i ∈ n.divisors, cyclotomic i R" ]
[]
import Mathlib.Algebra.Order.Monoid.Unbundled.Pow import Mathlib.Data.Finset.Fold import Mathlib.Data.Finset.Option import Mathlib.Data.Finset.Pi import Mathlib.Data.Finset.Prod import Mathlib.Data.Multiset.Lattice import Mathlib.Data.Set.Lattice import Mathlib.Order.Hom.Lattice import Mathlib.Order.Nat #align_import...
Mathlib/Data/Finset/Lattice.lean
90
93
theorem sup_congr {f g : Ξ² β†’ Ξ±} (hs : s₁ = sβ‚‚) (hfg : βˆ€ a ∈ sβ‚‚, f a = g a) : s₁.sup f = sβ‚‚.sup g := by
subst hs exact Finset.fold_congr hfg
[ " s.sup (f βŠ” g) = s.sup f βŠ” s.sup g", " βˆ….sup (f βŠ” g) = βˆ….sup f βŠ” βˆ….sup g", " (cons a✝ s✝ h✝).sup (f βŠ” g) = (cons a✝ s✝ h✝).sup f βŠ” (cons a✝ s✝ h✝).sup g", " (f βŠ” g) a✝ βŠ” (s✝.sup f βŠ” s✝.sup g) = f a✝ βŠ” s✝.sup f βŠ” (g a✝ βŠ” s✝.sup g)", " s₁.sup f = sβ‚‚.sup g", " s₁.sup f = s₁.sup g" ]
[ " s.sup (f βŠ” g) = s.sup f βŠ” s.sup g", " βˆ….sup (f βŠ” g) = βˆ….sup f βŠ” βˆ….sup g", " (cons a✝ s✝ h✝).sup (f βŠ” g) = (cons a✝ s✝ h✝).sup f βŠ” (cons a✝ s✝ h✝).sup g", " (f βŠ” g) a✝ βŠ” (s✝.sup f βŠ” s✝.sup g) = f a✝ βŠ” s✝.sup f βŠ” (g a✝ βŠ” s✝.sup g)" ]
import Mathlib.Data.Complex.Exponential import Mathlib.Analysis.SpecialFunctions.Log.Deriv #align_import data.complex.exponential_bounds from "leanprover-community/mathlib"@"402f8982dddc1864bd703da2d6e2ee304a866973" namespace Real open IsAbsoluteValue Finset CauSeq Complex theorem exp_one_near_10 : |exp 1 - 224...
Mathlib/Data/Complex/ExponentialBounds.lean
51
55
theorem exp_neg_one_lt_d9 : exp (-1) < 0.3678794412 := by
rw [exp_neg, inv_lt (exp_pos _)] Β· refine lt_of_lt_of_le ?_ (sub_le_comm.1 (abs_sub_le_iff.1 exp_one_near_10).2) norm_num Β· norm_num
[ " |rexp 1 - 2244083 / 825552| ≀ 1 / 10 ^ 10", " |rexp 1 - expNear 0 1 (2244083 / 825552)| ≀ |1| ^ 0 / ↑(Nat.factorial 0) * (1 / 10 ^ 10)", " 0 + 1 = ?m.532", " 1 = ?m.532", " ↑1 = ?m.543", " |rexp 1 - expNear 1 1 ((2244083 / 825552 - 1) * 1)| ≀ |1| ^ 1 / ↑(Nat.factorial 1) * (1 / 10 ^ 10 * 1)", " 1 + 1 ...
[ " |rexp 1 - 2244083 / 825552| ≀ 1 / 10 ^ 10", " |rexp 1 - expNear 0 1 (2244083 / 825552)| ≀ |1| ^ 0 / ↑(Nat.factorial 0) * (1 / 10 ^ 10)", " 0 + 1 = ?m.532", " 1 = ?m.532", " ↑1 = ?m.543", " |rexp 1 - expNear 1 1 ((2244083 / 825552 - 1) * 1)| ≀ |1| ^ 1 / ↑(Nat.factorial 1) * (1 / 10 ^ 10 * 1)", " 1 + 1 ...
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
147
152
theorem eq_pow_of_mul_eq_pow_bit1_left {a b c : β„€} (hab : IsCoprime a b) {k : β„•} (h : a * b = c ^ bit1 k) : βˆƒ d, a = d ^ bit1 k := by
obtain ⟨d, hd⟩ := exists_associated_pow_of_mul_eq_pow' hab h replace hd := hd.symm rw [associated_iff_natAbs, natAbs_eq_natAbs_iff, ← neg_pow_bit1] at hd obtain rfl | rfl := hd <;> exact ⟨_, rfl⟩
[ " p ∣ m.natAbs ∨ p ∣ n.natAbs", " ↑p ∣ m ∨ ↑p ∣ n", " p ∣ n.natAbs", " ↑p ∣ n", " p = 2 ∨ p ∣ m.natAbs", " p = 2", " p ∣ m.natAbs", " βˆƒ p, Prime p ∧ p ∣ n", " Ideal.span {↑a.natAbs} = Ideal.span {a}", " Associated (↑a.natAbs) a", " βˆƒ d, a = d ^ bit1 k", " βˆƒ d_1, d ^ bit1 k = d_1 ^ bit1 k", "...
[ " p ∣ m.natAbs ∨ p ∣ n.natAbs", " ↑p ∣ m ∨ ↑p ∣ n", " p ∣ n.natAbs", " ↑p ∣ n", " p = 2 ∨ p ∣ m.natAbs", " p = 2", " p ∣ m.natAbs", " βˆƒ p, Prime p ∧ p ∣ n", " Ideal.span {↑a.natAbs} = Ideal.span {a}", " Associated (↑a.natAbs) a" ]
import Mathlib.Algebra.Order.Ring.Nat #align_import data.nat.dist from "leanprover-community/mathlib"@"d50b12ae8e2bd910d08a94823976adae9825718b" namespace Nat def dist (n m : β„•) := n - m + (m - n) #align nat.dist Nat.dist -- Should be aligned to `Nat.dist.eq_def`, but that is generated on demand and isn't pr...
Mathlib/Data/Nat/Dist.lean
74
78
theorem dist_add_add_right (n k m : β„•) : dist (n + k) (m + k) = dist n m := calc dist (n + k) (m + k) = n + k - (m + k) + (m + k - (n + k)) := rfl _ = n - m + (m + k - (n + k)) := by
rw [@add_tsub_add_eq_tsub_right] _ = n - m + (m - n) := by rw [@add_tsub_add_eq_tsub_right]
[ " n.dist m = m.dist n", " n.dist n = 0", " n.dist m = 0", " n.dist m = m - n", " n.dist m = n - m", " m.dist n = n - m", " m ≀ n + n.dist m", " m ≀ n.dist m + n", " n ≀ n.dist m + m", " n ≀ m.dist n + m", " n ≀ m + n.dist m", " n ≀ m + m.dist n", " n + k - (m + k) + (m + k - (n + k)) = n - m...
[ " n.dist m = m.dist n", " n.dist n = 0", " n.dist m = 0", " n.dist m = m - n", " n.dist m = n - m", " m.dist n = n - m", " m ≀ n + n.dist m", " m ≀ n.dist m + n", " n ≀ n.dist m + m", " n ≀ m.dist n + m", " n ≀ m + n.dist m", " n ≀ m + m.dist n" ]
import Mathlib.ModelTheory.Quotients import Mathlib.Order.Filter.Germ import Mathlib.Order.Filter.Ultrafilter #align_import model_theory.ultraproducts from "leanprover-community/mathlib"@"f1ae620609496a37534c2ab3640b641d5be8b6f0" universe u v variable {Ξ± : Type*} (M : Ξ± β†’ Type*) (u : Ultrafilter Ξ±) open FirstOr...
Mathlib/ModelTheory/Ultraproducts.lean
96
144
theorem boundedFormula_realize_cast {Ξ² : Type*} {n : β„•} (Ο† : L.BoundedFormula Ξ² n) (x : Ξ² β†’ βˆ€ a, M a) (v : Fin n β†’ βˆ€ a, M a) : (Ο†.Realize (fun i : Ξ² => (x i : (u : Filter Ξ±).Product M)) (fun i => (v i : (u : Filter Ξ±).Product M))) ↔ βˆ€αΆ  a : Ξ± in u, Ο†.Realize (fun i : Ξ² => x i a) fun i => v i a := b...
letI := (u : Filter Ξ±).productSetoid M induction' Ο† with _ _ _ _ _ _ _ _ m _ _ ih ih' k Ο† ih Β· simp only [BoundedFormula.Realize, eventually_const] Β· have h2 : βˆ€ a : Ξ±, (Sum.elim (fun i : Ξ² => x i a) fun i => v i a) = fun i => Sum.elim x v i a := fun a => funext fun i => Sum.casesOn i (fun i => rfl) fun ...
[ " funMap f x β‰ˆ funMap f y", " a ∈ {x_1 | (fun a => funMap f x a = funMap f y a) x_1}", " RelMap r x = RelMap r y", " RelMap r x ↔ RelMap r y", " RelMap r y", " {x_1 | (fun a => RelMap r fun i => x i a) x_1} ∩ β‹‚ i, {x_1 | (fun a => x i a = y i a) x_1} βŠ†\n {x | (fun a => RelMap r fun i => y i a) x}", "...
[ " funMap f x β‰ˆ funMap f y", " a ∈ {x_1 | (fun a => funMap f x a = funMap f y a) x_1}", " RelMap r x = RelMap r y", " RelMap r x ↔ RelMap r y", " RelMap r y", " {x_1 | (fun a => RelMap r fun i => x i a) x_1} ∩ β‹‚ i, {x_1 | (fun a => x i a = y i a) x_1} βŠ†\n {x | (fun a => RelMap r fun i => y i a) x}", "...
import Mathlib.Data.List.Basic #align_import data.list.palindrome from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec" variable {Ξ± Ξ² : Type*} namespace List inductive Palindrome : List Ξ± β†’ Prop | nil : Palindrome [] | singleton : βˆ€ x, Palindrome [x] | cons_concat : βˆ€ (x) {l}, Pa...
Mathlib/Data/List/Palindrome.lean
68
70
theorem append_reverse (l : List Ξ±) : Palindrome (l ++ reverse l) := by
apply of_reverse_eq rw [reverse_append, reverse_reverse]
[ " l.reverse = l", " [].reverse = []", " [x✝].reverse = [x✝]", " (x✝ :: (l✝ ++ [x✝])).reverse = x✝ :: (l✝ ++ [x✝])", " l.reverse = l β†’ l.Palindrome", " βˆ€ (a : Ξ±) (l : List Ξ±) (b : Ξ±),\n (l.reverse = l β†’ l.Palindrome) β†’ (a :: (l ++ [b])).reverse = a :: (l ++ [b]) β†’ (a :: (l ++ [b])).Palindrome", " (x :...
[ " l.reverse = l", " [].reverse = []", " [x✝].reverse = [x✝]", " (x✝ :: (l✝ ++ [x✝])).reverse = x✝ :: (l✝ ++ [x✝])", " l.reverse = l β†’ l.Palindrome", " βˆ€ (a : Ξ±) (l : List Ξ±) (b : Ξ±),\n (l.reverse = l β†’ l.Palindrome) β†’ (a :: (l ++ [b])).reverse = a :: (l ++ [b]) β†’ (a :: (l ++ [b])).Palindrome", " (x :...
import Mathlib.Data.Finset.Image #align_import data.finset.card from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" assert_not_exists MonoidWithZero -- TODO: After a lot more work, -- assert_not_exists OrderedCommMonoid open Function Multiset Nat variable {Ξ± Ξ² R : Type*} namespace Fin...
Mathlib/Data/Finset/Card.lean
114
118
theorem card_insert_le (a : Ξ±) (s : Finset Ξ±) : card (insert a s) ≀ s.card + 1 := by
by_cases h : a ∈ s · rw [insert_eq_of_mem h] exact Nat.le_succ _ · rw [card_insert_of_not_mem h]
[ " Monotone card", " ({a} ∩ s).card ≀ 1", " (insert a s).card = s.card + 1", " (insert a s).card = s.card", " (insert a s).card ≀ s.card + 1", " s.card ≀ s.card + 1" ]
[ " Monotone card", " ({a} ∩ s).card ≀ 1", " (insert a s).card = s.card + 1", " (insert a s).card = s.card" ]
import Mathlib.Data.Set.Lattice import Mathlib.Order.Directed #align_import data.set.Union_lift from "leanprover-community/mathlib"@"5a4ea8453f128345f73cc656e80a49de2a54f481" variable {Ξ± : Type*} {ΞΉ Ξ² : Sort _} namespace Set section UnionLift @[nolint unusedArguments] noncomputable def iUnionLift (S : ΞΉ β†’ Set...
Mathlib/Data/Set/UnionLift.lean
75
76
theorem iUnionLift_of_mem (x : T) {i : ι} (hx : (x : α) ∈ S i) : iUnionLift S f hf T hT x = f i ⟨x, hx⟩ := by
cases' x with x hx; exact hf _ _ _ _ _
[ " iUnionLift S f hf T hT x = f i βŸ¨β†‘x, hx⟩", " iUnionLift S f hf T hT ⟨x, hx✝⟩ = f i βŸ¨β†‘βŸ¨x, hx✝⟩, hx⟩" ]
[]
import Mathlib.AlgebraicTopology.DoldKan.FunctorGamma import Mathlib.AlgebraicTopology.DoldKan.SplitSimplicialObject import Mathlib.CategoryTheory.Idempotents.HomologicalComplex #align_import algebraic_topology.dold_kan.gamma_comp_n from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" no...
Mathlib/AlgebraicTopology/DoldKan/GammaCompN.lean
86
91
theorem N₁Γ₀_hom_app (K : ChainComplex C β„•) : N₁Γ₀.hom.app K = (Ξ“β‚€.splitting K).toKaroubiNondegComplexIsoN₁.inv ≫ (toKaroubi _).map (Ξ“β‚€NondegComplexIso K).hom := by
change (N₁Γ₀.app K).hom = _ simp only [N₁Γ₀_app] rfl
[ " βˆ€ (i j : β„•),\n (ComplexShape.down β„•).Rel i j β†’\n ((fun n => Iso.refl ((Ξ“β‚€.splitting K).nondegComplex.X n)) i).hom ≫ K.d i j =\n (Ξ“β‚€.splitting K).nondegComplex.d i j ≫ ((fun n => Iso.refl ((Ξ“β‚€.splitting K).nondegComplex.X n)) j).hom", " ((fun n => Iso.refl ((Ξ“β‚€.splitting K).nondegComplex.X n)) (n ...
[ " βˆ€ (i j : β„•),\n (ComplexShape.down β„•).Rel i j β†’\n ((fun n => Iso.refl ((Ξ“β‚€.splitting K).nondegComplex.X n)) i).hom ≫ K.d i j =\n (Ξ“β‚€.splitting K).nondegComplex.d i j ≫ ((fun n => Iso.refl ((Ξ“β‚€.splitting K).nondegComplex.X n)) j).hom", " ((fun n => Iso.refl ((Ξ“β‚€.splitting K).nondegComplex.X n)) (n ...
import Mathlib.Algebra.Polynomial.Eval import Mathlib.RingTheory.Ideal.Quotient #align_import linear_algebra.smodeq from "leanprover-community/mathlib"@"146d3d1fa59c091fedaad8a4afa09d6802886d24" open Submodule open Polynomial variable {R : Type*} [Ring R] variable {A : Type*} [CommRing A] variable {M : Type*} [...
Mathlib/LinearAlgebra/SModEq.lean
102
102
theorem zero : x ≑ 0 [SMOD U] ↔ x ∈ U := by
rw [SModEq.def, Submodule.Quotient.eq, sub_zero]
[ " x ≑ y [SMOD U] ↔ x - y ∈ U", " x ≑ y [SMOD βŠ₯] ↔ x = y", " x₁ + xβ‚‚ ≑ y₁ + yβ‚‚ [SMOD U]", " Submodule.Quotient.mk (x₁ + xβ‚‚) = Submodule.Quotient.mk (y₁ + yβ‚‚)", " c β€’ x ≑ c β€’ y [SMOD U]", " Submodule.Quotient.mk (c β€’ x) = Submodule.Quotient.mk (c β€’ y)", " x₁ * xβ‚‚ ≑ y₁ * yβ‚‚ [SMOD I]", " (Ideal.Quotient.m...
[ " x ≑ y [SMOD U] ↔ x - y ∈ U", " x ≑ y [SMOD βŠ₯] ↔ x = y", " x₁ + xβ‚‚ ≑ y₁ + yβ‚‚ [SMOD U]", " Submodule.Quotient.mk (x₁ + xβ‚‚) = Submodule.Quotient.mk (y₁ + yβ‚‚)", " c β€’ x ≑ c β€’ y [SMOD U]", " Submodule.Quotient.mk (c β€’ x) = Submodule.Quotient.mk (c β€’ y)", " x₁ * xβ‚‚ ≑ y₁ * yβ‚‚ [SMOD I]", " (Ideal.Quotient.m...
import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.Analysis.SumIntegralComparisons import Mathlib.NumberTheory.Harmonic.Defs theorem log_add_one_le_harmonic (n : β„•) : Real.log ↑(n+1) ≀ harmonic n := by calc _ = ∫ x in (1:β„•)..↑(n+1), x⁻¹ := ?_ _ ≀ βˆ‘ d ∈ Finset.Icc 1 n, (d:ℝ)⁻¹ := ?_ ...
Mathlib/NumberTheory/Harmonic/Bounds.lean
64
69
theorem harmonic_floor_le_one_add_log (y : ℝ) (hy : 1 ≀ y) : harmonic ⌊yβŒ‹β‚Š ≀ 1 + Real.log y := by
refine (harmonic_le_one_add_log _).trans ?_ gcongr Β· exact_mod_cast Nat.floor_pos.mpr hy Β· exact Nat.floor_le <| zero_le_one.trans hy
[ " (↑(n + 1)).log ≀ ↑(harmonic n)", " (↑(n + 1)).log = ∫ (x : ℝ) in ↑1 ..↑(n + 1), x⁻¹", " 0 βˆ‰ Set.uIcc 1 ↑(n + 1)", " Β¬1 ≀ 0", " ∫ (x : ℝ) in ↑1 ..↑(n + 1), x⁻¹ ≀ βˆ‘ d ∈ Finset.Icc 1 n, (↑d)⁻¹", " 0 < ↑1", " βˆ‘ d ∈ Finset.Icc 1 n, (↑d)⁻¹ = ↑(harmonic n)", " ↑(harmonic n) ≀ 1 + (↑n).log", " βˆ‘ x ∈ Finse...
[ " (↑(n + 1)).log ≀ ↑(harmonic n)", " (↑(n + 1)).log = ∫ (x : ℝ) in ↑1 ..↑(n + 1), x⁻¹", " 0 βˆ‰ Set.uIcc 1 ↑(n + 1)", " Β¬1 ≀ 0", " ∫ (x : ℝ) in ↑1 ..↑(n + 1), x⁻¹ ≀ βˆ‘ d ∈ Finset.Icc 1 n, (↑d)⁻¹", " 0 < ↑1", " βˆ‘ d ∈ Finset.Icc 1 n, (↑d)⁻¹ = ↑(harmonic n)", " ↑(harmonic n) ≀ 1 + (↑n).log", " βˆ‘ x ∈ Finse...
import Mathlib.Analysis.BoxIntegral.Box.Basic import Mathlib.Analysis.SpecificLimits.Basic #align_import analysis.box_integral.box.subbox_induction from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Finset Function Filter Metric Classical Topology Filter ENNReal noncomputable...
Mathlib/Analysis/BoxIntegral/Box/SubboxInduction.lean
122
170
theorem subbox_induction_on' {p : Box ΞΉ β†’ Prop} (I : Box ΞΉ) (H_ind : βˆ€ J ≀ I, (βˆ€ s, p (splitCenterBox J s)) β†’ p J) (H_nhds : βˆ€ z ∈ Box.Icc I, βˆƒ U ∈ 𝓝[Box.Icc I] z, βˆ€ J ≀ I, βˆ€ (m : β„•), z ∈ Box.Icc J β†’ Box.Icc J βŠ† U β†’ (βˆ€ i, J.upper i - J.lower i = (I.upper i - I.lower i) / 2 ^ m) β†’ p J) : p I := by
by_contra hpI -- First we use `H_ind` to construct a decreasing sequence of boxes such that `βˆ€ m, Β¬p (J m)`. replace H_ind := fun J hJ ↦ not_imp_not.2 (H_ind J hJ) simp only [exists_imp, not_forall] at H_ind choose! s hs using H_ind set J : β„• β†’ Box ΞΉ := fun m ↦ (fun J ↦ splitCenterBox J (s J))^[m] I have...
[ " s.piecewise (fun i => (I.lower i + I.upper i) / 2) I.lower i <\n s.piecewise I.upper (fun i => (I.lower i + I.upper i) / 2) i", " (if i ∈ s then (I.lower i + I.upper i) / 2 else I.lower i) < if i ∈ s then I.upper i else (I.lower i + I.upper i) / 2", " (I.lower i + I.upper i) / 2 < I.upper i", " I.lower i...
[ " s.piecewise (fun i => (I.lower i + I.upper i) / 2) I.lower i <\n s.piecewise I.upper (fun i => (I.lower i + I.upper i) / 2) i", " (if i ∈ s then (I.lower i + I.upper i) / 2 else I.lower i) < if i ∈ s then I.upper i else (I.lower i + I.upper i) / 2", " (I.lower i + I.upper i) / 2 < I.upper i", " I.lower i...
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
109
113
theorem setIntegral_eq [SigmaFiniteFiltration ΞΌ β„±] (hf : Martingale f β„± ΞΌ) {i j : ΞΉ} (hij : i ≀ j) {s : Set Ξ©} (hs : MeasurableSet[β„± i] s) : ∫ Ο‰ in s, f i Ο‰ βˆ‚ΞΌ = ∫ Ο‰ in s, f j Ο‰ βˆ‚ΞΌ := by
rw [← @setIntegral_condexp _ _ _ _ _ (β„± i) m0 _ _ _ (β„±.le i) _ (hf.integrable j) hs] refine setIntegral_congr_ae (β„±.le i s hs) ?_ filter_upwards [hf.2 i j hij] with _ heq _ using heq.symm
[ " ΞΌ[(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" ]
import Mathlib.Tactic.CategoryTheory.Elementwise import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer import Mathlib.CategoryTheory.Limits.Constructions.EpiMono import Mathlib.CategoryTheory.Limits.Preserves.Limits import Mathlib.CategoryTheory.Limits.Shapes.Types #align_import category_theory.glue_data from "l...
Mathlib/CategoryTheory/GlueData.lean
123
129
theorem t'_comp_eq_pullbackSymmetry (i j k : D.J) : D.t' j k i ≫ D.t' k i j = (pullbackSymmetry _ _).hom ≫ D.t' j i k ≫ (pullbackSymmetry _ _).hom := by
trans inv (D.t' i j k) Β· exact IsIso.eq_inv_of_hom_inv_id (D.cocycle _ _ _) Β· rw [← cancel_mono (pullback.fst : pullback (D.f i j) (D.f i k) ⟢ _)] simp [t_fac, t_fac_assoc]
[ " D.t' i i j = (pullbackSymmetry (D.f i i) (D.f i j)).hom", " D.t' j i i = pullback.fst ≫ D.t j i ≫ inv pullback.snd", " D.t' j i i = (D.t' j i i ≫ pullback.snd) ≫ inv pullback.snd", " D.t' i j i = pullback.fst ≫ D.t i j ≫ inv pullback.snd", " D.t' i j i = (D.t' i j i ≫ pullback.snd) ≫ inv pullback.snd", ...
[ " D.t' i i j = (pullbackSymmetry (D.f i i) (D.f i j)).hom", " D.t' j i i = pullback.fst ≫ D.t j i ≫ inv pullback.snd", " D.t' j i i = (D.t' j i i ≫ pullback.snd) ≫ inv pullback.snd", " D.t' i j i = pullback.fst ≫ D.t i j ≫ inv pullback.snd", " D.t' i j i = (D.t' i j i ≫ pullback.snd) ≫ inv pullback.snd", ...
import Mathlib.Analysis.Complex.Circle import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup #align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5" noncomputable section open Complex open ComplexConjugate ...
Mathlib/Analysis/Complex/Isometry.lean
60
62
theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by
ext1 simp
[ " Complex.abs (↑a * x) = Complex.abs x", " (rotation a).trans (rotation b) = rotation (b * a)", " ((rotation a).trans (rotation b)) x✝ = (rotation (b * a)) x✝" ]
[ " Complex.abs (↑a * x) = Complex.abs x" ]
import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Ring.Commute import Mathlib.Algebra.Ring.Invertible import Mathlib.Order.Synonym #align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102" open Function ...
Mathlib/Algebra/Field/Basic.lean
66
67
theorem add_div' (a b c : Ξ±) (hc : c β‰  0) : b + a / c = (b * c + a) / c := by
rw [add_div, mul_div_cancel_rightβ‚€ _ hc]
[ " (a + b) / c = a / c + b / c", " (b + a) / b = 1 + a / b", " (a + b) / b = a / b + 1", " 1 / a * (a + b) * (1 / b) = 1 / a + 1 / b", " (a + b / c) * c = a * c + b", " b + a / c = (b * c + a) / c" ]
[ " (a + b) / c = a / c + b / c", " (b + a) / b = 1 + a / b", " (a + b) / b = a / b + 1", " 1 / a * (a + b) * (1 / b) = 1 / a + 1 / b", " (a + b / c) * c = a * c + b" ]
import Mathlib.Algebra.Group.Pi.Basic import Mathlib.CategoryTheory.Limits.Shapes.Products import Mathlib.CategoryTheory.Limits.Shapes.Images import Mathlib.CategoryTheory.IsomorphismClasses import Mathlib.CategoryTheory.Limits.Shapes.ZeroObjects #align_import category_theory.limits.shapes.zero_morphisms from "leanpr...
Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean
150
151
theorem eq_zero_of_image_eq_zero {X Y : C} {f : X ⟢ Y} [HasImage f] (w : image.ι f = 0) : f = 0 := by
rw [← image.fac f, w, HasZeroMorphisms.comp_zero]
[]
[]
import Mathlib.Analysis.Normed.Field.Basic #align_import analysis.normed_space.int from "leanprover-community/mathlib"@"5cc2dfdd3e92f340411acea4427d701dc7ed26f8" namespace Int
Mathlib/Analysis/NormedSpace/Int.lean
24
26
theorem nnnorm_coe_units (e : β„€Λ£) : β€–(e : β„€)β€–β‚Š = 1 := by
obtain rfl | rfl := units_eq_one_or e <;> simp only [Units.coe_neg_one, Units.val_one, nnnorm_neg, nnnorm_one]
[ " ‖↑eβ€–β‚Š = 1", " ‖↑1β€–β‚Š = 1", " ‖↑(-1)β€–β‚Š = 1" ]
[]
import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Analysis.Convex.Hull import Mathlib.LinearAlgebra.AffineSpace.Basis #align_import analysis.convex.combination from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d" open Set Function open scoped Classical open Pointwise ...
Mathlib/Analysis/Convex/Combination.lean
87
88
theorem Finset.centerMass_smul : (t.centerMass w fun i => c β€’ z i) = c β€’ t.centerMass w z := by
simp only [Finset.centerMass, Finset.smul_sum, (mul_smul _ _ _).symm, mul_comm c, mul_assoc]
[ " βˆ….centerMass w z = 0", " {i, j}.centerMass w z = (w i / (w i + w j)) β€’ z i + (w j / (w i + w j)) β€’ z j", " (insert i t).centerMass w z =\n (w i / (w i + βˆ‘ j ∈ t, w j)) β€’ z i + ((βˆ‘ j ∈ t, w j) / (w i + βˆ‘ j ∈ t, w j)) β€’ t.centerMass w z", " (w i / (w i + βˆ‘ i ∈ t, w i)) β€’ z i + (w i + βˆ‘ i ∈ t, w i)⁻¹ β€’ βˆ‘ i ...
[ " βˆ….centerMass w z = 0", " {i, j}.centerMass w z = (w i / (w i + w j)) β€’ z i + (w j / (w i + w j)) β€’ z j", " (insert i t).centerMass w z =\n (w i / (w i + βˆ‘ j ∈ t, w j)) β€’ z i + ((βˆ‘ j ∈ t, w j) / (w i + βˆ‘ j ∈ t, w j)) β€’ t.centerMass w z", " (w i / (w i + βˆ‘ i ∈ t, w i)) β€’ z i + (w i + βˆ‘ i ∈ t, w i)⁻¹ β€’ βˆ‘ i ...
import Mathlib.Logic.Pairwise import Mathlib.Order.CompleteBooleanAlgebra import Mathlib.Order.Directed import Mathlib.Order.GaloisConnection #align_import data.set.lattice from "leanprover-community/mathlib"@"b86832321b586c6ac23ef8cdef6a7a27e42b13bd" open Function Set universe u variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ ΞΉ' ΞΉ...
Mathlib/Data/Set/Lattice.lean
207
211
theorem exists_set_mem_of_union_eq_top {ΞΉ : Type*} (t : Set ΞΉ) (s : ΞΉ β†’ Set Ξ²) (w : ⋃ i ∈ t, s i = ⊀) (x : Ξ²) : βˆƒ i ∈ t, x ∈ s i := by
have p : x ∈ ⊀ := Set.mem_univ x rw [← w, Set.mem_iUnion] at p simpa using p
[ " x ∈ ⋃ i, ⋃ j, s i j ↔ βˆƒ i j, x ∈ s i j", " x ∈ β‹‚ i, β‹‚ j, s i j ↔ βˆ€ (i : ΞΉ) (j : ΞΊ i), x ∈ s i j", " βˆ€ {ΞΉ : Type u_1} {ΞΊ : ΞΉ β†’ Type u_1} (f : (a : ΞΉ) β†’ ΞΊ a β†’ Set Ξ±), β¨… a, ⨆ b, f a b = ⨆ g, β¨… a, f a (g a)", " β¨… a, ⨆ b, f✝ a b = ⨆ g, β¨… a, f✝ a (g a)", " x✝ ∈ β¨… a, ⨆ b, f✝ a b ↔ x✝ ∈ ⨆ g, β¨… a, f✝ a (g a)", "...
[ " x ∈ ⋃ i, ⋃ j, s i j ↔ βˆƒ i j, x ∈ s i j", " x ∈ β‹‚ i, β‹‚ j, s i j ↔ βˆ€ (i : ΞΉ) (j : ΞΊ i), x ∈ s i j", " βˆ€ {ΞΉ : Type u_1} {ΞΊ : ΞΉ β†’ Type u_1} (f : (a : ΞΉ) β†’ ΞΊ a β†’ Set Ξ±), β¨… a, ⨆ b, f a b = ⨆ g, β¨… a, f a (g a)", " β¨… a, ⨆ b, f✝ a b = ⨆ g, β¨… a, f✝ a (g a)", " x✝ ∈ β¨… a, ⨆ b, f✝ a b ↔ x✝ ∈ ⨆ g, β¨… a, f✝ a (g a)", "...
import Mathlib.Combinatorics.SimpleGraph.Connectivity import Mathlib.Data.Nat.Lattice #align_import combinatorics.simple_graph.metric from "leanprover-community/mathlib"@"352ecfe114946c903338006dd3287cb5a9955ff2" namespace SimpleGraph variable {V : Type*} (G : SimpleGraph V) noncomputable def dist (u v : V)...
Mathlib/Combinatorics/SimpleGraph/Metric.lean
137
142
theorem dist_eq_one_iff_adj {u v : V} : G.dist u v = 1 ↔ G.Adj u v := by
refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩ Β· let ⟨w, hw⟩ := exists_walk_of_dist_ne_zero <| ne_zero_of_eq_one h exact w.adj_of_length_eq_one <| h β–Έ hw Β· have : h.toWalk.length = 1 := Walk.length_cons _ _ exact ge_antisymm (h.reachable.pos_dist_of_ne h.ne) (this β–Έ dist_le _)
[ " G.dist u v = 0 ↔ u = v ∨ Β¬G.Reachable u v", " G.dist v v = 0", " G.dist u v = 0 ↔ u = v", " G.dist u v β‰  0", " False", " G.dist u v = 0", " Set.univ.Nonempty", " G.dist u w ≀ G.dist u v + G.dist v w", " G.dist u w ≀ (p.append q).length", " G.dist u v ≀ G.dist v u", " G.dist u v ≀ p.reverse.len...
[ " G.dist u v = 0 ↔ u = v ∨ Β¬G.Reachable u v", " G.dist v v = 0", " G.dist u v = 0 ↔ u = v", " G.dist u v β‰  0", " False", " G.dist u v = 0", " Set.univ.Nonempty", " G.dist u w ≀ G.dist u v + G.dist v w", " G.dist u w ≀ (p.append q).length", " G.dist u v ≀ G.dist v u", " G.dist u v ≀ p.reverse.len...
import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Combinatorics.SimpleGraph.Maps open Finset namespace SimpleGraph variable {V : Type*} [DecidableEq V] (G : SimpleGraph V) (s t : V) section AddEdge def edge : SimpleGraph V := fromEdgeSet {s(s, t)} lemma edge_adj (v w : V) : (edge s t).Adj v w ↔ ...
Mathlib/Combinatorics/SimpleGraph/Operations.lean
171
175
theorem edgeFinset_sup_edge [Fintype (edgeSet (G βŠ” edge s t))] (hn : Β¬G.Adj s t) (h : s β‰  t) : (G βŠ” edge s t).edgeFinset = G.edgeFinset.cons s(s, t) (by simp_all) := by
letI := Classical.decEq V rw [edgeFinset_sup, cons_eq_insert, insert_eq, union_comm] simp_rw [edgeFinset, edge_edgeSet_of_ne h]; rfl
[ " (edge s t).Adj v w ↔ (v = s ∧ w = t ∨ v = t ∧ w = s) ∧ v β‰  w", " Decidable ((edge s t).Adj x✝¹ x✝)", " Decidable ((x✝¹ = s ∧ x✝ = t ∨ x✝¹ = t ∧ x✝ = s) ∧ x✝¹ β‰  x✝)", " edge s s = βŠ₯", " (edge s s).Adj x✝¹ x✝ ↔ βŠ₯.Adj x✝¹ x✝", " (x✝¹ = s ∧ x✝ = s ∨ x✝¹ = s ∧ x✝ = s) ∧ x✝¹ β‰  x✝ ↔ βŠ₯.Adj x✝¹ x✝", " G βŠ” edge...
[ " (edge s t).Adj v w ↔ (v = s ∧ w = t ∨ v = t ∧ w = s) ∧ v β‰  w", " Decidable ((edge s t).Adj x✝¹ x✝)", " Decidable ((x✝¹ = s ∧ x✝ = t ∨ x✝¹ = t ∧ x✝ = s) ∧ x✝¹ β‰  x✝)", " edge s s = βŠ₯", " (edge s s).Adj x✝¹ x✝ ↔ βŠ₯.Adj x✝¹ x✝", " (x✝¹ = s ∧ x✝ = s ∨ x✝¹ = s ∧ x✝ = s) ∧ x✝¹ β‰  x✝ ↔ βŠ₯.Adj x✝¹ x✝", " G βŠ” edge...
import Mathlib.Data.Set.Image import Mathlib.Order.Interval.Set.Basic #align_import data.set.intervals.with_bot_top from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" open Set variable {Ξ± : Type*} namespace WithTop @[simp] theorem preimage_coe_top : (some : Ξ± β†’ WithTop Ξ±) ⁻¹' {⊀} =...
Mathlib/Order/Interval/Set/WithBotTop.lean
67
67
theorem preimage_coe_Ioc : (some : Ξ± β†’ WithTop Ξ±) ⁻¹' Ioc a b = Ioc a b := by
simp [← Ioi_inter_Iic]
[ " range some = Iio ⊀", " x ∈ range some ↔ x ∈ Iio ⊀", " some ⁻¹' Icc ↑a ↑b = Icc a b", " some ⁻¹' Ico ↑a ↑b = Ico a b", " some ⁻¹' Ioc ↑a ↑b = Ioc a b" ]
[ " range some = Iio ⊀", " x ∈ range some ↔ x ∈ Iio ⊀", " some ⁻¹' Icc ↑a ↑b = Icc a b", " some ⁻¹' Ico ↑a ↑b = Ico a b" ]
import Mathlib.Algebra.Group.Defs import Mathlib.Algebra.GroupWithZero.Defs import Mathlib.Data.Int.Cast.Defs import Mathlib.Tactic.Spread import Mathlib.Util.AssertExists #align_import algebra.ring.defs from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f" universe u v w x variable {Ξ± : ...
Mathlib/Algebra/Ring/Defs.lean
244
245
theorem mul_boole {Ξ±} [MulZeroOneClass Ξ±] (P : Prop) [Decidable P] (a : Ξ±) : (a * if P then 1 else 0) = if P then a else 0 := by
simp
[]
[]
import Mathlib.Data.Fintype.Basic #align_import data.fintype.quotient from "leanprover-community/mathlib"@"d78597269638367c3863d40d45108f52207e03cf" def Quotient.finChoiceAux {ΞΉ : Type*} [DecidableEq ΞΉ] {Ξ± : ΞΉ β†’ Type*} [S : βˆ€ i, Setoid (Ξ± i)] : βˆ€ l : List ΞΉ, (βˆ€ i ∈ l, Quotient (S i)) β†’ @Quotient (βˆ€ i ∈ l, Ξ± ...
Mathlib/Data/Fintype/Quotient.lean
76
84
theorem Quotient.finChoice_eq {ΞΉ : Type*} [DecidableEq ΞΉ] [Fintype ΞΉ] {Ξ± : ΞΉ β†’ Type*} [βˆ€ i, Setoid (Ξ± i)] (f : βˆ€ i, Ξ± i) : (Quotient.finChoice fun i => ⟦f i⟧) = ⟦f⟧ := by
dsimp only [Quotient.finChoice] conv_lhs => enter [1] tactic => change _ = ⟦fun i _ => f i⟧ exact Quotient.inductionOn (@Finset.univ ι _).1 fun l => Quotient.finChoiceAux_eq _ _ rfl
[ " Setoid ((i : ΞΉ) β†’ i ∈ l β†’ Ξ± i)", " Quotient inferInstance", " Ξ± i β†’ ((i : ΞΉ) β†’ i ∈ l β†’ Ξ± i) β†’ Quotient inferInstance", " Ξ± j", " Ξ± i", " βˆ€ (a₁ : Ξ± i) (b₁ : (i : ΞΉ) β†’ i ∈ l β†’ Ξ± i) (aβ‚‚ : Ξ± i) (bβ‚‚ : (i : ΞΉ) β†’ i ∈ l β†’ Ξ± i),\n a₁ β‰ˆ aβ‚‚ β†’\n b₁ β‰ˆ bβ‚‚ β†’\n ⟦fun j h => if e : j = i then β‹―.mpr a₁ else...
[ " Setoid ((i : ΞΉ) β†’ i ∈ l β†’ Ξ± i)", " Quotient inferInstance", " Ξ± i β†’ ((i : ΞΉ) β†’ i ∈ l β†’ Ξ± i) β†’ Quotient inferInstance", " Ξ± j", " Ξ± i", " βˆ€ (a₁ : Ξ± i) (b₁ : (i : ΞΉ) β†’ i ∈ l β†’ Ξ± i) (aβ‚‚ : Ξ± i) (bβ‚‚ : (i : ΞΉ) β†’ i ∈ l β†’ Ξ± i),\n a₁ β‰ˆ aβ‚‚ β†’\n b₁ β‰ˆ bβ‚‚ β†’\n ⟦fun j h => if e : j = i then β‹―.mpr a₁ else...
import Mathlib.LinearAlgebra.Finsupp import Mathlib.Algebra.MonoidAlgebra.Support import Mathlib.Algebra.DirectSum.Internal import Mathlib.RingTheory.GradedAlgebra.Basic #align_import algebra.monoid_algebra.grading from "leanprover-community/mathlib"@"feb99064803fd3108e37c18b0f77d0a8344677a3" noncomputable sectio...
Mathlib/Algebra/MonoidAlgebra/Grading.lean
72
78
theorem mem_grade_iff' (m : M) (a : R[M]) : a ∈ grade R m ↔ a ∈ (LinearMap.range (Finsupp.lsingle m : R β†’β‚—[R] M β†’β‚€ R) : Submodule R R[M]) := by
rw [mem_grade_iff, Finsupp.support_subset_singleton'] apply exists_congr intro r constructor <;> exact Eq.symm
[ " f m = i", " a ∈ gradeBy R f i ↔ ↑a.support βŠ† f ⁻¹' {i}", " a ∈ grade R m ↔ a.support βŠ† {m}", " a ∈ grade R m ↔ ↑a.support βŠ† {m}", " a ∈ grade R m ↔ a ∈ LinearMap.range (Finsupp.lsingle m)", " (βˆƒ b, a = Finsupp.single m b) ↔ a ∈ LinearMap.range (Finsupp.lsingle m)", " βˆ€ (a_1 : R), a = Finsupp.single m ...
[ " f m = i", " a ∈ gradeBy R f i ↔ ↑a.support βŠ† f ⁻¹' {i}", " a ∈ grade R m ↔ a.support βŠ† {m}", " a ∈ grade R m ↔ ↑a.support βŠ† {m}" ]
import Mathlib.Algebra.CharP.ExpChar import Mathlib.GroupTheory.OrderOfElement #align_import algebra.char_p.two from "leanprover-community/mathlib"@"7f1ba1a333d66eed531ecb4092493cd1b6715450" variable {R ΞΉ : Type*} namespace CharTwo section Semiring variable [Semiring R] [CharP R 2] theorem two_eq_zero : (2 : ...
Mathlib/Algebra/CharP/Two.lean
44
44
theorem bit0_apply_eq_zero (x : R) : (bit0 x : R) = 0 := by
simp
[ " 2 = 0", " x + x = 0", " bit0 = 0", " bit0 x✝ = 0 x✝", " bit0 x = 0" ]
[ " 2 = 0", " x + x = 0", " bit0 = 0", " bit0 x✝ = 0 x✝" ]
import Mathlib.Algebra.ContinuedFractions.Computation.ApproximationCorollaries import Mathlib.Algebra.ContinuedFractions.Computation.Translations import Mathlib.Data.Real.Irrational import Mathlib.RingTheory.Coprime.Lemmas import Mathlib.Tactic.Basic #align_import number_theory.diophantine_approximation from "leanpro...
Mathlib/NumberTheory/DiophantineApproximation.lean
139
144
theorem exists_nat_abs_mul_sub_round_le (ΞΎ : ℝ) {n : β„•} (n_pos : 0 < n) : βˆƒ k : β„•, 0 < k ∧ k ≀ n ∧ |↑k * ΞΎ - round (↑k * ΞΎ)| ≀ 1 / (n + 1) := by
obtain ⟨j, k, hkβ‚€, hk₁, h⟩ := exists_int_int_abs_mul_sub_le ΞΎ n_pos have hk := toNat_of_nonneg hkβ‚€.le rw [← hk] at hkβ‚€ hk₁ h exact ⟨k.toNat, natCast_pos.mp hkβ‚€, Nat.cast_le.mp hk₁, (round_le (↑k.toNat * ΞΎ) j).trans h⟩
[ " βˆƒ j k, 0 < k ∧ k ≀ ↑n ∧ |↑k * ΞΎ - ↑j| ≀ 1 / (↑n + 1)", "ΞΎ : ℝ\nn : β„•\nn_pos : 0 < n\nf : β„€ β†’ β„€ := fun m => ⌊fract (ΞΎ * ↑m) * (↑n + 1)βŒ‹\nhn : 0 < ↑n + 1\nhfu : βˆ€ (m : β„€), fract (ΞΎ * ↑m) * (↑n + 1) < ↑n + 1\nj k : β„€\n| |↑k * ΞΎ - ↑j| ≀ 1 / (↑n + 1)", " βˆƒ j k, 0 < k ∧ k ≀ ↑n ∧ |(ΞΎ * ↑k - ↑j) * (↑n + 1)| ≀ 1", "...
[ " βˆƒ j k, 0 < k ∧ k ≀ ↑n ∧ |↑k * ΞΎ - ↑j| ≀ 1 / (↑n + 1)", "ΞΎ : ℝ\nn : β„•\nn_pos : 0 < n\nf : β„€ β†’ β„€ := fun m => ⌊fract (ΞΎ * ↑m) * (↑n + 1)βŒ‹\nhn : 0 < ↑n + 1\nhfu : βˆ€ (m : β„€), fract (ΞΎ * ↑m) * (↑n + 1) < ↑n + 1\nj k : β„€\n| |↑k * ΞΎ - ↑j| ≀ 1 / (↑n + 1)", " βˆƒ j k, 0 < k ∧ k ≀ ↑n ∧ |(ΞΎ * ↑k - ↑j) * (↑n + 1)| ≀ 1", "...
import Mathlib.Topology.PartialHomeomorph import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Data.Real.Sqrt #align_import analysis.normed_space.basic from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Set Metric Pointwise var...
Mathlib/Analysis/NormedSpace/HomeomorphBall.lean
77
78
theorem PartialHomeomorph.univUnitBall_apply_zero : univUnitBall (0 : E) = 0 := by
simp [PartialHomeomorph.univUnitBall_apply]
[ " (fun x => (√(1 + β€–xβ€– ^ 2))⁻¹ β€’ x) x ∈ ball 0 1", " 0 < 1 + β€–xβ€– ^ 2", " β€–xβ€– ^ 2 < 1 + β€–xβ€– ^ 2", " (fun y => (√(1 - β€–yβ€– ^ 2))⁻¹ β€’ y) ((fun x => (√(1 + β€–xβ€– ^ 2))⁻¹ β€’ x) x) = x", " (fun x => (√(1 + β€–xβ€– ^ 2))⁻¹ β€’ x) ((fun y => (√(1 - β€–yβ€– ^ 2))⁻¹ β€’ y) y) = y", " 0 < 1 - β€–yβ€– ^ 2", " ContinuousOn\n ↑{ toFu...
[ " (fun x => (√(1 + β€–xβ€– ^ 2))⁻¹ β€’ x) x ∈ ball 0 1", " 0 < 1 + β€–xβ€– ^ 2", " β€–xβ€– ^ 2 < 1 + β€–xβ€– ^ 2", " (fun y => (√(1 - β€–yβ€– ^ 2))⁻¹ β€’ y) ((fun x => (√(1 + β€–xβ€– ^ 2))⁻¹ β€’ x) x) = x", " (fun x => (√(1 + β€–xβ€– ^ 2))⁻¹ β€’ x) ((fun y => (√(1 - β€–yβ€– ^ 2))⁻¹ β€’ y) y) = y", " 0 < 1 - β€–yβ€– ^ 2", " ContinuousOn\n ↑{ toFu...
import Mathlib.Data.Set.Pointwise.Interval import Mathlib.Topology.Algebra.Field import Mathlib.Topology.Algebra.Order.Group #align_import topology.algebra.order.field from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" open Set Filter TopologicalSpace Function open scoped Pointwise Top...
Mathlib/Topology/Algebra/Order/Field.lean
79
82
theorem Filter.Tendsto.atTop_mul_neg {C : π•œ} (hC : C < 0) (hf : Tendsto f l atTop) (hg : Tendsto g l (𝓝 C)) : Tendsto (fun x => f x * g x) l atBot := by
have := hf.atTop_mul (neg_pos.2 hC) hg.neg simpa only [(· ∘ ·), neg_mul_eq_mul_neg, neg_neg] using tendsto_neg_atTop_atBot.comp this
[ " TopologicalRing R", " βˆ€ (f : R β†’ R), βˆ€ c β‰₯ 0, (βˆ€ (x : R), norm (f x) ≀ c * norm x) β†’ Tendsto f (𝓝 0) (𝓝 0)", " βˆƒ ia, 0 < ia ∧ βˆ€ x ∈ {x | norm x < ia}, f x ∈ {x | norm x < Ξ΅}", " c * norm x < Ξ΅", " βˆ€ (xβ‚€ : R), Tendsto (fun x => x * xβ‚€) (𝓝 0) (𝓝 0)", " Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 Γ—Λ’ οΏ½...
[ " TopologicalRing R", " βˆ€ (f : R β†’ R), βˆ€ c β‰₯ 0, (βˆ€ (x : R), norm (f x) ≀ c * norm x) β†’ Tendsto f (𝓝 0) (𝓝 0)", " βˆƒ ia, 0 < ia ∧ βˆ€ x ∈ {x | norm x < ia}, f x ∈ {x | norm x < Ξ΅}", " c * norm x < Ξ΅", " βˆ€ (xβ‚€ : R), Tendsto (fun x => x * xβ‚€) (𝓝 0) (𝓝 0)", " Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 Γ—Λ’ οΏ½...
import Mathlib.Topology.Algebra.InfiniteSum.Order import Mathlib.Topology.Algebra.InfiniteSum.Ring import Mathlib.Topology.Instances.Real import Mathlib.Topology.MetricSpace.Isometry #align_import topology.instances.nnreal from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" noncomputabl...
Mathlib/Topology/Instances/NNReal.lean
163
164
theorem hasSum_coe {f : Ξ± β†’ ℝβ‰₯0} {r : ℝβ‰₯0} : HasSum (fun a => (f a : ℝ)) (r : ℝ) ↔ HasSum f r := by
simp only [HasSum, ← coe_sum, tendsto_coe]
[ " Tendsto Real.toNNReal atTop atTop", " Tendsto (fun a => ↑a.toNNReal) atTop atTop", " β¨… l, β¨… (_ : βŠ₯ < l), π“Ÿ (Set.Iio l) = β¨… a, β¨… (_ : a β‰  0), π“Ÿ (Set.Iio a)", " β¨… l, β¨… (_ : l β‰  βŠ₯), π“Ÿ (Set.Iio l) = β¨… a, β¨… (_ : a β‰  0), π“Ÿ (Set.Iio a)", " HasSum (fun a => ↑(f a)) ↑r ↔ HasSum f r" ]
[ " Tendsto Real.toNNReal atTop atTop", " Tendsto (fun a => ↑a.toNNReal) atTop atTop", " β¨… l, β¨… (_ : βŠ₯ < l), π“Ÿ (Set.Iio l) = β¨… a, β¨… (_ : a β‰  0), π“Ÿ (Set.Iio a)", " β¨… l, β¨… (_ : l β‰  βŠ₯), π“Ÿ (Set.Iio l) = β¨… a, β¨… (_ : a β‰  0), π“Ÿ (Set.Iio a)" ]
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
107
108
theorem image2_union_right : image2 f s (t βˆͺ t') = image2 f s t βˆͺ image2 f s t' := by
rw [← image2_swap, image2_union_left, image2_swap f, image2_swap f]
[ " 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.CharP.Two import Mathlib.Algebra.CharP.Reduced import Mathlib.Algebra.NeZero import Mathlib.Algebra.Polynomial.RingDivision import Mathlib.GroupTheory.SpecificGroups.Cyclic import Mathlib.NumberTheory.Divisors import Mathlib.RingTheory.IntegralDomain import Mathlib.Tactic.Zify #align_import rin...
Mathlib/RingTheory/RootsOfUnity/Basic.lean
268
271
theorem mem_rootsOfUnity_prime_pow_mul_iff (p k : β„•) (m : β„•+) [ExpChar R p] {ΞΆ : RΛ£} : ΞΆ ∈ rootsOfUnity (⟨p, expChar_pos R p⟩ ^ k * m) R ↔ ΞΆ ∈ rootsOfUnity m R := by
simp only [mem_rootsOfUnity', PNat.mul_coe, PNat.pow_coe, PNat.mk_coe, ExpChar.pow_prime_pow_mul_eq_one_iff]
[ " a✝ * b✝ ∈ {ΞΆ | ΞΆ ^ ↑k = 1}", " x✝¹⁻¹ ∈ { carrier := {ΞΆ | ΞΆ ^ ↑k = 1}, mul_mem' := β‹―, one_mem' := β‹― }.carrier", " ΞΆ ∈ rootsOfUnity k M ↔ ↑΢ ^ ↑k = 1", " ΞΆ ^ ↑k = 1 ↔ ↑΢ ^ ↑k = 1", " rootsOfUnity 1 M = βŠ₯", " x✝ ∈ rootsOfUnity 1 M ↔ x✝ ∈ βŠ₯", " rootsOfUnity k M ≀ rootsOfUnity l M", " rootsOfUnity k M ≀ ...
[ " a✝ * b✝ ∈ {ΞΆ | ΞΆ ^ ↑k = 1}", " x✝¹⁻¹ ∈ { carrier := {ΞΆ | ΞΆ ^ ↑k = 1}, mul_mem' := β‹―, one_mem' := β‹― }.carrier", " ΞΆ ∈ rootsOfUnity k M ↔ ↑΢ ^ ↑k = 1", " ΞΆ ^ ↑k = 1 ↔ ↑΢ ^ ↑k = 1", " rootsOfUnity 1 M = βŠ₯", " x✝ ∈ rootsOfUnity 1 M ↔ x✝ ∈ βŠ₯", " rootsOfUnity k M ≀ rootsOfUnity l M", " rootsOfUnity k M ≀ ...
import Mathlib.MeasureTheory.Decomposition.RadonNikodym import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Probability.Independence.Basic #align_import probability.density from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open scoped Classical MeasureTheory NNReal ENNRea...
Mathlib/Probability/Density.lean
82
86
theorem hasPDF_iff_of_aemeasurable {X : Ξ© β†’ E} {β„™ : Measure Ξ©} {ΞΌ : Measure E} (hX : AEMeasurable X β„™) : HasPDF X β„™ ΞΌ ↔ (map X β„™).HaveLebesgueDecomposition ΞΌ ∧ map X β„™ β‰ͺ ΞΌ := by
rw [hasPDF_iff] simp only [hX, true_and]
[ " HasPDF X β„™ ΞΌ ↔ (map X β„™).HaveLebesgueDecomposition ΞΌ ∧ map X β„™ β‰ͺ ΞΌ", " AEMeasurable X β„™ ∧ (map X β„™).HaveLebesgueDecomposition ΞΌ ∧ map X β„™ β‰ͺ ΞΌ ↔\n (map X β„™).HaveLebesgueDecomposition ΞΌ ∧ map X β„™ β‰ͺ ΞΌ" ]
[]
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
40
42
theorem binomial_apply_zero (p : ℝβ‰₯0∞) (h : p ≀ 1) (n : β„•) : binomial p h n 0 = (1-p)^n := by
simp [binomial_apply]
[ " βˆ‘ 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.Analysis.InnerProductSpace.PiL2 import Mathlib.Analysis.SpecialFunctions.Sqrt import Mathlib.Analysis.NormedSpace.HomeomorphBall #align_import analysis.inner_product_space.calculus from "leanprover-community/mathlib"@"f9dd3204df14a0749cd456fac1e6849dfe7d2b88" noncomputable section open RCLike Real ...
Mathlib/Analysis/InnerProductSpace/Calculus.lean
115
118
theorem HasDerivAt.inner {f g : ℝ β†’ E} {f' g' : E} {x : ℝ} : HasDerivAt f f' x β†’ HasDerivAt g g' x β†’ HasDerivAt (fun t => βŸͺf t, g t⟫) (βŸͺf x, g'⟫ + βŸͺf', g x⟫) x := by
simpa only [← hasDerivWithinAt_univ] using HasDerivWithinAt.inner π•œ
[ " HasDerivWithinAt (fun t => βŸͺf t, g t⟫_π•œ) (βŸͺf x, g'⟫_π•œ + βŸͺf', g x⟫_π•œ) s x", " HasDerivAt f f' x β†’ HasDerivAt g g' x β†’ HasDerivAt (fun t => βŸͺf t, g t⟫_π•œ) (βŸͺf x, g'⟫_π•œ + βŸͺf', g x⟫_π•œ) x" ]
[ " HasDerivWithinAt (fun t => βŸͺf t, g t⟫_π•œ) (βŸͺf x, g'⟫_π•œ + βŸͺf', g x⟫_π•œ) s x" ]
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Rat.Denumerable import Mathlib.Data.Set.Pointwise.Interval import Mathlib.SetTheory.Cardinal.Continuum #align_import data.real.cardinality from "leanprover-community/mathlib"@"7e7aaccf9b0182576cabdde36cf1b5ad3585b70d" open Nat Set open Cardinal no...
Mathlib/Data/Real/Cardinality.lean
69
70
theorem cantorFunctionAux_false (h : f n = false) : cantorFunctionAux c f n = 0 := by
simp [cantorFunctionAux, h]
[ " cantorFunctionAux c f n = c ^ n", " cantorFunctionAux c f n = 0" ]
[ " cantorFunctionAux c f n = c ^ n" ]
import Mathlib.Analysis.Calculus.LineDeriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Measurable open MeasureTheory variable {π•œ : Type*} [NontriviallyNormedField π•œ] [LocallyCompactSpace π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] [MeasurableSpace E] [OpensMeasurableSpace E] {F : Type*} [Norm...
Mathlib/Analysis/Calculus/LineDeriv/Measurable.lean
47
52
theorem stronglyMeasurable_lineDeriv [SecondCountableTopologyEither E F] (hf : Continuous f) : StronglyMeasurable (fun x ↦ lineDeriv π•œ f x v) := by
borelize π•œ let g : E β†’ π•œ β†’ F := fun x t ↦ f (x + t β€’ v) have hg : Continuous g.uncurry := by apply hf.comp; continuity exact (stronglyMeasurable_deriv_with_param hg).comp_measurable measurable_prod_mk_right
[ " MeasurableSet {x | LineDifferentiableAt π•œ f x v}", " Continuous (Function.uncurry g)", " Continuous fun x => x.1 + x.2 β€’ v", " Measurable fun x => lineDeriv π•œ f x v", " StronglyMeasurable fun x => lineDeriv π•œ f x v" ]
[ " MeasurableSet {x | LineDifferentiableAt π•œ f x v}", " Continuous (Function.uncurry g)", " Continuous fun x => x.1 + x.2 β€’ v", " Measurable fun x => lineDeriv π•œ f x v" ]
import Mathlib.Analysis.Calculus.Conformal.NormedSpace import Mathlib.Analysis.InnerProductSpace.ConformalLinearMap #align_import analysis.calculus.conformal.inner_product from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section variable {E F : Type*} variable [NormedA...
Mathlib/Analysis/Calculus/Conformal/InnerProduct.lean
36
38
theorem conformalAt_iff {f : E β†’ F} {x : E} {f' : E β†’L[ℝ] F} (h : HasFDerivAt f f' x) : ConformalAt f x ↔ βˆƒ c : ℝ, 0 < c ∧ βˆ€ u v : E, βŸͺf' u, f' v⟫ = c * βŸͺu, v⟫ := by
simp only [conformalAt_iff', h.fderiv]
[ " ConformalAt f x ↔ βˆƒ c, 0 < c ∧ βˆ€ (u v : E), βŸͺ(fderiv ℝ f x) u, (fderiv ℝ f x) v⟫_ℝ = c * βŸͺu, v⟫_ℝ", " ConformalAt f x ↔ βˆƒ c, 0 < c ∧ βˆ€ (u v : E), βŸͺf' u, f' v⟫_ℝ = c * βŸͺu, v⟫_ℝ" ]
[ " ConformalAt f x ↔ βˆƒ c, 0 < c ∧ βˆ€ (u v : E), βŸͺ(fderiv ℝ f x) u, (fderiv ℝ f x) v⟫_ℝ = c * βŸͺu, v⟫_ℝ" ]
import Mathlib.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup import Mathlib.Tactic.AdaptationNote #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45...
Mathlib/NumberTheory/ModularForms/SlashActions.lean
67
70
theorem SlashAction.smul_slash_of_tower {R Ξ² G Ξ± : Type*} (Ξ³ : Type*) [Group G] [AddGroup Ξ±] [Monoid Ξ³] [MulAction Ξ³ Ξ±] [SMul R Ξ³] [SMul R Ξ±] [IsScalarTower R Ξ³ Ξ±] [SlashAction Ξ² G Ξ± Ξ³] (k : Ξ²) (g : G) (a : Ξ±) (r : R) : (r β€’ a) ∣[k;Ξ³] g = r β€’ a ∣[k;Ξ³] g := by
rw [← smul_one_smul Ξ³ r a, SlashAction.smul_slash, smul_one_smul]
[ " (-a) ∣[k;Ξ³] g + a ∣[k;Ξ³] g = 0", " (r β€’ a) ∣[k;Ξ³] g = r β€’ a ∣[k;Ξ³] g" ]
[ " (-a) ∣[k;γ] g + a ∣[k;γ] g = 0" ]
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv #align_import linear_algebra.affine_space.affine_subspace from "leanprover-community/mathlib"@"e96bdfbd1e8c98a09ff75f7ac6204d142debc840" noncomputable section open Affine open Set section variable (k : Type*) {V : Type*} {P : Type*} [Ring k] [AddCommGroup V]...
Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
136
143
theorem vsub_mem_vectorSpan_of_mem_spanPoints_of_mem_spanPoints {s : Set P} {p1 p2 : P} (hp1 : p1 ∈ spanPoints k s) (hp2 : p2 ∈ spanPoints k s) : p1 -α΅₯ p2 ∈ vectorSpan k s := by
rcases hp1 with ⟨p1a, ⟨hp1a, ⟨v1, ⟨hv1, hv1p⟩⟩⟩⟩ rcases hp2 with ⟨p2a, ⟨hp2a, ⟨v2, ⟨hv2, hv2p⟩⟩⟩⟩ rw [hv1p, hv2p, vsub_vadd_eq_vsub_sub (v1 +α΅₯ p1a), vadd_vsub_assoc, add_comm, add_sub_assoc] have hv1v2 : v1 - v2 ∈ vectorSpan k s := (vectorSpan k s).sub_mem hv1 hv2 refine (vectorSpan k s).add_mem ?_ hv1v2 e...
[ " vectorSpan k βˆ… = βŠ₯", " vectorSpan k {p} = βŠ₯", " (spanPoints k s).Nonempty ↔ s.Nonempty", " (spanPoints k s).Nonempty β†’ s.Nonempty", " Β¬s.Nonempty β†’ Β¬(spanPoints k s).Nonempty", " s = βˆ… β†’ spanPoints k s = βˆ…", " spanPoints k s = βˆ…", " s.Nonempty β†’ (spanPoints k s).Nonempty", " v +α΅₯ p ∈ spanPoints k ...
[ " vectorSpan k βˆ… = βŠ₯", " vectorSpan k {p} = βŠ₯", " (spanPoints k s).Nonempty ↔ s.Nonempty", " (spanPoints k s).Nonempty β†’ s.Nonempty", " Β¬s.Nonempty β†’ Β¬(spanPoints k s).Nonempty", " s = βˆ… β†’ spanPoints k s = βˆ…", " spanPoints k s = βˆ…", " s.Nonempty β†’ (spanPoints k s).Nonempty", " v +α΅₯ p ∈ spanPoints k ...
import Mathlib.Data.ULift import Mathlib.Data.ZMod.Defs import Mathlib.SetTheory.Cardinal.PartENat #align_import set_theory.cardinal.finite from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8" set_option autoImplicit true open Cardinal Function noncomputable section variable {Ξ± Ξ² : Typ...
Mathlib/SetTheory/Cardinal/Finite.lean
167
170
theorem card_sum [Finite Ξ±] [Finite Ξ²] : Nat.card (Ξ± βŠ• Ξ²) = Nat.card Ξ± + Nat.card Ξ² := by
have := Fintype.ofFinite Ξ± have := Fintype.ofFinite Ξ² simp_rw [Nat.card_eq_fintype_card, Fintype.card_sum]
[ " Nat.card { x // x ∈ s } = s.card", " Nat.card ↑s = s.toFinset.card", " Nat.card ↑s = hs.toFinset.card", " Nat.card Ξ± = 0", " Nat.card Ξ± = 0 ↔ IsEmpty Ξ± ∨ Infinite Ξ±", " Nat.card Ξ± β‰  0 ↔ Nonempty Ξ± ∧ Finite Ξ±", " 0 < Nat.card Ξ± ↔ Nonempty Ξ± ∧ Finite Ξ±", " Nat.card Ξ± ≀ Nat.card Ξ²", " lift.{u, v} #Ξ² ...
[ " Nat.card { x // x ∈ s } = s.card", " Nat.card ↑s = s.toFinset.card", " Nat.card ↑s = hs.toFinset.card", " Nat.card Ξ± = 0", " Nat.card Ξ± = 0 ↔ IsEmpty Ξ± ∨ Infinite Ξ±", " Nat.card Ξ± β‰  0 ↔ Nonempty Ξ± ∧ Finite Ξ±", " 0 < Nat.card Ξ± ↔ Nonempty Ξ± ∧ Finite Ξ±", " Nat.card Ξ± ≀ Nat.card Ξ²", " lift.{u, v} #Ξ² ...
import Mathlib.Algebra.MonoidAlgebra.Degree import Mathlib.Algebra.Polynomial.Coeff import Mathlib.Algebra.Polynomial.Monomial import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Nat.WithBot import Mathlib.Data.Nat.Cast.WithTop import Mathlib.Data.Nat.SuccPred #align_import data.polynomial.degree.definitions...
Mathlib/Algebra/Polynomial/Degree/Definitions.lean
138
144
theorem supDegree_eq_natDegree (p : R[X]) : p.toFinsupp.supDegree id = p.natDegree := by
obtain rfl|h := eq_or_ne p 0 Β· simp apply WithBot.coe_injective rw [← AddMonoidAlgebra.supDegree_withBot_some_comp, Function.comp_id, supDegree_eq_degree, degree_eq_natDegree h, Nat.cast_withBot] rwa [support_toFinsupp, nonempty_iff_ne_empty, Ne, support_eq_empty]
[ " Decidable p.Monic", " Decidable (p.leadingCoeff = 1)", " p.degree = βŠ₯", " p.natDegree = 0", " p.degree = ↑p.natDegree", " Option.some n = ↑(WithBot.unbot' 0 (Option.some n))", " AddMonoidAlgebra.supDegree id p.toFinsupp = p.natDegree", " AddMonoidAlgebra.supDegree id (toFinsupp 0) = natDegree 0", ...
[ " Decidable p.Monic", " Decidable (p.leadingCoeff = 1)", " p.degree = βŠ₯", " p.natDegree = 0", " p.degree = ↑p.natDegree", " Option.some n = ↑(WithBot.unbot' 0 (Option.some n))" ]
import Mathlib.Algebra.Module.Submodule.EqLocus import Mathlib.Algebra.Module.Submodule.RestrictScalars import Mathlib.Algebra.Ring.Idempotents import Mathlib.Data.Set.Pointwise.SMul import Mathlib.LinearAlgebra.Basic import Mathlib.Order.CompactlyGenerated.Basic import Mathlib.Order.OmegaCompletePartialOrder #align_...
Mathlib/LinearAlgebra/Span.lean
154
157
theorem span_preimage_le (f : F) (s : Set Mβ‚‚) : span R (f ⁻¹' s) ≀ (span Rβ‚‚ s).comap f := by
rw [span_le, comap_coe] exact preimage_mono subset_span
[ " ↑(span R ↑s) = ↑s", " ↑(span R ↑s) ≀ ↑s", " span R (insert 0 s) = span R s", " span R (insert 0 s) ≀ span R s", " 0 ∈ ↑(span R s) ∧ s βŠ† ↑(span R s)", " 0 ∈ ↑(span R s)", " span R (⇑f ⁻¹' s) ≀ comap f (span Rβ‚‚ s)", " ⇑f ⁻¹' s βŠ† ⇑f ⁻¹' ↑(span Rβ‚‚ s)" ]
[ " ↑(span R ↑s) = ↑s", " ↑(span R ↑s) ≀ ↑s", " span R (insert 0 s) = span R s", " span R (insert 0 s) ≀ span R s", " 0 ∈ ↑(span R s) ∧ s βŠ† ↑(span R s)", " 0 ∈ ↑(span R s)" ]
import Mathlib.Topology.Order.IsLUB open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) variable {Ξ± Ξ² Ξ³ : Type*} section DenselyOrdered variable [TopologicalSpace Ξ±] [LinearOrder Ξ±] [OrderTopology Ξ±] [DenselyOrdered Ξ±] {a b : Ξ±} {s : Set Ξ±} theorem closure_Ioi' {a : Ξ±} (h : (Io...
Mathlib/Topology/Order/DenselyOrdered.lean
136
143
theorem Ioc_subset_closure_interior (a b : Ξ±) : Ioc a b βŠ† closure (interior (Ioc a b)) := by
rcases eq_or_ne a b with (rfl | h) Β· simp Β· calc Ioc a b βŠ† Icc a b := Ioc_subset_Icc_self _ = closure (Ioo a b) := (closure_Ioo h).symm _ βŠ† closure (interior (Ioc a b)) := closure_mono (interior_maximal Ioo_subset_Ioc_self isOpen_Ioo)
[ " closure (Ioi a) = Ici a", " closure (Ioi a) βŠ† Ici a", " Ici a βŠ† closure (Ioi a)", " a ∈ closure (Ioi a)", " closure (Ioo a b) = Icc a b", " closure (Ioo a b) βŠ† Icc a b", " Icc a b βŠ† closure (Ioo a b)", " {a, b} βŠ† closure (Ioo a b)", " a ∈ closure (Ioo a b) ∧ b ∈ closure (Ioo a b)", " βˆ… βŠ† closure...
[ " closure (Ioi a) = Ici a", " closure (Ioi a) βŠ† Ici a", " Ici a βŠ† closure (Ioi a)", " a ∈ closure (Ioi a)", " closure (Ioo a b) = Icc a b", " closure (Ioo a b) βŠ† Icc a b", " Icc a b βŠ† closure (Ioo a b)", " {a, b} βŠ† closure (Ioo a b)", " a ∈ closure (Ioo a b) ∧ b ∈ closure (Ioo a b)", " βˆ… βŠ† closure...
import Mathlib.Topology.Separation import Mathlib.Topology.UniformSpace.Basic import Mathlib.Topology.UniformSpace.Cauchy #align_import topology.uniform_space.uniform_convergence from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9" noncomputable section open Topology Uniformity Filter S...
Mathlib/Topology/UniformSpace/UniformConvergence.lean
124
127
theorem tendstoUniformlyOn_iff_tendsto {F : ΞΉ β†’ Ξ± β†’ Ξ²} {f : Ξ± β†’ Ξ²} {p : Filter ΞΉ} {s : Set Ξ±} : TendstoUniformlyOn F f p s ↔ Tendsto (fun q : ΞΉ Γ— Ξ± => (f q.2, F q.1 q.2)) (p Γ—Λ’ π“Ÿ s) (𝓀 Ξ²) := by
simp [tendstoUniformlyOn_iff_tendstoUniformlyOnFilter, tendstoUniformlyOnFilter_iff_tendsto]
[ " TendstoUniformlyOn F f p s ↔ TendstoUniformlyOnFilter F f p (π“Ÿ s)", " (βˆ€ u ∈ 𝓀 Ξ², βˆ€αΆ  (n : ΞΉ) in p, βˆ€ x ∈ s, (f x, F n x) ∈ u) ↔\n βˆ€ u ∈ 𝓀 Ξ², βˆ€αΆ  (n : ΞΉ Γ— Ξ±) in p Γ—Λ’ π“Ÿ s, (f n.2, F n.1 n.2) ∈ u", " βˆ€ a ∈ 𝓀 Ξ², (βˆ€αΆ  (n : ΞΉ) in p, βˆ€ x ∈ s, (f x, F n x) ∈ a) ↔ βˆ€αΆ  (n : ΞΉ Γ— Ξ±) in p Γ—Λ’ π“Ÿ s, (f n.2, F n.1 n.2) ...
[ " TendstoUniformlyOn F f p s ↔ TendstoUniformlyOnFilter F f p (π“Ÿ s)", " (βˆ€ u ∈ 𝓀 Ξ², βˆ€αΆ  (n : ΞΉ) in p, βˆ€ x ∈ s, (f x, F n x) ∈ u) ↔\n βˆ€ u ∈ 𝓀 Ξ², βˆ€αΆ  (n : ΞΉ Γ— Ξ±) in p Γ—Λ’ π“Ÿ s, (f n.2, F n.1 n.2) ∈ u", " βˆ€ a ∈ 𝓀 Ξ², (βˆ€αΆ  (n : ΞΉ) in p, βˆ€ x ∈ s, (f x, F n x) ∈ a) ↔ βˆ€αΆ  (n : ΞΉ Γ— Ξ±) in p Γ—Λ’ π“Ÿ s, (f n.2, F n.1 n.2) ...
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp import Mathlib.MeasureTheory.Integral.Bochner import Mathlib.Order.Filter.IndicatorFunction import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner import Mathlib.MeasureTheory.Function.LpSeminorm.Trim #align_import measure_theory.function.conditional...
Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean
62
64
theorem congr (hf : AEStronglyMeasurable' m f μ) (hfg : f =ᡐ[μ] g) : AEStronglyMeasurable' m g μ := by
obtain ⟨f', hf'_meas, hff'⟩ := hf; exact ⟨f', hf'_meas, hfg.symm.trans hff'⟩
[ " AEStronglyMeasurable' m g ΞΌ" ]
[]
import Mathlib.GroupTheory.GroupAction.Prod import Mathlib.Algebra.Ring.Int import Mathlib.Data.Nat.Cast.Basic assert_not_exists DenselyOrdered variable {M : Type*} class NatPowAssoc (M : Type*) [MulOneClass M] [Pow M β„•] : Prop where protected npow_add : βˆ€ (k n: β„•) (x : M), x ^ (k + n) = x ^ k * x ^ n ...
Mathlib/Algebra/Group/NatPowAssoc.lean
69
70
theorem npow_mul_comm (m n : β„•) (x : M) : x ^ m * x ^ n = x ^ n * x ^ m := by
simp only [← npow_add, add_comm]
[ " x ^ k * x ^ m * x ^ n = x ^ k * (x ^ m * x ^ n)", " x ^ m * x ^ n = x ^ n * x ^ m" ]
[ " x ^ k * x ^ m * x ^ n = x ^ k * (x ^ m * x ^ n)" ]
import Mathlib.Data.Fintype.Basic import Mathlib.Data.Set.Finite #align_import combinatorics.hall.finite from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" open Finset universe u v namespace HallMarriageTheorem variable {ΞΉ : Type u} {Ξ± : Type v} [DecidableEq Ξ±] {t : ΞΉ β†’ Finset Ξ±} s...
Mathlib/Combinatorics/Hall/Finite.lean
125
133
theorem hall_cond_of_restrict {ΞΉ : Type u} {t : ΞΉ β†’ Finset Ξ±} {s : Finset ΞΉ} (ht : βˆ€ s : Finset ΞΉ, s.card ≀ (s.biUnion t).card) (s' : Finset (s : Set ΞΉ)) : s'.card ≀ (s'.biUnion fun a' => t a').card := by
classical rw [← card_image_of_injective s' Subtype.coe_injective] convert ht (s'.image fun z => z.1) using 1 apply congr_arg ext y simp
[ " s'.card ≀ (s'.biUnion fun x' => (t ↑x').erase a).card", " s'.card < (s'.biUnion fun x_1 => t ↑x_1).card", " False", " (s'.biUnion fun x_1 => t ↑x_1) = (image (fun z => ↑z) s').biUnion t", " (x ∈ s'.biUnion fun x => t ↑x) ↔ x ∈ (image (fun z => ↑z) s').biUnion t", " s'.card ≀ ((s'.biUnion fun x' => t ↑x'...
[ " s'.card ≀ (s'.biUnion fun x' => (t ↑x').erase a).card", " s'.card < (s'.biUnion fun x_1 => t ↑x_1).card", " False", " (s'.biUnion fun x_1 => t ↑x_1) = (image (fun z => ↑z) s').biUnion t", " (x ∈ s'.biUnion fun x => t ↑x) ↔ x ∈ (image (fun z => ↑z) s').biUnion t", " s'.card ≀ ((s'.biUnion fun x' => t ↑x'...
import Mathlib.AlgebraicTopology.SplitSimplicialObject import Mathlib.AlgebraicTopology.DoldKan.PInfty #align_import algebraic_topology.dold_kan.functor_gamma from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" noncomputable section open CategoryTheory CategoryTheory.Category CategoryT...
Mathlib/AlgebraicTopology/DoldKan/FunctorGamma.lean
112
117
theorem mapMono_Ξ΄β‚€' (i : Ξ”' ⟢ Ξ”) [Mono i] (hi : IsΞ΄β‚€ i) : mapMono K i = K.d Ξ”.len Ξ”'.len := by
unfold mapMono suffices Ξ” β‰  Ξ”' by simp only [dif_neg this, dif_pos hi] rintro rfl simpa only [self_eq_add_right, Nat.one_ne_zero] using hi.1
[ " K.X Ξ”.len ⟢ K.X Ξ”'.len", " K.X Ξ”.len = K.X Ξ”'.len", " mapMono K (πŸ™ Ξ”) = πŸ™ (K.X Ξ”.len)", " (if h : Ξ” = Ξ” then eqToHom β‹― else if h : IsΞ΄β‚€ (πŸ™ Ξ”) then K.d Ξ”.len Ξ”.len else 0) = πŸ™ (K.X Ξ”.len)", " mapMono K i = K.d Ξ”.len Ξ”'.len", " (if h : Ξ” = Ξ”' then eqToHom β‹― else if h : IsΞ΄β‚€ i then K.d Ξ”.len Ξ”'.len els...
[ " K.X Ξ”.len ⟢ K.X Ξ”'.len", " K.X Ξ”.len = K.X Ξ”'.len", " mapMono K (πŸ™ Ξ”) = πŸ™ (K.X Ξ”.len)", " (if h : Ξ” = Ξ” then eqToHom β‹― else if h : IsΞ΄β‚€ (πŸ™ Ξ”) then K.d Ξ”.len Ξ”.len else 0) = πŸ™ (K.X Ξ”.len)" ]
import Mathlib.Algebra.MvPolynomial.Monad #align_import data.mv_polynomial.expand from "leanprover-community/mathlib"@"5da451b4c96b4c2e122c0325a7fce17d62ee46c6" namespace MvPolynomial variable {Οƒ Ο„ R S : Type*} [CommSemiring R] [CommSemiring S] noncomputable def expand (p : β„•) : MvPolynomial Οƒ R →ₐ[R] MvPolyno...
Mathlib/Algebra/MvPolynomial/Expand.lean
71
73
theorem expand_bind₁ (p : β„•) (f : Οƒ β†’ MvPolynomial Ο„ R) (Ο† : MvPolynomial Οƒ R) : expand p (bind₁ f Ο†) = bind₁ (fun i ↦ expand p (f i)) Ο† := by
rw [← AlgHom.comp_apply, expand_comp_bind₁]
[ " (expand 1) f = f", " expand 1 = AlgHom.id R (MvPolynomial Οƒ R)", " (expand 1) (X f) = (AlgHom.id R (MvPolynomial Οƒ R)) (X f)", " (expand p).comp (bind₁ f) = bind₁ fun i => (expand p) (f i)", " βˆ€ (i : Οƒ), ((expand p).comp (bind₁ f)) (X i) = (bind₁ fun i => (expand p) (f i)) (X i)", " ((expand p).comp (bi...
[ " (expand 1) f = f", " expand 1 = AlgHom.id R (MvPolynomial Οƒ R)", " (expand 1) (X f) = (AlgHom.id R (MvPolynomial Οƒ R)) (X f)", " (expand p).comp (bind₁ f) = bind₁ fun i => (expand p) (f i)", " βˆ€ (i : Οƒ), ((expand p).comp (bind₁ f)) (X i) = (bind₁ fun i => (expand p) (f i)) (X i)", " ((expand p).comp (bi...
import Mathlib.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
129
134
theorem traverse_map {G : Type* β†’ Type _} [Applicative G] [CommApplicative G] {Ξ± Ξ² Ξ³ : Type _} (g : Ξ± β†’ Ξ²) (h : Ξ² β†’ G Ξ³) (x : Multiset Ξ±) : traverse h (map g x) = traverse (h ∘ g) x := by
refine Quotient.inductionOn x ?_ intro simp only [traverse, quot_mk_to_coe, map_coe, lift_coe, Function.comp_apply] rw [← Traversable.traverse_map h g, List.map_eq_map]
[ " βˆ€ {Ξ± : 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.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
195
199
theorem fixedBy_mem_fixedBy_of_commute {g h : G} (comm: Commute g h) : (fixedBy α g) ∈ fixedBy (Set α) h := by
ext x rw [Set.mem_smul_set_iff_inv_smul_mem, mem_fixedBy, ← mul_smul, comm.inv_right, mul_smul, smul_left_cancel_iff, mem_fixedBy]
[ " fixedBy Ξ± g ∈ fixedBy (Set Ξ±) h", " x ∈ h β€’ fixedBy Ξ± g ↔ x ∈ fixedBy Ξ± g" ]
[]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.unoriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped EuclideanGeometry ...
Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
69
73
theorem angle_add_eq_arccos_of_inner_eq_zero {x y : V} (h : βŸͺx, y⟫ = 0) : angle x (x + y) = Real.arccos (β€–xβ€– / β€–x + yβ€–) := by
rw [angle, inner_add_right, h, add_zero, real_inner_self_eq_norm_mul_norm] by_cases hx : β€–xβ€– = 0; Β· simp [hx] rw [div_mul_eq_div_div, mul_self_div_self]
[ " β€–x + yβ€– * β€–x + yβ€– = β€–xβ€– * β€–xβ€– + β€–yβ€– * β€–yβ€– ↔ angle x y = Ο€ / 2", " βŸͺx, y⟫_ℝ = 0 ↔ angle x y = Ο€ / 2", " β€–x - yβ€– * β€–x - yβ€– = β€–xβ€– * β€–xβ€– + β€–yβ€– * β€–yβ€– ↔ angle x y = Ο€ / 2", " angle x (x + y) = (β€–xβ€– / β€–x + yβ€–).arccos", " (β€–xβ€– * β€–xβ€– / (β€–xβ€– * β€–x + yβ€–)).arccos = (β€–xβ€– / β€–x + yβ€–).arccos" ]
[ " β€–x + yβ€– * β€–x + yβ€– = β€–xβ€– * β€–xβ€– + β€–yβ€– * β€–yβ€– ↔ angle x y = Ο€ / 2", " βŸͺx, y⟫_ℝ = 0 ↔ angle x y = Ο€ / 2", " β€–x - yβ€– * β€–x - yβ€– = β€–xβ€– * β€–xβ€– + β€–yβ€– * β€–yβ€– ↔ angle x y = Ο€ / 2" ]
import Mathlib.Logic.Pairwise import Mathlib.Logic.Relation import Mathlib.Data.List.Basic #align_import data.list.pairwise from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" open Nat Function namespace List variable {Ξ± Ξ² : Type*} {R S T : Ξ± β†’ Ξ± β†’ Prop} {a : Ξ±} {l : List Ξ±} mk_iff_o...
Mathlib/Data/List/Pairwise.lean
152
156
theorem pairwise_of_forall_mem_list {l : List Ξ±} {r : Ξ± β†’ Ξ± β†’ Prop} (h : βˆ€ a ∈ l, βˆ€ b ∈ l, r a b) : l.Pairwise r := by
rw [pairwise_iff_forall_sublist] intro a b hab apply h <;> (apply hab.subset; simp)
[ " Pairwise (flip fun x => R x) l", " βˆ€ ⦃a : α⦄, a ∈ l β†’ βˆ€ ⦃b : α⦄, b ∈ l β†’ a β‰  b β†’ R a b", " Symmetric fun x y => x β‰  y β†’ R x y", " βˆ€ (x : Ξ±), x ∈ l β†’ x β‰  x β†’ R x x", " Pairwise (fun x y => x β‰  y β†’ R x y) l", " R a b", " Pairwise R (map f []) ↔ Pairwise (fun a b => R (f a) (f b)) []", " Pairwise R (ma...
[ " Pairwise (flip fun x => R x) l", " βˆ€ ⦃a : α⦄, a ∈ l β†’ βˆ€ ⦃b : α⦄, b ∈ l β†’ a β‰  b β†’ R a b", " Symmetric fun x y => x β‰  y β†’ R x y", " βˆ€ (x : Ξ±), x ∈ l β†’ x β‰  x β†’ R x x", " Pairwise (fun x y => x β‰  y β†’ R x y) l", " R a b", " Pairwise R (map f []) ↔ Pairwise (fun a b => R (f a) (f b)) []", " Pairwise R (ma...
import Mathlib.Geometry.Manifold.ContMDiff.Basic open Set Function Filter ChartedSpace SmoothManifoldWithCorners open scoped Topology Manifold variable {π•œ : Type*} [NontriviallyNormedField π•œ] -- declare a smooth manifold `M` over the pair `(E, H)`. {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {H ...
Mathlib/Geometry/Manifold/ContMDiff/Product.lean
66
70
theorem ContMDiffWithinAt.prod_mk_space {f : M β†’ E'} {g : M β†’ F'} (hf : ContMDiffWithinAt I π“˜(π•œ, E') n f s x) (hg : ContMDiffWithinAt I π“˜(π•œ, F') n g s x) : ContMDiffWithinAt I π“˜(π•œ, E' Γ— F') n (fun x => (f x, g x)) s x := by
rw [contMDiffWithinAt_iff] at * exact ⟨hf.1.prod hg.1, hf.2.prod hg.2⟩
[ " ContMDiffWithinAt I (I'.prod J') n (fun x => (f x, g x)) s x", " ContinuousWithinAt (fun x => (f x, g x)) s x ∧\n ContDiffWithinAt π•œ n (↑(extChartAt (I'.prod J') (f x, g x)) ∘ (fun x => (f x, g x)) ∘ ↑(extChartAt I x).symm)\n (↑(extChartAt I x).symm ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)", " ContMDi...
[ " ContMDiffWithinAt I (I'.prod J') n (fun x => (f x, g x)) s x", " ContinuousWithinAt (fun x => (f x, g x)) s x ∧\n ContDiffWithinAt π•œ n (↑(extChartAt (I'.prod J') (f x, g x)) ∘ (fun x => (f x, g x)) ∘ ↑(extChartAt I x).symm)\n (↑(extChartAt I x).symm ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)" ]
import Mathlib.CategoryTheory.Sites.Coherent.SheafComparison import Mathlib.CategoryTheory.Sites.Equivalence namespace CategoryTheory variable {C : Type*} [Category C] open GrothendieckTopology namespace Equivalence variable {D : Type*} [Category D] variable (e : C β‰Œ D) section Regular variable [Preregular C] ...
Mathlib/CategoryTheory/Sites/Coherent/Equivalence.lean
101
106
theorem preregular_isSheaf_iff (F : Cα΅’α΅– β₯€ A) : haveI := e.preregular IsSheaf (regularTopology C) F ↔ IsSheaf (regularTopology D) (e.inverse.op β‹™ F) := by
refine ⟨fun hF ↦ ((e.sheafCongrPreregular A).functor.obj ⟨F, hF⟩).cond, fun hF ↦ ?_⟩ rw [isSheaf_of_iso_iff (P' := e.functor.op β‹™ e.inverse.op β‹™ F)] Β· exact (e.sheafCongrPreregular A).inverse.obj ⟨e.inverse.op β‹™ F, hF⟩ |>.cond Β· exact isoWhiskerRight e.op.unitIso F
[ " IsSheaf (regularTopology C) F ↔ IsSheaf (regularTopology D) (e.inverse.op β‹™ F)", " IsSheaf (regularTopology C) F", " IsSheaf (regularTopology C) (e.functor.op β‹™ e.inverse.op β‹™ F)", " F β‰… e.functor.op β‹™ e.inverse.op β‹™ F" ]
[]
import Mathlib.CategoryTheory.Sites.Sieves import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer import Mathlib.CategoryTheory.Category.Preorder import Mathlib.Order.Copy import Mathlib.Data.Set.Subsingleton #align_import category_theory.sites.grothendieck fr...
Mathlib/CategoryTheory/Sites/Grothendieck.lean
105
109
theorem ext {J₁ Jβ‚‚ : GrothendieckTopology C} (h : (J₁ : βˆ€ X : C, Set (Sieve X)) = Jβ‚‚) : J₁ = Jβ‚‚ := by
cases J₁ cases Jβ‚‚ congr
[ " J₁ = Jβ‚‚", " { sieves := sieves✝, top_mem' := top_mem'✝, pullback_stable' := pullback_stable'✝, transitive' := transitive'✝ } = Jβ‚‚", " { sieves := sieves✝¹, top_mem' := top_mem'✝¹, pullback_stable' := pullback_stable'✝¹, transitive' := transitive'✝¹ } =\n { sieves := sieves✝, top_mem' := top_mem'✝, pullback...
[]
import Mathlib.Algebra.Algebra.Basic import Mathlib.NumberTheory.ClassNumber.AdmissibleAbsoluteValue import Mathlib.Data.Real.Archimedean #align_import number_theory.class_number.admissible_abs from "leanprover-community/mathlib"@"e97cf15cd1aec9bd5c193b2ffac5a6dc9118912b" namespace AbsoluteValue open Int
Mathlib/NumberTheory/ClassNumber/AdmissibleAbs.lean
31
52
theorem exists_partition_int (n : β„•) {Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) {b : β„€} (hb : b β‰  0) (A : Fin n β†’ β„€) : βˆƒ t : Fin n β†’ Fin ⌈1 / Ξ΅βŒ‰β‚Š, βˆ€ iβ‚€ i₁, t iβ‚€ = t i₁ β†’ ↑(abs (A i₁ % b - A iβ‚€ % b)) < abs b β€’ Ξ΅ := by
have hb' : (0 : ℝ) < ↑(abs b) := Int.cast_pos.mpr (abs_pos.mpr hb) have hbΞ΅ : 0 < abs b β€’ Ξ΅ := by rw [Algebra.smul_def] exact mul_pos hb' hΞ΅ have hfloor : βˆ€ i, 0 ≀ floor ((A i % b : β„€) / abs b β€’ Ξ΅ : ℝ) := fun _ ↦ floor_nonneg.mpr (div_nonneg (cast_nonneg.mpr (emod_nonneg _ hb)) hbΞ΅.le) refine ⟨fun ...
[ " βˆƒ t, βˆ€ (iβ‚€ i₁ : Fin n), t iβ‚€ = t i₁ β†’ ↑|A i₁ % b - A iβ‚€ % b| < |b| β€’ Ξ΅", " 0 < |b| β€’ Ξ΅", " 0 < (algebraMap β„€ ℝ) |b| * Ξ΅", " βŒŠβ†‘(A i % b) / |b| β€’ Ξ΅βŒ‹.natAbs < ⌈1 / Ξ΅βŒ‰β‚Š", " ↑(A i % b) / |b| β€’ Ξ΅ < β†‘β†‘βŒˆ1 / Ξ΅βŒ‰β‚Š", " ↑(A i % b) / |b| β€’ Ξ΅ < 1 / Ξ΅", " A i % b < |b|", " βˆ€ (iβ‚€ i₁ : Fin n),\n (fun i => βŸ¨βŒŠβ†‘(A i ...
[]
import Mathlib.Data.Finset.Lattice import Mathlib.Data.Multiset.Powerset #align_import data.finset.powerset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Finset open Function Multiset variable {Ξ± : Type*} {s t : Finset Ξ±} section Powerset def powerset (s : Finset...
Mathlib/Data/Finset/Powerset.lean
93
96
theorem not_mem_of_mem_powerset_of_not_mem {s t : Finset Ξ±} {a : Ξ±} (ht : t ∈ s.powerset) (h : a βˆ‰ s) : a βˆ‰ t := by
apply mt _ h apply mem_powerset.1 ht
[ " s ∈ t.powerset ↔ s βŠ† t", " { val := val✝, nodup := nodup✝ } ∈ t.powerset ↔ { val := val✝, nodup := nodup✝ } βŠ† t", " ↑s.powerset = toSet ⁻¹' 𝒫↑s", " x✝ ∈ ↑s.powerset ↔ x✝ ∈ toSet ⁻¹' 𝒫↑s", " s.powerset = {βˆ…} ↔ s = βˆ…", " a βˆ‰ t", " a ∈ t β†’ a ∈ s" ]
[ " s ∈ t.powerset ↔ s βŠ† t", " { val := val✝, nodup := nodup✝ } ∈ t.powerset ↔ { val := val✝, nodup := nodup✝ } βŠ† t", " ↑s.powerset = toSet ⁻¹' 𝒫↑s", " x✝ ∈ ↑s.powerset ↔ x✝ ∈ toSet ⁻¹' 𝒫↑s", " s.powerset = {βˆ…} ↔ s = βˆ…" ]
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics #align_import analysis.special_functions.pow.continuity from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" noncomputable section open scoped Classical open Real Topology NNReal ENNReal Filter ComplexConjugate open Filter Finset...
Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean
105
109
theorem Filter.Tendsto.const_cpow {l : Filter Ξ±} {f : Ξ± β†’ β„‚} {a b : β„‚} (hf : Tendsto f l (𝓝 b)) (h : a β‰  0 ∨ b β‰  0) : Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b)) := by
cases h with | inl h => exact (continuousAt_const_cpow h).tendsto.comp hf | inr h => exact (continuousAt_const_cpow' h).tendsto.comp hf
[ " (fun x => 0 ^ x) =αΆ [𝓝 b] 0", " (fun x => 0 ^ x) x = 0 x", " 0 ^ x = OfNat.ofNat 0 x", " βˆ€αΆ  (x : β„‚) in 𝓝 b, x β‰  0", " (fun x => x ^ b) =αΆ [𝓝 a] fun x => cexp (x.log * b)", " (fun x => x ^ b) x = (fun x => cexp (x.log * b)) x", " x ^ b = cexp (x.log * b)", " βˆ€αΆ  (x : β„‚) in 𝓝 a, x β‰  0", " (fun x =>...
[ " (fun x => 0 ^ x) =αΆ [𝓝 b] 0", " (fun x => 0 ^ x) x = 0 x", " 0 ^ x = OfNat.ofNat 0 x", " βˆ€αΆ  (x : β„‚) in 𝓝 b, x β‰  0", " (fun x => x ^ b) =αΆ [𝓝 a] fun x => cexp (x.log * b)", " (fun x => x ^ b) x = (fun x => cexp (x.log * b)) x", " x ^ b = cexp (x.log * b)", " βˆ€αΆ  (x : β„‚) in 𝓝 a, x β‰  0", " (fun x =>...
import Mathlib.MeasureTheory.Group.GeometryOfNumbers import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic #align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30" ...
Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean
326
333
theorem norm_le_convexBodySumFun (x : E K) : β€–xβ€– ≀ convexBodySumFun x := by
rw [norm_eq_sup'_normAtPlace] refine (Finset.sup'_le_iff _ _).mpr fun w _ ↦ ?_ rw [convexBodySumFun_apply, ← Finset.univ.add_sum_erase _ (Finset.mem_univ w)] refine le_add_of_le_of_nonneg ?_ ?_ Β· exact le_mul_of_one_le_left (normAtPlace_nonneg w x) one_le_mult Β· exact Finset.sum_nonneg (fun _ _ => mul_non...
[ " convexBodySumFun x = βˆ‘ w : { w // w.IsReal }, β€–x.1 wβ€– + 2 * βˆ‘ w : { w // w.IsComplex }, β€–x.2 wβ€–", " βˆ‘ x_1 ∈ Finset.subtype (fun x => x.IsReal) Finset.univ, ↑(↑x_1).mult * (normAtPlace ↑x_1) x +\n βˆ‘ x_1 ∈ Finset.subtype (fun x => x.IsComplex) Finset.univ, ↑(↑x_1).mult * (normAtPlace ↑x_1) x =\n βˆ‘ x_1 ∈ F...
[ " convexBodySumFun x = βˆ‘ w : { w // w.IsReal }, β€–x.1 wβ€– + 2 * βˆ‘ w : { w // w.IsComplex }, β€–x.2 wβ€–", " βˆ‘ x_1 ∈ Finset.subtype (fun x => x.IsReal) Finset.univ, ↑(↑x_1).mult * (normAtPlace ↑x_1) x +\n βˆ‘ x_1 ∈ Finset.subtype (fun x => x.IsComplex) Finset.univ, ↑(↑x_1).mult * (normAtPlace ↑x_1) x =\n βˆ‘ x_1 ∈ F...