Dataset Viewer
Auto-converted to Parquet Duplicate
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
rank
int64
0
2.4k
import Batteries.Data.Array.Lemmas import Batteries.Tactic.Lint.Misc namespace Batteries structure UFNode where parent : Nat rank : Nat namespace UnionFind def panicWith (v : α) (msg : String) : α := @panic α ⟨v⟩ msg @[simp] theorem panicWith_eq (v : α) (msg) : panicWith v msg = v := rfl def parentD...
.lake/packages/batteries/Batteries/Data/UnionFind/Basic.lean
47
50
theorem parentD_set {arr : Array UFNode} {x v i} : parentD (arr.set x v) i = if x.1 = i then v.parent else parentD arr i := by
rw [parentD]; simp [Array.get_eq_getElem, parentD] split <;> [split <;> simp [Array.get_set, *]; split <;> [(subst i; cases β€ΉΒ¬_β€Ί x.2); rfl]]
0
import Batteries.Data.Array.Lemmas import Batteries.Tactic.Lint.Misc namespace Batteries structure UFNode where parent : Nat rank : Nat namespace UnionFind def panicWith (v : α) (msg : String) : α := @panic α ⟨v⟩ msg @[simp] theorem panicWith_eq (v : α) (msg) : panicWith v msg = v := rfl def parentD...
.lake/packages/batteries/Batteries/Data/UnionFind/Basic.lean
52
55
theorem rankD_set {arr : Array UFNode} {x v i} : rankD (arr.set x v) i = if x.1 = i then v.rank else rankD arr i := by
rw [rankD]; simp [Array.get_eq_getElem, rankD] split <;> [split <;> simp [Array.get_set, *]; split <;> [(subst i; cases β€ΉΒ¬_β€Ί x.2); rfl]]
0
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
53
55
theorem expand_one_apply (f : MvPolynomial Οƒ R) : expand 1 f = f := by
simp only [expand, pow_one, evalβ‚‚Hom_eq_bindβ‚‚, bindβ‚‚_C_left, RingHom.toMonoidHom_eq_coe, RingHom.coe_monoidHom_id, AlgHom.coe_mk, RingHom.coe_mk, MonoidHom.id_apply, RingHom.id_apply]
1
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
59
61
theorem expand_one : expand 1 = AlgHom.id R (MvPolynomial Οƒ R) := by
ext1 f rw [expand_one_apply, AlgHom.id_apply]
1
import Mathlib.Algebra.MvPolynomial.Monad #align_import data.mv_polynomial.expand from "leanprover-community/mathlib"@"5da451b4c96b4c2e122c0325a7fce17d62ee46c6" namespace MvPolynomial variable {Οƒ Ο„ R S : Type*} [CommSemiring R] [CommSemiring S] noncomputable def expand (p : β„•) : MvPolynomial Οƒ R →ₐ[R] MvPolyno...
Mathlib/Algebra/MvPolynomial/Expand.lean
64
68
theorem expand_comp_bind₁ (p : β„•) (f : Οƒ β†’ MvPolynomial Ο„ R) : (expand p).comp (bind₁ f) = bind₁ fun i ↦ expand p (f i) := by
apply algHom_ext intro i simp only [AlgHom.comp_apply, bind₁_X_right]
1
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₁]
1
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
77
78
theorem map_expand (f : R β†’+* S) (p : β„•) (Ο† : MvPolynomial Οƒ R) : map f (expand p Ο†) = expand p (map f Ο†) := by
simp [expand, map_bind₁]
1
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
82
84
theorem rename_expand (f : Οƒ β†’ Ο„) (p : β„•) (Ο† : MvPolynomial Οƒ R) : rename f (expand p Ο†) = expand p (rename f Ο†) := by
simp [expand, bind₁_rename, rename_bind₁, Function.comp]
1
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
88
92
theorem rename_comp_expand (f : Οƒ β†’ Ο„) (p : β„•) : (rename f).comp (expand p) = (expand p).comp (rename f : MvPolynomial Οƒ R →ₐ[R] MvPolynomial Ο„ R) := by
ext1 Ο† simp only [rename_expand, AlgHom.comp_apply]
1
import Mathlib.LinearAlgebra.CliffordAlgebra.Basic import Mathlib.LinearAlgebra.Alternating.Basic #align_import linear_algebra.exterior_algebra.basic from "leanprover-community/mathlib"@"b8d2eaa69d69ce8f03179a5cda774fc0cde984e4" universe u1 u2 u3 u4 u5 variable (R : Type u1) [CommRing R] variable (M : Type u2) [...
Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean
97
98
theorem comp_ΞΉ_sq_zero (g : ExteriorAlgebra R M →ₐ[R] A) (m : M) : g (ΞΉ R m) * g (ΞΉ R m) = 0 := by
rw [← AlgHom.map_mul, ΞΉ_sq_zero, AlgHom.map_zero]
2
import Mathlib.Algebra.Module.Equiv #align_import linear_algebra.general_linear_group from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9" variable (R M : Type*) namespace LinearMap variable [Semiring R] [AddCommMonoid M] [Module R M] abbrev GeneralLinearGroup := (M β†’β‚—[R] M)Λ£ #alig...
Mathlib/LinearAlgebra/GeneralLinearGroup.lean
68
69
theorem generalLinearEquiv_to_linearMap (f : GeneralLinearGroup R M) : (generalLinearEquiv R M f : M β†’β‚—[R] M) = f := by
ext; rfl
3
import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" noncomputable section open NNReal ENNReal Topology Set Filter Bornology universe u v w variable {ΞΉ : Sort*} {Ξ± : Type u} {Ξ² :...
Mathlib/Topology/MetricSpace/Thickening.lean
81
82
theorem thickening_empty (Ξ΄ : ℝ) : thickening Ξ΄ (βˆ… : Set Ξ±) = βˆ… := by
simp only [thickening, setOf_false, infEdist_empty, not_top_lt]
4
import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" noncomputable section open NNReal ENNReal Topology Set Filter Bornology universe u v w variable {ΞΉ : Sort*} {Ξ± : Type u} {Ξ² :...
Mathlib/Topology/MetricSpace/Thickening.lean
114
122
theorem frontier_thickening_disjoint (A : Set Ξ±) : Pairwise (Disjoint on fun r : ℝ => frontier (thickening r A)) := by
refine (pairwise_disjoint_on _).2 fun r₁ rβ‚‚ hr => ?_ rcases le_total r₁ 0 with h₁ | h₁ Β· simp [thickening_of_nonpos h₁] refine ((disjoint_singleton.2 fun h => hr.ne ?_).preimage _).mono (frontier_thickening_subset _) (frontier_thickening_subset _) apply_fun ENNReal.toReal at h rwa [ENNReal.toReal_ofRea...
4
import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" noncomputable section open NNReal ENNReal Topology Set Filter Bornology universe u v w variable {ΞΉ : Sort*} {Ξ± : Type u} {Ξ² :...
Mathlib/Topology/MetricSpace/Thickening.lean
151
154
theorem mem_thickening_iff {E : Set X} {x : X} : x ∈ thickening Ξ΄ E ↔ βˆƒ z ∈ E, dist x z < Ξ΄ := by
have key_iff : βˆ€ z : X, edist x z < ENNReal.ofReal Ξ΄ ↔ dist x z < Ξ΄ := fun z ↦ by rw [dist_edist, lt_ofReal_iff_toReal_lt (edist_ne_top _ _)] simp_rw [mem_thickening_iff_exists_edist_lt, key_iff]
4
import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" noncomputable section open NNReal ENNReal Topology Set Filter Bornology universe u v w variable {ΞΉ : Sort*} {Ξ± : Type u} {Ξ² :...
Mathlib/Topology/MetricSpace/Thickening.lean
219
223
theorem mem_cthickening_of_dist_le {Ξ± : Type*} [PseudoMetricSpace Ξ±] (x y : Ξ±) (Ξ΄ : ℝ) (E : Set Ξ±) (h : y ∈ E) (h' : dist x y ≀ Ξ΄) : x ∈ cthickening Ξ΄ E := by
apply mem_cthickening_of_edist_le x y Ξ΄ E h rw [edist_dist] exact ENNReal.ofReal_le_ofReal h'
4
import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" noncomputable section open NNReal ENNReal Topology Set Filter Bornology universe u v w variable {ΞΉ : Sort*} {Ξ± : Type u} {Ξ² :...
Mathlib/Topology/MetricSpace/Thickening.lean
238
239
theorem cthickening_empty (Ξ΄ : ℝ) : cthickening Ξ΄ (βˆ… : Set Ξ±) = βˆ… := by
simp only [cthickening, ENNReal.ofReal_ne_top, setOf_false, infEdist_empty, top_le_iff]
4
import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" noncomputable section open NNReal ENNReal Topology Set Filter Bornology universe u v w variable {ΞΉ : Sort*} {Ξ± : Type u} {Ξ² :...
Mathlib/Topology/MetricSpace/Thickening.lean
242
244
theorem cthickening_of_nonpos {Ξ΄ : ℝ} (hΞ΄ : Ξ΄ ≀ 0) (E : Set Ξ±) : cthickening Ξ΄ E = closure E := by
ext x simp [mem_closure_iff_infEdist_zero, cthickening, ENNReal.ofReal_eq_zero.2 hΞ΄]
4
import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" noncomputable section open NNReal ENNReal Topology Set Filter Bornology universe u v w variable {ΞΉ : Sort*} {Ξ± : Type u} {Ξ² :...
Mathlib/Topology/MetricSpace/Thickening.lean
253
254
theorem cthickening_max_zero (Ξ΄ : ℝ) (E : Set Ξ±) : cthickening (max 0 Ξ΄) E = cthickening Ξ΄ E := by
cases le_total Ξ΄ 0 <;> simp [cthickening_of_nonpos, *]
4
import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" noncomputable section open NNReal ENNReal Topology Set Filter Bornology universe u v w variable {ΞΉ : Sort*} {Ξ± : Type u} {Ξ² :...
Mathlib/Topology/MetricSpace/Thickening.lean
265
268
theorem cthickening_singleton {Ξ± : Type*} [PseudoMetricSpace Ξ±] (x : Ξ±) {Ξ΄ : ℝ} (hΞ΄ : 0 ≀ Ξ΄) : cthickening Ξ΄ ({x} : Set Ξ±) = closedBall x Ξ΄ := by
ext y simp [cthickening, edist_dist, ENNReal.ofReal_le_ofReal_iff hΞ΄]
4
import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" noncomputable section open NNReal ENNReal Topology Set Filter Bornology universe u v w variable {ΞΉ : Sort*} {Ξ± : Type u} {Ξ² :...
Mathlib/Topology/MetricSpace/Thickening.lean
271
275
theorem closedBall_subset_cthickening_singleton {Ξ± : Type*} [PseudoMetricSpace Ξ±] (x : Ξ±) (Ξ΄ : ℝ) : closedBall x Ξ΄ βŠ† cthickening Ξ΄ ({x} : Set Ξ±) := by
rcases lt_or_le Ξ΄ 0 with (hΞ΄ | hΞ΄) Β· simp only [closedBall_eq_empty.mpr hΞ΄, empty_subset] Β· simp only [cthickening_singleton x hΞ΄, Subset.rfl]
4
import Batteries.Data.RBMap.Basic import Mathlib.Init.Data.Nat.Notation import Mathlib.Mathport.Rename import Mathlib.Tactic.TypeStar import Mathlib.Util.CompileInductive #align_import data.tree from "leanprover-community/mathlib"@"ed989ff568099019c6533a4d94b27d852a5710d8" inductive Tree.{u} (Ξ± : Type u) : Type ...
Mathlib/Data/Tree/Basic.lean
90
91
theorem numLeaves_eq_numNodes_succ (x : Tree Ξ±) : x.numLeaves = x.numNodes + 1 := by
induction x <;> simp [*, Nat.add_comm, Nat.add_assoc, Nat.add_left_comm]
5
import Batteries.Data.RBMap.Basic import Mathlib.Init.Data.Nat.Notation import Mathlib.Mathport.Rename import Mathlib.Tactic.TypeStar import Mathlib.Util.CompileInductive #align_import data.tree from "leanprover-community/mathlib"@"ed989ff568099019c6533a4d94b27d852a5710d8" inductive Tree.{u} (Ξ± : Type u) : Type ...
Mathlib/Data/Tree/Basic.lean
94
96
theorem numLeaves_pos (x : Tree Ξ±) : 0 < x.numLeaves := by
rw [numLeaves_eq_numNodes_succ] exact x.numNodes.zero_lt_succ
5
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Tactic.Positivity.Core import Mathlib.Algebra.Ring.NegOnePow #align_import analysis.special_functions.trigonometric.basic from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" noncomputable section open scoped Classical open Top...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
54
56
theorem continuous_sin : Continuous sin := by
change Continuous fun z => (exp (-z * I) - exp (z * I)) * I / 2 continuity
6
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Tactic.Positivity.Core import Mathlib.Algebra.Ring.NegOnePow #align_import analysis.special_functions.trigonometric.basic from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" noncomputable section open scoped Classical open Top...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
65
67
theorem continuous_cos : Continuous cos := by
change Continuous fun z => (exp (z * I) + exp (-z * I)) / 2 continuity
6
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Tactic.Positivity.Core import Mathlib.Algebra.Ring.NegOnePow #align_import analysis.special_functions.trigonometric.basic from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" noncomputable section open scoped Classical open Top...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
76
78
theorem continuous_sinh : Continuous sinh := by
change Continuous fun z => (exp z - exp (-z)) / 2 continuity
6
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Tactic.Positivity.Core import Mathlib.Algebra.Ring.NegOnePow #align_import analysis.special_functions.trigonometric.basic from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" noncomputable section open scoped Classical open Top...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
82
84
theorem continuous_cosh : Continuous cosh := by
change Continuous fun z => (exp z + exp (-z)) / 2 continuity
6
import Mathlib.Algebra.Group.Nat set_option autoImplicit true open Lean hiding Literal HashMap open Batteries namespace Sat inductive Literal | pos : Nat β†’ Literal | neg : Nat β†’ Literal def Literal.ofInt (i : Int) : Literal := if i < 0 then Literal.neg (-i-1).toNat else Literal.pos (i-1).toNat def Lit...
Mathlib/Tactic/Sat/FromLRAT.lean
156
166
theorem Valuation.mk_implies {as ps} (as₁) : as = List.reverseAux as₁ ps β†’ (Valuation.mk as).implies p ps as₁.length β†’ p := by
induction ps generalizing as₁ with | nil => exact fun _ ↦ id | cons a as ih => refine fun e H ↦ @ih (a::as₁) e (H ?_) subst e; clear ih H suffices βˆ€ n n', n' = List.length as₁ + n β†’ βˆ€ bs, mk (as₁.reverseAux bs) n' ↔ mk bs n from this 0 _ rfl (a::as) induction as₁ with simp | cons b as₁ ...
7
import Mathlib.Algebra.Group.Nat set_option autoImplicit true open Lean hiding Literal HashMap open Batteries namespace Sat inductive Literal | pos : Nat β†’ Literal | neg : Nat β†’ Literal def Literal.ofInt (i : Int) : Literal := if i < 0 then Literal.neg (-i-1).toNat else Literal.pos (i-1).toNat def Lit...
Mathlib/Tactic/Sat/FromLRAT.lean
180
185
theorem Fmla.reify_or (h₁ : Fmla.reify v f₁ a) (hβ‚‚ : Fmla.reify v fβ‚‚ b) : Fmla.reify v (f₁.and fβ‚‚) (a ∨ b) := by
refine ⟨fun H ↦ by_contra fun hn ↦ H ⟨fun c h ↦ by_contra fun hn' ↦ ?_⟩⟩ rcases List.mem_append.1 h with h | h Β· exact hn <| Or.inl <| h₁.1 fun Hc ↦ hn' <| Hc.1 _ h Β· exact hn <| Or.inr <| hβ‚‚.1 fun Hc ↦ hn' <| Hc.1 _ h
7
import Mathlib.Analysis.NormedSpace.Multilinear.Curry #align_import analysis.calculus.formal_multilinear_series from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open Set Fin Topology -- Porting note: added explicit universes to fix compile universe u u' v w x ...
Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean
111
114
theorem removeZero_of_pos (p : FormalMultilinearSeries π•œ E F) {n : β„•} (h : 0 < n) : p.removeZero n = p n := by
rw [← Nat.succ_pred_eq_of_pos h] rfl
8
import Mathlib.Analysis.NormedSpace.Multilinear.Curry #align_import analysis.calculus.formal_multilinear_series from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open Set Fin Topology -- Porting note: added explicit universes to fix compile universe u u' v w x ...
Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean
119
124
theorem congr (p : FormalMultilinearSeries π•œ E F) {m n : β„•} {v : Fin m β†’ E} {w : Fin n β†’ E} (h1 : m = n) (h2 : βˆ€ (i : β„•) (him : i < m) (hin : i < n), v ⟨i, him⟩ = w ⟨i, hin⟩) : p m v = p n w := by
subst n congr with ⟨i, hi⟩ exact h2 i hi hi
8
import Aesop.Nanos import Aesop.Util.UnionFind import Aesop.Util.UnorderedArraySet import Batteries.Data.String import Batteries.Lean.Expr import Batteries.Lean.Meta.DiscrTree import Batteries.Lean.PersistentHashSet import Lean.Meta.Tactic.TryThis open Lean open Lean.Meta Lean.Elab.Tactic namespace Aesop.Array
.lake/packages/aesop/Aesop/Util/Basic.lean
21
24
theorem size_modify (a : Array Ξ±) (i : Nat) (f : Ξ± β†’ Ξ±) : (a.modify i f).size = a.size := by
simp only [Array.modify, Id.run, Array.modifyM] split <;> simp
9
import Mathlib.CategoryTheory.Limits.Shapes.Terminal #align_import category_theory.limits.shapes.zero_objects from "leanprover-community/mathlib"@"74333bd53d25b6809203a2bfae80eea5fc1fc076" noncomputable section universe v u v' u' open CategoryTheory open CategoryTheory.Category variable {C : Type u} [Category...
Mathlib/CategoryTheory/Limits/Shapes/ZeroObjects.lean
117
123
theorem of_iso (hY : IsZero Y) (e : X β‰… Y) : IsZero X := by
refine ⟨fun Z => ⟨⟨⟨e.hom ≫ hY.to_ Z⟩, fun f => ?_⟩⟩, fun Z => ⟨⟨⟨hY.from_ Z ≫ e.inv⟩, fun f => ?_⟩⟩⟩ Β· rw [← cancel_epi e.inv] apply hY.eq_of_src Β· rw [← cancel_mono e.hom] apply hY.eq_of_tgt
10
import Mathlib.CategoryTheory.EffectiveEpi.Basic import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.Tactic.ApplyFun namespace CategoryTheory open Limits variable {C : Type*} [Category C] noncomputable def effectiveEpiStructIsColimitDescOfEffectiveEpiFamily {B : C} {Ξ± : Type*} (X : Ξ± β†’ C) (c...
Mathlib/CategoryTheory/EffectiveEpi/Coproduct.lean
61
93
theorem effectiveEpiFamilyStructOfEffectiveEpiDesc_aux {B : C} {Ξ± : Type*} {X : Ξ± β†’ C} {Ο€ : (a : Ξ±) β†’ X a ⟢ B} [HasCoproduct X] [βˆ€ {Z : C} (g : Z ⟢ ∐ X) (a : Ξ±), HasPullback g (Sigma.ΞΉ X a)] [βˆ€ {Z : C} (g : Z ⟢ ∐ X), HasCoproduct fun a ↦ pullback g (Sigma.ΞΉ X a)] [βˆ€ {Z : C} (g : Z ⟢ ∐ X), Epi (Sigma.des...
apply_fun ((Sigma.desc fun a ↦ pullback.fst (f := g₁) (g := (Sigma.ΞΉ X a))) ≫ Β·) using (fun a b ↦ (cancel_epi _).mp) ext a simp only [colimit.ΞΉ_desc_assoc, Discrete.functor_obj, Cofan.mk_pt, Cofan.mk_ΞΉ_app] rw [← Category.assoc, pullback.condition] simp only [Category.assoc, colimit.ΞΉ_desc, Cofan.mk_pt, ...
11
import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Common #align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" variable {Ξ± : Type*} namespace Coheyting variable [CoheytingAlgebra Ξ±] {a b : Ξ±} def boundary (a : Ξ±) : Ξ± := a βŠ“ οΏ’a #align cohe...
Mathlib/Order/Heyting/Boundary.lean
63
63
theorem boundary_top : βˆ‚ (⊀ : Ξ±) = βŠ₯ := by
rw [boundary, hnot_top, inf_bot_eq]
12
import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Common #align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" variable {Ξ± : Type*} namespace Coheyting variable [CoheytingAlgebra Ξ±] {a b : Ξ±} def boundary (a : Ξ±) : Ξ± := a βŠ“ οΏ’a #align cohe...
Mathlib/Order/Heyting/Boundary.lean
71
72
theorem boundary_hnot_hnot (a : Ξ±) : βˆ‚ (οΏ’οΏ’a) = βˆ‚ (οΏ’a) := by
simp_rw [boundary, hnot_hnot_hnot, inf_comm]
12
import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Common #align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" variable {Ξ± : Type*} namespace Coheyting variable [CoheytingAlgebra Ξ±] {a b : Ξ±} def boundary (a : Ξ±) : Ξ± := a βŠ“ οΏ’a #align cohe...
Mathlib/Order/Heyting/Boundary.lean
76
76
theorem hnot_boundary (a : Ξ±) : οΏ’βˆ‚ a = ⊀ := by
rw [boundary, hnot_inf_distrib, sup_hnot_self]
12
import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Common #align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" variable {Ξ± : Type*} namespace Coheyting variable [CoheytingAlgebra Ξ±] {a b : Ξ±} def boundary (a : Ξ±) : Ξ± := a βŠ“ οΏ’a #align cohe...
Mathlib/Order/Heyting/Boundary.lean
80
82
theorem boundary_inf (a b : Ξ±) : βˆ‚ (a βŠ“ b) = βˆ‚ a βŠ“ b βŠ” a βŠ“ βˆ‚ b := by
unfold boundary rw [hnot_inf_distrib, inf_sup_left, inf_right_comm, ← inf_assoc]
12
import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Common #align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" variable {Ξ± : Type*} namespace Coheyting variable [CoheytingAlgebra Ξ±] {a b : Ξ±} def boundary (a : Ξ±) : Ξ± := a βŠ“ οΏ’a #align cohe...
Mathlib/Order/Heyting/Boundary.lean
89
93
theorem boundary_sup_le : βˆ‚ (a βŠ” b) ≀ βˆ‚ a βŠ” βˆ‚ b := by
rw [boundary, inf_sup_right] exact sup_le_sup (inf_le_inf_left _ <| hnot_anti le_sup_left) (inf_le_inf_left _ <| hnot_anti le_sup_right)
12
import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Common #align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" variable {Ξ± : Type*} namespace Coheyting variable [CoheytingAlgebra Ξ±] {a b : Ξ±} def boundary (a : Ξ±) : Ξ± := a βŠ“ οΏ’a #align cohe...
Mathlib/Order/Heyting/Boundary.lean
105
117
theorem boundary_le_boundary_sup_sup_boundary_inf_left : βˆ‚ a ≀ βˆ‚ (a βŠ” b) βŠ” βˆ‚ (a βŠ“ b) := by
-- Porting note: the following simp generates the same term as mathlib3 if you remove -- sup_inf_right from both. With sup_inf_right included, mathlib4 and mathlib3 generate -- different terms simp only [boundary, sup_inf_left, sup_inf_right, sup_right_idem, le_inf_iff, sup_assoc, sup_comm _ a] refine ⟨⟨...
12
import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Common #align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" variable {Ξ± : Type*} namespace Coheyting variable [CoheytingAlgebra Ξ±] {a b : Ξ±} def boundary (a : Ξ±) : Ξ± := a βŠ“ οΏ’a #align cohe...
Mathlib/Order/Heyting/Boundary.lean
120
122
theorem boundary_le_boundary_sup_sup_boundary_inf_right : βˆ‚ b ≀ βˆ‚ (a βŠ” b) βŠ” βˆ‚ (a βŠ“ b) := by
rw [sup_comm a, inf_comm] exact boundary_le_boundary_sup_sup_boundary_inf_left
12
import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Common #align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" variable {Ξ± : Type*} namespace Coheyting variable [CoheytingAlgebra Ξ±] {a b : Ξ±} def boundary (a : Ξ±) : Ξ± := a βŠ“ οΏ’a #align cohe...
Mathlib/Order/Heyting/Boundary.lean
132
132
theorem boundary_idem (a : Ξ±) : βˆ‚ βˆ‚ a = βˆ‚ a := by
rw [boundary, hnot_boundary, inf_top_eq]
12
import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Common #align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" variable {Ξ± : Type*} namespace Coheyting variable [CoheytingAlgebra Ξ±] {a b : Ξ±} def boundary (a : Ξ±) : Ξ± := a βŠ“ οΏ’a #align cohe...
Mathlib/Order/Heyting/Boundary.lean
135
137
theorem hnot_hnot_sup_boundary (a : Ξ±) : οΏ’οΏ’a βŠ” βˆ‚ a = a := by
rw [boundary, sup_inf_left, hnot_sup_self, inf_top_eq, sup_eq_right] exact hnot_hnot_le
12
import Mathlib.Topology.Constructions #align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" open Set Filter Function Topology Filter variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*} variable [TopologicalSpace Ξ±] @[simp] theorem nhds_bind_nhdsW...
Mathlib/Topology/ContinuousOn.lean
57
59
theorem mem_closure_ne_iff_frequently_within {z : Ξ±} {s : Set Ξ±} : z ∈ closure (s \ {z}) ↔ βˆƒαΆ  x in 𝓝[β‰ ] z, x ∈ s := by
simp [mem_closure_iff_frequently, frequently_nhdsWithin_iff]
13
import Mathlib.Topology.Constructions #align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" open Set Filter Function Topology Filter variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*} variable [TopologicalSpace Ξ±] @[simp] theorem nhds_bind_nhdsW...
Mathlib/Topology/ContinuousOn.lean
63
67
theorem eventually_nhdsWithin_nhdsWithin {a : Ξ±} {s : Set Ξ±} {p : Ξ± β†’ Prop} : (βˆ€αΆ  y in 𝓝[s] a, βˆ€αΆ  x in 𝓝[s] y, p x) ↔ βˆ€αΆ  x in 𝓝[s] a, p x := by
refine ⟨fun h => ?_, fun h => (eventually_nhds_nhdsWithin.2 h).filter_mono inf_le_left⟩ simp only [eventually_nhdsWithin_iff] at h ⊒ exact h.mono fun x hx hxs => (hx hxs).self_of_nhds hxs
13
import Mathlib.Topology.Constructions #align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" open Set Filter Function Topology Filter variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*} variable [TopologicalSpace Ξ±] @[simp] theorem nhds_bind_nhdsW...
Mathlib/Topology/ContinuousOn.lean
75
76
theorem nhdsWithin_univ (a : Ξ±) : 𝓝[Set.univ] a = 𝓝 a := by
rw [nhdsWithin, principal_univ, inf_top_eq]
13
import Mathlib.Topology.Constructions #align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" open Set Filter Function Topology Filter variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*} variable [TopologicalSpace Ξ±] @[simp] theorem nhds_bind_nhdsW...
Mathlib/Topology/ContinuousOn.lean
89
91
theorem mem_nhdsWithin {t : Set Ξ±} {a : Ξ±} {s : Set Ξ±} : t ∈ 𝓝[s] a ↔ βˆƒ u, IsOpen u ∧ a ∈ u ∧ u ∩ s βŠ† t := by
simpa only [and_assoc, and_left_comm] using (nhdsWithin_basis_open a s).mem_iff
13
import Mathlib.Topology.Constructions #align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" open Set Filter Function Topology Filter variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*} variable [TopologicalSpace Ξ±] @[simp] theorem nhds_bind_nhdsW...
Mathlib/Topology/ContinuousOn.lean
104
107
theorem diff_mem_nhdsWithin_diff {x : Ξ±} {s t : Set Ξ±} (hs : s ∈ 𝓝[t] x) (t' : Set Ξ±) : s \ t' ∈ 𝓝[t \ t'] x := by
rw [nhdsWithin, diff_eq, diff_eq, ← inf_principal, ← inf_assoc] exact inter_mem_inf hs (mem_principal_self _)
13
import Mathlib.Topology.Constructions #align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" open Set Filter Function Topology Filter variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*} variable [TopologicalSpace Ξ±] @[simp] theorem nhds_bind_nhdsW...
Mathlib/Topology/ContinuousOn.lean
110
113
theorem nhds_of_nhdsWithin_of_nhds {s t : Set Ξ±} {a : Ξ±} (h1 : s ∈ 𝓝 a) (h2 : t ∈ 𝓝[s] a) : t ∈ 𝓝 a := by
rcases mem_nhdsWithin_iff_exists_mem_nhds_inter.mp h2 with ⟨_, Hw, hw⟩ exact (𝓝 a).sets_of_superset ((𝓝 a).inter_sets Hw h1) hw
13
import Mathlib.Topology.Algebra.UniformConvergence #align_import topology.algebra.equicontinuity from "leanprover-community/mathlib"@"01ad394a11bf06b950232720cf7e8fc6b22f0d6a" open Function open UniformConvergence @[to_additive]
Mathlib/Topology/Algebra/Equicontinuity.lean
20
31
theorem equicontinuous_of_equicontinuousAt_one {ΞΉ G M hom : Type*} [TopologicalSpace G] [UniformSpace M] [Group G] [Group M] [TopologicalGroup G] [UniformGroup M] [FunLike hom G M] [MonoidHomClass hom G M] (F : ΞΉ β†’ hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) : Equicontinuous ((↑) ∘ F) := by
rw [equicontinuous_iff_continuous] rw [equicontinuousAt_iff_continuousAt] at hf let Ο† : G β†’* (ΞΉ β†’α΅€ M) := { toFun := swap ((↑) ∘ F) map_one' := by dsimp [UniformFun]; ext; exact map_one _ map_mul' := fun a b => by dsimp [UniformFun]; ext; exact map_mul _ _ _ } exact continuous_of_continuousAt_on...
14
import Mathlib.Topology.Algebra.UniformConvergence #align_import topology.algebra.equicontinuity from "leanprover-community/mathlib"@"01ad394a11bf06b950232720cf7e8fc6b22f0d6a" open Function open UniformConvergence @[to_additive] theorem equicontinuous_of_equicontinuousAt_one {ΞΉ G M hom : Type*} [TopologicalSpac...
Mathlib/Topology/Algebra/Equicontinuity.lean
36
47
theorem uniformEquicontinuous_of_equicontinuousAt_one {ΞΉ G M hom : Type*} [UniformSpace G] [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M] [FunLike hom G M] [MonoidHomClass hom G M] (F : ΞΉ β†’ hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) : UniformEquicontinuous ((↑) ∘ F) := by
rw [uniformEquicontinuous_iff_uniformContinuous] rw [equicontinuousAt_iff_continuousAt] at hf let Ο† : G β†’* (ΞΉ β†’α΅€ M) := { toFun := swap ((↑) ∘ F) map_one' := by dsimp [UniformFun]; ext; exact map_one _ map_mul' := fun a b => by dsimp [UniformFun]; ext; exact map_mul _ _ _ } exact uniformContinuo...
14
import Mathlib.Data.Nat.Bits import Mathlib.Order.Lattice #align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" namespace Nat section set_option linter.deprecated false theorem shiftLeft_eq_mul_pow (m) : βˆ€ n, m <<< n = m * 2 ^ n := shiftLeft_eq _ #align nat....
Mathlib/Data/Nat/Size.lean
38
39
theorem shiftLeft'_ne_zero_left (b) {m} (h : m β‰  0) (n) : shiftLeft' b m n β‰  0 := by
induction n <;> simp [bit_ne_zero, shiftLeft', *]
15
import Mathlib.Data.Nat.Bits import Mathlib.Order.Lattice #align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" namespace Nat section set_option linter.deprecated false theorem shiftLeft_eq_mul_pow (m) : βˆ€ n, m <<< n = m * 2 ^ n := shiftLeft_eq _ #align nat....
Mathlib/Data/Nat/Size.lean
51
51
theorem size_zero : size 0 = 0 := by
simp [size]
15
import Mathlib.Data.Nat.Bits import Mathlib.Order.Lattice #align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" namespace Nat section set_option linter.deprecated false theorem shiftLeft_eq_mul_pow (m) : βˆ€ n, m <<< n = m * 2 ^ n := shiftLeft_eq _ #align nat....
Mathlib/Data/Nat/Size.lean
55
61
theorem size_bit {b n} (h : bit b n β‰  0) : size (bit b n) = succ (size n) := by
rw [size] conv => lhs rw [binaryRec] simp [h] rw [div2_bit]
15
import Mathlib.Data.Nat.Bits import Mathlib.Order.Lattice #align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" namespace Nat section set_option linter.deprecated false theorem shiftLeft_eq_mul_pow (m) : βˆ€ n, m <<< n = m * 2 ^ n := shiftLeft_eq _ #align nat....
Mathlib/Data/Nat/Size.lean
85
97
theorem size_shiftLeft' {b m n} (h : shiftLeft' b m n β‰  0) : size (shiftLeft' b m n) = size m + n := by
induction' n with n IH <;> simp [shiftLeft'] at h ⊒ rw [size_bit h, Nat.add_succ] by_cases s0 : shiftLeft' b m n = 0 <;> [skip; rw [IH s0]] rw [s0] at h ⊒ cases b; · exact absurd rfl h have : shiftLeft' true m n + 1 = 1 := congr_arg (· + 1) s0 rw [shiftLeft'_tt_eq_mul_pow] at this obtain rfl := succ.in...
15
import Mathlib.Data.Nat.Bits import Mathlib.Order.Lattice #align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" namespace Nat section set_option linter.deprecated false theorem shiftLeft_eq_mul_pow (m) : βˆ€ n, m <<< n = m * 2 ^ n := shiftLeft_eq _ #align nat....
Mathlib/Data/Nat/Size.lean
103
104
theorem size_shiftLeft {m} (h : m β‰  0) (n) : size (m <<< n) = size m + n := by
simp only [size_shiftLeft' (shiftLeft'_ne_zero_left _ h _), ← shiftLeft'_false]
15
import Mathlib.Data.Nat.Bits import Mathlib.Order.Lattice #align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" namespace Nat section set_option linter.deprecated false theorem shiftLeft_eq_mul_pow (m) : βˆ€ n, m <<< n = m * 2 ^ n := shiftLeft_eq _ #align nat....
Mathlib/Data/Nat/Size.lean
107
116
theorem lt_size_self (n : β„•) : n < 2 ^ size n := by
rw [← one_shiftLeft] have : βˆ€ {n}, n = 0 β†’ n < 1 <<< (size n) := by simp apply binaryRec _ _ n Β· apply this rfl intro b n IH by_cases h : bit b n = 0 Β· apply this h rw [size_bit h, shiftLeft_succ, shiftLeft_eq, one_mul, ← bit0_val] exact bit_lt_bit0 _ (by simpa [shiftLeft_eq, shiftRight_eq_div_pow] u...
15
import Mathlib.Data.Nat.Bits import Mathlib.Order.Lattice #align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" namespace Nat section set_option linter.deprecated false theorem shiftLeft_eq_mul_pow (m) : βˆ€ n, m <<< n = m * 2 ^ n := shiftLeft_eq _ #align nat....
Mathlib/Data/Nat/Size.lean
137
138
theorem lt_size {m n : β„•} : m < size n ↔ 2 ^ m ≀ n := by
rw [← not_lt, Decidable.iff_not_comm, not_lt, size_le]
15
import Mathlib.Data.Nat.Bits import Mathlib.Order.Lattice #align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" namespace Nat section set_option linter.deprecated false theorem shiftLeft_eq_mul_pow (m) : βˆ€ n, m <<< n = m * 2 ^ n := shiftLeft_eq _ #align nat....
Mathlib/Data/Nat/Size.lean
141
141
theorem size_pos {n : β„•} : 0 < size n ↔ 0 < n := by
rw [lt_size]; rfl
15
import Mathlib.Data.Nat.Bits import Mathlib.Order.Lattice #align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" namespace Nat section set_option linter.deprecated false theorem shiftLeft_eq_mul_pow (m) : βˆ€ n, m <<< n = m * 2 ^ n := shiftLeft_eq _ #align nat....
Mathlib/Data/Nat/Size.lean
144
145
theorem size_eq_zero {n : β„•} : size n = 0 ↔ n = 0 := by
simpa [Nat.pos_iff_ne_zero, not_iff_not] using size_pos
15
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
27
27
theorem dist_comm (n m : β„•) : dist n m = dist m n := by
simp [dist, add_comm]
16
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
31
31
theorem dist_self (n : β„•) : dist n n = 0 := by
simp [dist, tsub_self]
16
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
42
42
theorem dist_eq_zero {n m : β„•} (h : n = m) : dist n m = 0 := by
rw [h, dist_self]
16
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
45
46
theorem dist_eq_sub_of_le {n m : β„•} (h : n ≀ m) : dist n m = m - n := by
rw [dist, tsub_eq_zero_iff_le.mpr h, zero_add]
16
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
49
50
theorem dist_eq_sub_of_le_right {n m : β„•} (h : m ≀ n) : dist n m = n - m := by
rw [dist_comm]; apply dist_eq_sub_of_le h
16
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
57
57
theorem dist_tri_right (n m : β„•) : m ≀ n + dist n m := by
rw [add_comm]; apply dist_tri_left
16
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
60
60
theorem dist_tri_left' (n m : β„•) : n ≀ dist n m + m := by
rw [dist_comm]; apply dist_tri_left
16
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
63
63
theorem dist_tri_right' (n m : β„•) : n ≀ m + dist n m := by
rw [dist_comm]; apply dist_tri_right
16
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]
16
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
81
82
theorem dist_add_add_left (k n m : β„•) : dist (k + n) (k + m) = dist n m := by
rw [add_comm k n, add_comm k m]; apply dist_add_add_right
16
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
85
89
theorem dist_eq_intro {n m k l : β„•} (h : n + m = k + l) : dist n k = dist l m := calc dist n k = dist (n + m) (k + m) := by
rw [dist_add_add_right] _ = dist (k + l) (k + m) := by rw [h] _ = dist l m := by rw [dist_add_add_left]
16
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
92
96
theorem dist.triangle_inequality (n m k : β„•) : dist n k ≀ dist n m + dist m k := by
have : dist n m + dist m k = n - m + (m - k) + (k - m + (m - n)) := by simp [dist, add_comm, add_left_comm, add_assoc] rw [this, dist] exact add_le_add tsub_le_tsub_add_tsub tsub_le_tsub_add_tsub
16
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
99
100
theorem dist_mul_right (n k m : β„•) : dist (n * k) (m * k) = dist n m * k := by
rw [dist, dist, right_distrib, tsub_mul n, tsub_mul m]
16
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
103
104
theorem dist_mul_left (k n m : β„•) : dist (k * n) (k * m) = k * dist n m := by
rw [mul_comm k n, mul_comm k m, dist_mul_right, mul_comm]
16
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
4