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
num_lines
int64
1
150
complexity_score
float64
2.72
139,370,958,066,637,970,000,000,000,000,000,000,000,000,000,000,000,000,000B
diff_level
int64
0
2
file_diff_level
float64
0
2
theorem_same_file
int64
1
32
rank_file
int64
0
2.51k
import Mathlib.Analysis.Quaternion import Mathlib.Analysis.NormedSpace.Exponential import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series #align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Quaternion Nat open...
Mathlib/Analysis/NormedSpace/QuaternionExponential.lean
39
55
theorem expSeries_even_of_imaginary {q : Quaternion ℝ} (hq : q.re = 0) (n : β„•) : expSeries ℝ (Quaternion ℝ) (2 * n) (fun _ => q) = ↑((-1 : ℝ) ^ n * β€–qβ€– ^ (2 * n) / (2 * n)!) := by
rw [expSeries_apply_eq] have hq2 : q ^ 2 = -normSq q := sq_eq_neg_normSq.mpr hq letI k : ℝ := ↑(2 * n)! calc k⁻¹ β€’ q ^ (2 * n) = k⁻¹ β€’ (-normSq q) ^ n := by rw [pow_mul, hq2] _ = k⁻¹ β€’ ↑((-1 : ℝ) ^ n * β€–qβ€– ^ (2 * n)) := ?_ _ = ↑((-1 : ℝ) ^ n * β€–qβ€– ^ (2 * n) / k) := ?_ Β· congr 1 rw [neg_pow, n...
14
1,202,604.284165
2
1.375
8
1,470
import Mathlib.Analysis.Quaternion import Mathlib.Analysis.NormedSpace.Exponential import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series #align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Quaternion Nat open...
Mathlib/Analysis/NormedSpace/QuaternionExponential.lean
59
78
theorem expSeries_odd_of_imaginary {q : Quaternion ℝ} (hq : q.re = 0) (n : β„•) : expSeries ℝ (Quaternion ℝ) (2 * n + 1) (fun _ => q) = (((-1 : ℝ) ^ n * β€–qβ€– ^ (2 * n + 1) / (2 * n + 1)!) / β€–qβ€–) β€’ q := by
rw [expSeries_apply_eq] obtain rfl | hq0 := eq_or_ne q 0 Β· simp have hq2 : q ^ 2 = -normSq q := sq_eq_neg_normSq.mpr hq have hqn := norm_ne_zero_iff.mpr hq0 let k : ℝ := ↑(2 * n + 1)! calc k⁻¹ β€’ q ^ (2 * n + 1) = k⁻¹ β€’ ((-normSq q) ^ n * q) := by rw [pow_succ, pow_mul, hq2] _ = k⁻¹ β€’ ((-1 : ℝ) ^ ...
17
24,154,952.753575
2
1.375
8
1,470
import Mathlib.Analysis.Quaternion import Mathlib.Analysis.NormedSpace.Exponential import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series #align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Quaternion Nat open...
Mathlib/Analysis/NormedSpace/QuaternionExponential.lean
82
94
theorem hasSum_expSeries_of_imaginary {q : Quaternion ℝ} (hq : q.re = 0) {c s : ℝ} (hc : HasSum (fun n => (-1 : ℝ) ^ n * β€–qβ€– ^ (2 * n) / (2 * n)!) c) (hs : HasSum (fun n => (-1 : ℝ) ^ n * β€–qβ€– ^ (2 * n + 1) / (2 * n + 1)!) s) : HasSum (fun n => expSeries ℝ (Quaternion ℝ) n fun _ => q) (↑c + (s / β€–qβ€–) β€’ q) :=...
replace hc := hasSum_coe.mpr hc replace hs := (hs.div_const β€–qβ€–).smul_const q refine HasSum.even_add_odd ?_ ?_ Β· convert hc using 1 ext n : 1 rw [expSeries_even_of_imaginary hq] Β· convert hs using 1 ext n : 1 rw [expSeries_odd_of_imaginary hq]
9
8,103.083928
2
1.375
8
1,470
import Mathlib.Analysis.Quaternion import Mathlib.Analysis.NormedSpace.Exponential import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series #align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Quaternion Nat open...
Mathlib/Analysis/NormedSpace/QuaternionExponential.lean
98
103
theorem exp_of_re_eq_zero (q : Quaternion ℝ) (hq : q.re = 0) : exp ℝ q = ↑(Real.cos β€–qβ€–) + (Real.sin β€–qβ€– / β€–qβ€–) β€’ q := by
rw [exp_eq_tsum] refine HasSum.tsum_eq ?_ simp_rw [← expSeries_apply_eq] exact hasSum_expSeries_of_imaginary hq (Real.hasSum_cos _) (Real.hasSum_sin _)
4
54.59815
2
1.375
8
1,470
import Mathlib.Analysis.Quaternion import Mathlib.Analysis.NormedSpace.Exponential import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series #align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Quaternion Nat open...
Mathlib/Analysis/NormedSpace/QuaternionExponential.lean
107
111
theorem exp_eq (q : Quaternion ℝ) : exp ℝ q = exp ℝ q.re β€’ (↑(Real.cos β€–q.imβ€–) + (Real.sin β€–q.imβ€– / β€–q.imβ€–) β€’ q.im) := by
rw [← exp_of_re_eq_zero q.im q.im_re, ← coe_mul_eq_smul, ← exp_coe, ← exp_add_of_commute, re_add_im] exact Algebra.commutes q.re (_ : ℍ[ℝ])
3
20.085537
1
1.375
8
1,470
import Mathlib.Analysis.Quaternion import Mathlib.Analysis.NormedSpace.Exponential import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series #align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Quaternion Nat open...
Mathlib/Analysis/NormedSpace/QuaternionExponential.lean
114
114
theorem re_exp (q : ℍ[ℝ]) : (exp ℝ q).re = exp ℝ q.re * Real.cos β€–q - q.reβ€– := by
simp [exp_eq]
1
2.718282
0
1.375
8
1,470
import Mathlib.Analysis.Quaternion import Mathlib.Analysis.NormedSpace.Exponential import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series #align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Quaternion Nat open...
Mathlib/Analysis/NormedSpace/QuaternionExponential.lean
117
118
theorem im_exp (q : ℍ[ℝ]) : (exp ℝ q).im = (exp ℝ q.re * (Real.sin β€–q.imβ€– / β€–q.imβ€–)) β€’ q.im := by
simp [exp_eq, smul_smul]
1
2.718282
0
1.375
8
1,470
import Mathlib.Analysis.Quaternion import Mathlib.Analysis.NormedSpace.Exponential import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series #align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Quaternion Nat open...
Mathlib/Analysis/NormedSpace/QuaternionExponential.lean
121
135
theorem normSq_exp (q : ℍ[ℝ]) : normSq (exp ℝ q) = exp ℝ q.re ^ 2 := calc normSq (exp ℝ q) = normSq (exp ℝ q.re β€’ (↑(Real.cos β€–q.imβ€–) + (Real.sin β€–q.imβ€– / β€–q.imβ€–) β€’ q.im)) := by
rw [exp_eq] _ = exp ℝ q.re ^ 2 * normSq (↑(Real.cos β€–q.imβ€–) + (Real.sin β€–q.imβ€– / β€–q.imβ€–) β€’ q.im) := by rw [normSq_smul] _ = exp ℝ q.re ^ 2 * (Real.cos β€–q.imβ€– ^ 2 + Real.sin β€–q.imβ€– ^ 2) := by congr 1 obtain hv | hv := eq_or_ne β€–q.imβ€– 0 Β· simp [hv] rw [normSq_add, normSq_smul,...
11
59,874.141715
2
1.375
8
1,470
import Mathlib.Data.List.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.Nat.Defs import Mathlib.Init.Data.List.Basic import Mathlib.Util.AssertExists -- Make sure we haven't imported `Data.Nat.Order.Basic` assert_not_exists OrderedSub namespace List universe u v variable {Ξ± : Type u} {Ξ² : Type v} (l :...
Mathlib/Data/List/GetD.lean
38
44
theorem getD_eq_get {n : β„•} (hn : n < l.length) : l.getD n d = l.get ⟨n, hn⟩ := by
induction l generalizing n with | nil => simp at hn | cons head tail ih => cases n Β· exact getD_cons_zero Β· exact ih _
6
403.428793
2
1.375
8
1,471
import Mathlib.Data.List.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.Nat.Defs import Mathlib.Init.Data.List.Basic import Mathlib.Util.AssertExists -- Make sure we haven't imported `Data.Nat.Order.Basic` assert_not_exists OrderedSub namespace List universe u v variable {Ξ± : Type u} {Ξ² : Type v} (l :...
Mathlib/Data/List/GetD.lean
47
53
theorem getD_map {n : β„•} (f : Ξ± β†’ Ξ²) : (map f l).getD n (f d) = f (l.getD n d) := by
induction l generalizing n with | nil => rfl | cons head tail ih => cases n Β· rfl Β· simp [ih]
6
403.428793
2
1.375
8
1,471
import Mathlib.Data.List.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.Nat.Defs import Mathlib.Init.Data.List.Basic import Mathlib.Util.AssertExists -- Make sure we haven't imported `Data.Nat.Order.Basic` assert_not_exists OrderedSub namespace List universe u v variable {Ξ± : Type u} {Ξ² : Type v} (l :...
Mathlib/Data/List/GetD.lean
57
63
theorem getD_eq_default {n : β„•} (hn : l.length ≀ n) : l.getD n d = d := by
induction l generalizing n with | nil => exact getD_nil | cons head tail ih => cases n Β· simp at hn Β· exact ih (Nat.le_of_succ_le_succ hn)
6
403.428793
2
1.375
8
1,471
import Mathlib.Data.List.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.Nat.Defs import Mathlib.Init.Data.List.Basic import Mathlib.Util.AssertExists -- Make sure we haven't imported `Data.Nat.Order.Basic` assert_not_exists OrderedSub namespace List universe u v variable {Ξ± : Type u} {Ξ² : Type v} (l :...
Mathlib/Data/List/GetD.lean
73
73
theorem getD_singleton_default_eq (n : β„•) : [d].getD n d = d := by
cases n <;> simp
1
2.718282
0
1.375
8
1,471
import Mathlib.Data.List.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.Nat.Defs import Mathlib.Init.Data.List.Basic import Mathlib.Util.AssertExists -- Make sure we haven't imported `Data.Nat.Order.Basic` assert_not_exists OrderedSub namespace List universe u v variable {Ξ± : Type u} {Ξ² : Type v} (l :...
Mathlib/Data/List/GetD.lean
77
80
theorem getD_replicate_default_eq (r n : β„•) : (replicate r d).getD n d = d := by
induction r generalizing n with | zero => simp | succ n ih => cases n <;> simp [ih]
3
20.085537
1
1.375
8
1,471
import Mathlib.Data.List.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.Nat.Defs import Mathlib.Init.Data.List.Basic import Mathlib.Util.AssertExists -- Make sure we haven't imported `Data.Nat.Order.Basic` assert_not_exists OrderedSub namespace List universe u v variable {Ξ± : Type u} {Ξ² : Type v} (l :...
Mathlib/Data/List/GetD.lean
83
86
theorem getD_append (l l' : List Ξ±) (d : Ξ±) (n : β„•) (h : n < l.length) : (l ++ l').getD n d = l.getD n d := by
rw [getD_eq_get _ _ (Nat.lt_of_lt_of_le h (length_append _ _ β–Έ Nat.le_add_right _ _)), get_append _ h, getD_eq_get]
2
7.389056
1
1.375
8
1,471
import Mathlib.Data.List.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.Nat.Defs import Mathlib.Init.Data.List.Basic import Mathlib.Util.AssertExists -- Make sure we haven't imported `Data.Nat.Order.Basic` assert_not_exists OrderedSub namespace List universe u v variable {Ξ± : Type u} {Ξ² : Type v} (l :...
Mathlib/Data/List/GetD.lean
89
99
theorem getD_append_right (l l' : List Ξ±) (d : Ξ±) (n : β„•) (h : l.length ≀ n) : (l ++ l').getD n d = l'.getD (n - l.length) d := by
cases Nat.lt_or_ge n (l ++ l').length with | inl h' => rw [getD_eq_get (l ++ l') d h', get_append_right, getD_eq_get] Β· rw [length_append] at h' exact Nat.sub_lt_left_of_lt_add h h' Β· exact Nat.not_lt_of_le h | inr h' => rw [getD_eq_default _ _ h', getD_eq_default] rwa [Nat.le_sub_iff_a...
9
8,103.083928
2
1.375
8
1,471
import Mathlib.Data.List.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.Nat.Defs import Mathlib.Init.Data.List.Basic import Mathlib.Util.AssertExists -- Make sure we haven't imported `Data.Nat.Order.Basic` assert_not_exists OrderedSub namespace List universe u v variable {Ξ± : Type u} {Ξ² : Type v} (l :...
Mathlib/Data/List/GetD.lean
102
105
theorem getD_eq_getD_get? (n : β„•) : l.getD n d = (l.get? n).getD d := by
cases Nat.lt_or_ge n l.length with | inl h => rw [getD_eq_get _ _ h, get?_eq_get h, Option.getD_some] | inr h => rw [getD_eq_default _ _ h, get?_eq_none.mpr h, Option.getD_none]
3
20.085537
1
1.375
8
1,471
import Mathlib.Combinatorics.Quiver.Path import Mathlib.Combinatorics.Quiver.Push #align_import combinatorics.quiver.symmetric from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" universe v u w v' namespace Quiver -- Porting note: no hasNonemptyInstance linter yet def Symmetrify (V : ...
Mathlib/Combinatorics/Quiver/Symmetric.lean
61
62
theorem reverse_reverse [h : HasInvolutiveReverse V] {a b : V} (f : a ⟢ b) : reverse (reverse f) = f := by
apply h.inv'
1
2.718282
0
1.375
8
1,472
import Mathlib.Combinatorics.Quiver.Path import Mathlib.Combinatorics.Quiver.Push #align_import combinatorics.quiver.symmetric from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" universe v u w v' namespace Quiver -- Porting note: no hasNonemptyInstance linter yet def Symmetrify (V : ...
Mathlib/Combinatorics/Quiver/Symmetric.lean
66
72
theorem reverse_inj [h : HasInvolutiveReverse V] {a b : V} (f g : a ⟢ b) : reverse f = reverse g ↔ f = g := by
constructor Β· rintro h simpa using congr_arg Quiver.reverse h Β· rintro h congr
5
148.413159
2
1.375
8
1,472
import Mathlib.Combinatorics.Quiver.Path import Mathlib.Combinatorics.Quiver.Push #align_import combinatorics.quiver.symmetric from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" universe v u w v' namespace Quiver -- Porting note: no hasNonemptyInstance linter yet def Symmetrify (V : ...
Mathlib/Combinatorics/Quiver/Symmetric.lean
75
77
theorem eq_reverse_iff [h : HasInvolutiveReverse V] {a b : V} (f : a ⟢ b) (g : b ⟢ a) : f = reverse g ↔ reverse f = g := by
rw [← reverse_inj, reverse_reverse]
1
2.718282
0
1.375
8
1,472
import Mathlib.Combinatorics.Quiver.Path import Mathlib.Combinatorics.Quiver.Push #align_import combinatorics.quiver.symmetric from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" universe v u w v' namespace Quiver -- Porting note: no hasNonemptyInstance linter yet def Symmetrify (V : ...
Mathlib/Combinatorics/Quiver/Symmetric.lean
150
154
theorem Path.reverse_comp [HasReverse V] {a b c : V} (p : Path a b) (q : Path b c) : (p.comp q).reverse = q.reverse.comp p.reverse := by
induction' q with _ _ _ _ h Β· simp Β· simp [h]
3
20.085537
1
1.375
8
1,472
import Mathlib.Combinatorics.Quiver.Path import Mathlib.Combinatorics.Quiver.Push #align_import combinatorics.quiver.symmetric from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" universe v u w v' namespace Quiver -- Porting note: no hasNonemptyInstance linter yet def Symmetrify (V : ...
Mathlib/Combinatorics/Quiver/Symmetric.lean
158
163
theorem Path.reverse_reverse [h : HasInvolutiveReverse V] {a b : V} (p : Path a b) : p.reverse.reverse = p := by
induction' p with _ _ _ _ h Β· simp Β· rw [Path.reverse, Path.reverse_comp, h, Path.reverse_toPath, Quiver.reverse_reverse] rfl
4
54.59815
2
1.375
8
1,472
import Mathlib.Combinatorics.Quiver.Path import Mathlib.Combinatorics.Quiver.Push #align_import combinatorics.quiver.symmetric from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" universe v u w v' namespace Quiver -- Porting note: no hasNonemptyInstance linter yet def Symmetrify (V : ...
Mathlib/Combinatorics/Quiver/Symmetric.lean
188
194
theorem lift_spec [HasReverse V'] (Ο† : Prefunctor V V') : Symmetrify.of.comp (Symmetrify.lift Ο†) = Ο† := by
fapply Prefunctor.ext Β· rintro X rfl Β· rintro X Y f rfl
5
148.413159
2
1.375
8
1,472
import Mathlib.Combinatorics.Quiver.Path import Mathlib.Combinatorics.Quiver.Push #align_import combinatorics.quiver.symmetric from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" universe v u w v' namespace Quiver -- Porting note: no hasNonemptyInstance linter yet def Symmetrify (V : ...
Mathlib/Combinatorics/Quiver/Symmetric.lean
197
204
theorem lift_reverse [h : HasInvolutiveReverse V'] (Ο† : Prefunctor V V') {X Y : Symmetrify V} (f : X ⟢ Y) : (Symmetrify.lift Ο†).map (Quiver.reverse f) = Quiver.reverse ((Symmetrify.lift Ο†).map f) := by
dsimp [Symmetrify.lift]; cases f Β· simp only rfl Β· simp only [reverse_reverse] rfl
5
148.413159
2
1.375
8
1,472
import Mathlib.Combinatorics.Quiver.Path import Mathlib.Combinatorics.Quiver.Push #align_import combinatorics.quiver.symmetric from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" universe v u w v' namespace Quiver -- Porting note: no hasNonemptyInstance linter yet def Symmetrify (V : ...
Mathlib/Combinatorics/Quiver/Symmetric.lean
208
219
theorem lift_unique [HasReverse V'] (Ο† : V β₯€q V') (Ξ¦ : Symmetrify V β₯€q V') (hΞ¦ : (of β‹™q Ξ¦) = Ο†) (hΞ¦inv : βˆ€ {X Y : Symmetrify V} (f : X ⟢ Y), Ξ¦.map (Quiver.reverse f) = Quiver.reverse (Ξ¦.map f)) : Ξ¦ = Symmetrify.lift Ο† := by
subst_vars fapply Prefunctor.ext · rintro X rfl · rintro X Y f cases f · rfl · exact hΦinv (Sum.inl _)
8
2,980.957987
2
1.375
8
1,472
import Mathlib.Algebra.GCDMonoid.Multiset import Mathlib.Combinatorics.Enumerative.Partition import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Cycle.Factors import Mathlib.GroupTheory.Perm.Closure import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Tactic.NormNum.GCD #align_import group_theory.perm.cycl...
Mathlib/GroupTheory/Perm/Cycle/Type.lean
57
64
theorem cycleType_eq' {Οƒ : Perm Ξ±} (s : Finset (Perm Ξ±)) (h1 : βˆ€ f : Perm Ξ±, f ∈ s β†’ f.IsCycle) (h2 : (s : Set (Perm Ξ±)).Pairwise Disjoint) (h0 : s.noncommProd id (h2.imp fun _ _ => Disjoint.commute) = Οƒ) : Οƒ.cycleType = s.1.map (Finset.card ∘ support) := by
rw [cycleType_def] congr rw [cycleFactorsFinset_eq_finset] exact ⟨h1, h2, h0⟩
4
54.59815
2
1.375
8
1,473
import Mathlib.Algebra.GCDMonoid.Multiset import Mathlib.Combinatorics.Enumerative.Partition import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Cycle.Factors import Mathlib.GroupTheory.Perm.Closure import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Tactic.NormNum.GCD #align_import group_theory.perm.cycl...
Mathlib/GroupTheory/Perm/Cycle/Type.lean
67
75
theorem cycleType_eq {Οƒ : Perm Ξ±} (l : List (Perm Ξ±)) (h0 : l.prod = Οƒ) (h1 : βˆ€ Οƒ : Perm Ξ±, Οƒ ∈ l β†’ Οƒ.IsCycle) (h2 : l.Pairwise Disjoint) : Οƒ.cycleType = l.map (Finset.card ∘ support) := by
have hl : l.Nodup := nodup_of_pairwise_disjoint_cycles h1 h2 rw [cycleType_eq' l.toFinset] · simp [List.dedup_eq_self.mpr hl, (· ∘ ·)] · simpa using h1 · simpa [hl] using h2 · simp [hl, h0]
6
403.428793
2
1.375
8
1,473
import Mathlib.Algebra.GCDMonoid.Multiset import Mathlib.Combinatorics.Enumerative.Partition import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Cycle.Factors import Mathlib.GroupTheory.Perm.Closure import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Tactic.NormNum.GCD #align_import group_theory.perm.cycl...
Mathlib/GroupTheory/Perm/Cycle/Type.lean
79
80
theorem cycleType_eq_zero {Οƒ : Perm Ξ±} : Οƒ.cycleType = 0 ↔ Οƒ = 1 := by
simp [cycleType_def, cycleFactorsFinset_eq_empty_iff]
1
2.718282
0
1.375
8
1,473
import Mathlib.Algebra.GCDMonoid.Multiset import Mathlib.Combinatorics.Enumerative.Partition import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Cycle.Factors import Mathlib.GroupTheory.Perm.Closure import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Tactic.NormNum.GCD #align_import group_theory.perm.cycl...
Mathlib/GroupTheory/Perm/Cycle/Type.lean
87
88
theorem card_cycleType_eq_zero {Οƒ : Perm Ξ±} : Multiset.card Οƒ.cycleType = 0 ↔ Οƒ = 1 := by
rw [card_eq_zero, cycleType_eq_zero]
1
2.718282
0
1.375
8
1,473
import Mathlib.Algebra.GCDMonoid.Multiset import Mathlib.Combinatorics.Enumerative.Partition import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Cycle.Factors import Mathlib.GroupTheory.Perm.Closure import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Tactic.NormNum.GCD #align_import group_theory.perm.cycl...
Mathlib/GroupTheory/Perm/Cycle/Type.lean
94
98
theorem two_le_of_mem_cycleType {Οƒ : Perm Ξ±} {n : β„•} (h : n ∈ Οƒ.cycleType) : 2 ≀ n := by
simp only [cycleType_def, ← Finset.mem_def, Function.comp_apply, Multiset.mem_map, mem_cycleFactorsFinset_iff] at h obtain ⟨_, ⟨hc, -⟩, rfl⟩ := h exact hc.two_le_card_support
4
54.59815
2
1.375
8
1,473
import Mathlib.Algebra.GCDMonoid.Multiset import Mathlib.Combinatorics.Enumerative.Partition import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Cycle.Factors import Mathlib.GroupTheory.Perm.Closure import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Tactic.NormNum.GCD #align_import group_theory.perm.cycl...
Mathlib/GroupTheory/Perm/Cycle/Type.lean
110
119
theorem card_cycleType_eq_one {Οƒ : Perm Ξ±} : Multiset.card Οƒ.cycleType = 1 ↔ Οƒ.IsCycle := by
rw [card_eq_one] simp_rw [cycleType_def, Multiset.map_eq_singleton, ← Finset.singleton_val, Finset.val_inj, cycleFactorsFinset_eq_singleton_iff] constructor Β· rintro ⟨_, _, ⟨h, -⟩, -⟩ exact h Β· intro h use Οƒ.support.card, Οƒ simp [h]
9
8,103.083928
2
1.375
8
1,473
import Mathlib.Algebra.GCDMonoid.Multiset import Mathlib.Combinatorics.Enumerative.Partition import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Cycle.Factors import Mathlib.GroupTheory.Perm.Closure import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Tactic.NormNum.GCD #align_import group_theory.perm.cycl...
Mathlib/GroupTheory/Perm/Cycle/Type.lean
122
126
theorem Disjoint.cycleType {Οƒ Ο„ : Perm Ξ±} (h : Disjoint Οƒ Ο„) : (Οƒ * Ο„).cycleType = Οƒ.cycleType + Ο„.cycleType := by
rw [cycleType_def, cycleType_def, cycleType_def, h.cycleFactorsFinset_mul_eq_union, ← Multiset.map_add, Finset.union_val, Multiset.add_eq_union_iff_disjoint.mpr _] exact Finset.disjoint_val.2 h.disjoint_cycleFactorsFinset
3
20.085537
1
1.375
8
1,473
import Mathlib.Algebra.GCDMonoid.Multiset import Mathlib.Combinatorics.Enumerative.Partition import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Cycle.Factors import Mathlib.GroupTheory.Perm.Closure import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Tactic.NormNum.GCD #align_import group_theory.perm.cycl...
Mathlib/GroupTheory/Perm/Cycle/Type.lean
139
144
theorem cycleType_conj {Οƒ Ο„ : Perm Ξ±} : (Ο„ * Οƒ * τ⁻¹).cycleType = Οƒ.cycleType := by
induction Οƒ using cycle_induction_on with | base_one => simp | base_cycles Οƒ hΟƒ => rw [hΟƒ.cycleType, hΟƒ.conj.cycleType, card_support_conj] | induction_disjoint Οƒ Ο€ hd _ hΟƒ hΟ€ => rw [← conj_mul, hd.cycleType, (hd.conj _).cycleType, hΟƒ, hΟ€]
5
148.413159
2
1.375
8
1,473
import Mathlib.Algebra.Polynomial.Degree.Lemmas open Polynomial namespace Mathlib.Tactic.ComputeDegree section recursion_lemmas variable {R : Type*} section semiring variable [Semiring R] theorem natDegree_C_le (a : R) : natDegree (C a) ≀ 0 := (natDegree_C a).le theorem natDegree_natCast_le (n : β„•) : natDeg...
Mathlib/Tactic/ComputeDegree.lean
101
103
theorem coeff_add_of_eq {n : β„•} {a b : R} {f g : R[X]} (h_add_left : f.coeff n = a) (h_add_right : g.coeff n = b) : (f + g).coeff n = a + b := by
subst β€Ή_β€Ί β€Ή_β€Ί; apply coeff_add
1
2.718282
0
1.4
5
1,474
import Mathlib.Algebra.Polynomial.Degree.Lemmas open Polynomial namespace Mathlib.Tactic.ComputeDegree section recursion_lemmas variable {R : Type*} section semiring variable [Semiring R] theorem natDegree_C_le (a : R) : natDegree (C a) ≀ 0 := (natDegree_C a).le theorem natDegree_natCast_le (n : β„•) : natDeg...
Mathlib/Tactic/ComputeDegree.lean
105
115
theorem coeff_mul_add_of_le_natDegree_of_eq_ite {d df dg : β„•} {a b : R} {f g : R[X]} (h_mul_left : natDegree f ≀ df) (h_mul_right : natDegree g ≀ dg) (h_mul_left : f.coeff df = a) (h_mul_right : g.coeff dg = b) (ddf : df + dg ≀ d) : (f * g).coeff d = if d = df + dg then a * b else 0 := by
split_ifs with h Β· subst h_mul_left h_mul_right h exact coeff_mul_of_natDegree_le β€Ή_β€Ί β€Ή_β€Ί Β· apply coeff_eq_zero_of_natDegree_lt apply lt_of_le_of_lt ?_ (lt_of_le_of_ne ddf ?_) Β· exact natDegree_mul_le_of_le β€Ή_β€Ί β€Ή_β€Ί Β· exact ne_comm.mp h
7
1,096.633158
2
1.4
5
1,474
import Mathlib.Algebra.Polynomial.Degree.Lemmas open Polynomial namespace Mathlib.Tactic.ComputeDegree section recursion_lemmas variable {R : Type*} section semiring variable [Semiring R] theorem natDegree_C_le (a : R) : natDegree (C a) ≀ 0 := (natDegree_C a).le theorem natDegree_natCast_le (n : β„•) : natDeg...
Mathlib/Tactic/ComputeDegree.lean
117
126
theorem coeff_pow_of_natDegree_le_of_eq_ite' {m n o : β„•} {a : R} {p : R[X]} (h_pow : natDegree p ≀ n) (h_exp : m * n ≀ o) (h_pow_bas : coeff p n = a) : coeff (p ^ m) o = if o = m * n then a ^ m else 0 := by
split_ifs with h Β· subst h h_pow_bas exact coeff_pow_of_natDegree_le β€Ή_β€Ί Β· apply coeff_eq_zero_of_natDegree_lt apply lt_of_le_of_lt ?_ (lt_of_le_of_ne β€Ή_β€Ί ?_) Β· exact natDegree_pow_le_of_le m β€Ή_β€Ί Β· exact Iff.mp ne_comm h
7
1,096.633158
2
1.4
5
1,474
import Mathlib.Algebra.Polynomial.Degree.Lemmas open Polynomial namespace Mathlib.Tactic.ComputeDegree section recursion_lemmas variable {R : Type*} section semiring variable [Semiring R] theorem natDegree_C_le (a : R) : natDegree (C a) ≀ 0 := (natDegree_C a).le theorem natDegree_natCast_le (n : β„•) : natDeg...
Mathlib/Tactic/ComputeDegree.lean
150
155
theorem natDegree_eq_of_le_of_coeff_ne_zero' {deg m o : β„•} {c : R} {p : R[X]} (h_natDeg_le : natDegree p ≀ m) (coeff_eq : coeff p o = c) (coeff_ne_zero : c β‰  0) (deg_eq_deg : m = deg) (coeff_eq_deg : o = deg) : natDegree p = deg := by
subst coeff_eq deg_eq_deg coeff_eq_deg exact natDegree_eq_of_le_of_coeff_ne_zero β€Ή_β€Ί β€Ή_β€Ί
2
7.389056
1
1.4
5
1,474
import Mathlib.Algebra.Polynomial.Degree.Lemmas open Polynomial namespace Mathlib.Tactic.ComputeDegree section recursion_lemmas variable {R : Type*} section semiring variable [Semiring R] theorem natDegree_C_le (a : R) : natDegree (C a) ≀ 0 := (natDegree_C a).le theorem natDegree_natCast_le (n : β„•) : natDeg...
Mathlib/Tactic/ComputeDegree.lean
157
165
theorem degree_eq_of_le_of_coeff_ne_zero' {deg m o : WithBot β„•} {c : R} {p : R[X]} (h_deg_le : degree p ≀ m) (coeff_eq : coeff p (WithBot.unbot' 0 deg) = c) (coeff_ne_zero : c β‰  0) (deg_eq_deg : m = deg) (coeff_eq_deg : o = deg) : degree p = deg := by
subst coeff_eq coeff_eq_deg deg_eq_deg rcases eq_or_ne m βŠ₯ with rfl|hh Β· exact bot_unique h_deg_le Β· obtain ⟨m, rfl⟩ := WithBot.ne_bot_iff_exists.mp hh exact degree_eq_of_le_of_coeff_ne_zero β€Ή_β€Ί β€Ή_β€Ί
5
148.413159
2
1.4
5
1,474
import Mathlib.AlgebraicGeometry.Restrict import Mathlib.CategoryTheory.Adjunction.Limits import Mathlib.CategoryTheory.Adjunction.Reflective #align_import algebraic_geometry.Gamma_Spec_adjunction from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" -- Explicit universe annotations were u...
Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean
77
79
theorem not_mem_prime_iff_unit_in_stalk (r : Ξ“.obj (op X)) (x : X) : r βˆ‰ (X.toΞ“SpecFun x).asIdeal ↔ IsUnit (X.Ξ“ToStalk x r) := by
erw [LocalRing.mem_maximalIdeal, Classical.not_not]
1
2.718282
0
1.4
5
1,475
import Mathlib.AlgebraicGeometry.Restrict import Mathlib.CategoryTheory.Adjunction.Limits import Mathlib.CategoryTheory.Adjunction.Reflective #align_import algebraic_geometry.Gamma_Spec_adjunction from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" -- Explicit universe annotations were u...
Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean
84
87
theorem toΞ“Spec_preim_basicOpen_eq (r : Ξ“.obj (op X)) : X.toΞ“SpecFun ⁻¹' (basicOpen r).1 = (X.toRingedSpace.basicOpen r).1 := by
ext erw [X.toRingedSpace.mem_top_basicOpen]; apply not_mem_prime_iff_unit_in_stalk
2
7.389056
1
1.4
5
1,475
import Mathlib.AlgebraicGeometry.Restrict import Mathlib.CategoryTheory.Adjunction.Limits import Mathlib.CategoryTheory.Adjunction.Reflective #align_import algebraic_geometry.Gamma_Spec_adjunction from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" -- Explicit universe annotations were u...
Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean
91
95
theorem toΞ“Spec_continuous : Continuous X.toΞ“SpecFun := by
rw [isTopologicalBasis_basic_opens.continuous_iff] rintro _ ⟨r, rfl⟩ erw [X.toΞ“Spec_preim_basicOpen_eq r] exact (X.toRingedSpace.basicOpen r).2
4
54.59815
2
1.4
5
1,475
import Mathlib.AlgebraicGeometry.Restrict import Mathlib.CategoryTheory.Adjunction.Limits import Mathlib.CategoryTheory.Adjunction.Reflective #align_import algebraic_geometry.Gamma_Spec_adjunction from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" -- Explicit universe annotations were u...
Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean
128
134
theorem isUnit_res_toΞ“SpecMapBasicOpen : IsUnit (X.toToΞ“SpecMapBasicOpen r r) := by
convert (X.presheaf.map <| (eqToHom <| X.toΞ“SpecMapBasicOpen_eq r).op).isUnit_map (X.toRingedSpace.isUnit_res_basicOpen r) -- Porting note: `rw [comp_apply]` to `erw [comp_apply]` erw [← comp_apply, ← Functor.map_comp] congr
6
403.428793
2
1.4
5
1,475
import Mathlib.AlgebraicGeometry.Restrict import Mathlib.CategoryTheory.Adjunction.Limits import Mathlib.CategoryTheory.Adjunction.Reflective #align_import algebraic_geometry.Gamma_Spec_adjunction from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" -- Explicit universe annotations were u...
Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean
146
160
theorem toΞ“SpecCApp_iff (f : (structureSheaf <| Ξ“.obj <| op X).val.obj (op <| basicOpen r) ⟢ X.presheaf.obj (op <| X.toΞ“SpecMapBasicOpen r)) : toOpen _ (basicOpen r) ≫ f = X.toToΞ“SpecMapBasicOpen r ↔ f = X.toΞ“SpecCApp r := by
-- Porting Note: Type class problem got stuck in `IsLocalization.Away.AwayMap.lift_comp` -- created instance manually. This replaces the `pick_goal` tactics have loc_inst := IsLocalization.to_basicOpen (Ξ“.obj (op X)) r rw [← @IsLocalization.Away.AwayMap.lift_comp _ _ _ _ _ _ _ r loc_inst _ (X.isUnit_res_...
10
22,026.465795
2
1.4
5
1,475
import Batteries.Data.HashMap.Basic import Batteries.Data.Array.Lemmas import Batteries.Data.Nat.Lemmas namespace Batteries.HashMap namespace Imp attribute [-simp] Bool.not_eq_true namespace Buckets @[ext] protected theorem ext : βˆ€ {b₁ bβ‚‚ : Buckets Ξ± Ξ²}, b₁.1.data = bβ‚‚.1.data β†’ b₁ = bβ‚‚ | ⟨⟨_⟩, _⟩, ⟨⟨_⟩, _⟩, rfl ...
.lake/packages/batteries/Batteries/Data/HashMap/WF.lean
23
27
theorem exists_of_update (self : Buckets Ξ± Ξ²) (i d h) : βˆƒ l₁ lβ‚‚, self.1.data = l₁ ++ self.1[i] :: lβ‚‚ ∧ List.length l₁ = i.toNat ∧ (self.update i d h).1.data = l₁ ++ d :: lβ‚‚ := by
simp only [Array.data_length, Array.ugetElem_eq_getElem, Array.getElem_eq_data_get] exact List.exists_of_set' h
2
7.389056
1
1.4
5
1,476
import Batteries.Data.HashMap.Basic import Batteries.Data.Array.Lemmas import Batteries.Data.Nat.Lemmas namespace Batteries.HashMap namespace Imp attribute [-simp] Bool.not_eq_true namespace Buckets @[ext] protected theorem ext : βˆ€ {b₁ bβ‚‚ : Buckets Ξ± Ξ²}, b₁.1.data = bβ‚‚.1.data β†’ b₁ = bβ‚‚ | ⟨⟨_⟩, _⟩, ⟨⟨_⟩, _⟩, rfl ...
.lake/packages/batteries/Batteries/Data/HashMap/WF.lean
29
33
theorem update_update (self : Buckets Ξ± Ξ²) (i d d' h h') : (self.update i d h).update i d' h' = self.update i d' h := by
simp only [update, Array.uset, Array.data_length] congr 1 rw [Array.set_set]
3
20.085537
1
1.4
5
1,476
import Batteries.Data.HashMap.Basic import Batteries.Data.Array.Lemmas import Batteries.Data.Nat.Lemmas namespace Batteries.HashMap namespace Imp attribute [-simp] Bool.not_eq_true namespace Buckets @[ext] protected theorem ext : βˆ€ {b₁ bβ‚‚ : Buckets Ξ± Ξ²}, b₁.1.data = bβ‚‚.1.data β†’ b₁ = bβ‚‚ | ⟨⟨_⟩, _⟩, ⟨⟨_⟩, _⟩, rfl ...
.lake/packages/batteries/Batteries/Data/HashMap/WF.lean
38
40
theorem mk_size (h) : (mk n h : Buckets Ξ± Ξ²).size = 0 := by
simp only [mk, mkArray, size_eq]; clear h induction n <;> simp [*]
2
7.389056
1
1.4
5
1,476
import Batteries.Data.HashMap.Basic import Batteries.Data.Array.Lemmas import Batteries.Data.Nat.Lemmas namespace Batteries.HashMap namespace Imp attribute [-simp] Bool.not_eq_true namespace Buckets @[ext] protected theorem ext : βˆ€ {b₁ bβ‚‚ : Buckets Ξ± Ξ²}, b₁.1.data = bβ‚‚.1.data β†’ b₁ = bβ‚‚ | ⟨⟨_⟩, _⟩, ⟨⟨_⟩, _⟩, rfl ...
.lake/packages/batteries/Batteries/Data/HashMap/WF.lean
42
46
theorem WF.mk' [BEq Ξ±] [Hashable Ξ±] (h) : (Buckets.mk n h : Buckets Ξ± Ξ²).WF := by
refine ⟨fun _ h => ?_, fun i h => ?_⟩ · simp only [Buckets.mk, mkArray, List.mem_replicate, ne_eq] at h simp [h, List.Pairwise.nil] · simp [Buckets.mk, empty', mkArray, Array.getElem_eq_data_get, AssocList.All]
4
54.59815
2
1.4
5
1,476
import Batteries.Data.HashMap.Basic import Batteries.Data.Array.Lemmas import Batteries.Data.Nat.Lemmas namespace Batteries.HashMap namespace Imp attribute [-simp] Bool.not_eq_true namespace Buckets @[ext] protected theorem ext : βˆ€ {b₁ bβ‚‚ : Buckets Ξ± Ξ²}, b₁.1.data = bβ‚‚.1.data β†’ b₁ = bβ‚‚ | ⟨⟨_⟩, _⟩, ⟨⟨_⟩, _⟩, rfl ...
.lake/packages/batteries/Batteries/Data/HashMap/WF.lean
48
64
theorem WF.update [BEq Ξ±] [Hashable Ξ±] {buckets : Buckets Ξ± Ξ²} {i d h} (H : buckets.WF) (h₁ : βˆ€ [PartialEquivBEq Ξ±] [LawfulHashable Ξ±], (buckets.1[i].toList.Pairwise fun a b => Β¬(a.1 == b.1)) β†’ d.toList.Pairwise fun a b => Β¬(a.1 == b.1)) (hβ‚‚ : (buckets.1[i].All fun k _ => ((hash k).toUSize % buckets...
refine ⟨fun l hl => ?_, fun i hi p hp => ?_⟩ Β· exact match List.mem_or_eq_of_mem_set hl with | .inl hl => H.1 _ hl | .inr rfl => h₁ (H.1 _ (Array.getElem_mem_data ..)) Β· revert hp simp only [Array.getElem_eq_data_get, update_data, List.get_set, Array.data_length, update_size] split <;> intro hp ...
10
22,026.465795
2
1.4
5
1,476
import Mathlib.Algebra.Homology.Linear import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex import Mathlib.Tactic.Abel #align_import algebra.homology.homotopy from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff" universe v u open scoped Classical noncomputable section open ...
Mathlib/Algebra/Homology/Homotopy.lean
51
54
theorem dNext_eq (f : βˆ€ i j, C.X i ⟢ D.X j) {i i' : ΞΉ} (w : c.Rel i i') : dNext i f = C.d i i' ≫ f i' i := by
obtain rfl := c.next_eq' w rfl
2
7.389056
1
1.4
5
1,477
import Mathlib.Algebra.Homology.Linear import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex import Mathlib.Tactic.Abel #align_import algebra.homology.homotopy from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff" universe v u open scoped Classical noncomputable section open ...
Mathlib/Algebra/Homology/Homotopy.lean
96
99
theorem prevD_eq (f : βˆ€ i j, C.X i ⟢ D.X j) {j j' : ΞΉ} (w : c.Rel j' j) : prevD j f = f j j' ≫ D.d j' j := by
obtain rfl := c.prev_eq' w rfl
2
7.389056
1
1.4
5
1,477
import Mathlib.Algebra.Homology.Linear import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex import Mathlib.Tactic.Abel #align_import algebra.homology.homotopy from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff" universe v u open scoped Classical noncomputable section open ...
Mathlib/Algebra/Homology/Homotopy.lean
109
112
theorem prevD_comp_right (f : βˆ€ i j, C.X i ⟢ D.X j) (g : D ⟢ E) (j : ΞΉ) : (prevD j fun i j => f i j ≫ g.f j) = prevD j f ≫ g.f j := by
dsimp [prevD] simp only [assoc, g.comm]
2
7.389056
1
1.4
5
1,477
import Mathlib.Algebra.Homology.Linear import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex import Mathlib.Tactic.Abel #align_import algebra.homology.homotopy from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff" universe v u open scoped Classical noncomputable section open ...
Mathlib/Algebra/Homology/Homotopy.lean
115
121
theorem dNext_nat (C D : ChainComplex V β„•) (i : β„•) (f : βˆ€ i j, C.X i ⟢ D.X j) : dNext i f = C.d i (i - 1) ≫ f (i - 1) i := by
dsimp [dNext] cases i Β· simp only [shape, ChainComplex.next_nat_zero, ComplexShape.down_Rel, Nat.one_ne_zero, not_false_iff, zero_comp] Β· congr <;> simp
5
148.413159
2
1.4
5
1,477
import Mathlib.Algebra.Homology.Linear import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex import Mathlib.Tactic.Abel #align_import algebra.homology.homotopy from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff" universe v u open scoped Classical noncomputable section open ...
Mathlib/Algebra/Homology/Homotopy.lean
124
130
theorem prevD_nat (C D : CochainComplex V β„•) (i : β„•) (f : βˆ€ i j, C.X i ⟢ D.X j) : prevD i f = f i (i - 1) ≫ D.d (i - 1) i := by
dsimp [prevD] cases i Β· simp only [shape, CochainComplex.prev_nat_zero, ComplexShape.up_Rel, Nat.one_ne_zero, not_false_iff, comp_zero] Β· congr <;> simp
5
148.413159
2
1.4
5
1,477
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {π•œ : Type*} {E F G H : Type*} open Filter List open scoped Topol...
Mathlib/Analysis/Analytic/Composition.lean
106
114
theorem applyComposition_ones (p : FormalMultilinearSeries π•œ E F) (n : β„•) : p.applyComposition (Composition.ones n) = fun v i => p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by
funext v i apply p.congr (Composition.ones_blocksFun _ _) intro j hjn hj1 obtain rfl : j = 0 := by omega refine congr_arg v ?_ rw [Fin.ext_iff, Fin.coe_castLE, Composition.ones_embedding, Fin.val_mk]
6
403.428793
2
1.4
5
1,478
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {π•œ : Type*} {E F G H : Type*} open Filter List open scoped Topol...
Mathlib/Analysis/Analytic/Composition.lean
117
127
theorem applyComposition_single (p : FormalMultilinearSeries π•œ E F) {n : β„•} (hn : 0 < n) (v : Fin n β†’ E) : p.applyComposition (Composition.single n hn) v = fun _j => p n v := by
ext j refine p.congr (by simp) fun i hi1 hi2 => ?_ dsimp congr 1 convert Composition.single_embedding hn ⟨i, hi2⟩ using 1 cases' j with j_val j_property have : j_val = 0 := le_bot_iff.1 (Nat.lt_succ_iff.1 j_property) congr! simp
9
8,103.083928
2
1.4
5
1,478
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {π•œ : Type*} {E F G H : Type*} open Filter List open scoped Topol...
Mathlib/Analysis/Analytic/Composition.lean
131
134
theorem removeZero_applyComposition (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) : p.removeZero.applyComposition c = p.applyComposition c := by
ext v i simp [applyComposition, zero_lt_one.trans_le (c.one_le_blocksFun i), removeZero_of_pos]
2
7.389056
1
1.4
5
1,478
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {π•œ : Type*} {E F G H : Type*} open Filter List open scoped Topol...
Mathlib/Analysis/Analytic/Composition.lean
140
162
theorem applyComposition_update (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) (j : Fin n) (v : Fin n β†’ E) (z : E) : p.applyComposition c (Function.update v j z) = Function.update (p.applyComposition c v) (c.index j) (p (c.blocksFun (c.index j)) (Function.update (v ∘ c....
ext k by_cases h : k = c.index j Β· rw [h] let r : Fin (c.blocksFun (c.index j)) β†’ Fin n := c.embedding (c.index j) simp only [Function.update_same] change p (c.blocksFun (c.index j)) (Function.update v j z ∘ r) = _ let j' := c.invEmbedding j suffices B : Function.update v j z ∘ r = Function.u...
17
24,154,952.753575
2
1.4
5
1,478
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {π•œ : Type*} {E F G H : Type*} open Filter List open scoped Topol...
Mathlib/Analysis/Analytic/Composition.lean
166
169
theorem compContinuousLinearMap_applyComposition {n : β„•} (p : FormalMultilinearSeries π•œ F G) (f : E β†’L[π•œ] F) (c : Composition n) (v : Fin n β†’ E) : (p.compContinuousLinearMap f).applyComposition c v = p.applyComposition c (f ∘ v) := by
simp (config := {unfoldPartialApp := true}) [applyComposition]; rfl
1
2.718282
0
1.4
5
1,478
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero namespace List variable {Ξ± : Type*} [DecidableEq Ξ±] def nextOr : βˆ€ (_ : List Ξ±) (_ _ : Ξ±), Ξ± | [], _, default => default | [_], _, d...
Mathlib/Data/List/Cycle.lean
54
58
theorem nextOr_cons_of_ne (xs : List Ξ±) (y x d : Ξ±) (h : x β‰  y) : nextOr (y :: xs) x d = nextOr xs x d := by
cases' xs with z zs Β· rfl Β· exact if_neg h
3
20.085537
1
1.4
10
1,479
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero namespace List variable {Ξ± : Type*} [DecidableEq Ξ±] def nextOr : βˆ€ (_ : List Ξ±) (_ _ : Ξ±), Ξ± | [], _, default => default | [_], _, d...
Mathlib/Data/List/Cycle.lean
62
73
theorem nextOr_eq_nextOr_of_mem_of_ne (xs : List Ξ±) (x d d' : Ξ±) (x_mem : x ∈ xs) (x_ne : x β‰  xs.getLast (ne_nil_of_mem x_mem)) : nextOr xs x d = nextOr xs x d' := by
induction' xs with y ys IH Β· cases x_mem cases' ys with z zs Β· simp at x_mem x_ne contradiction by_cases h : x = y Β· rw [h, nextOr_self_cons_cons, nextOr_self_cons_cons] Β· rw [nextOr, nextOr, IH] Β· simpa [h] using x_mem Β· simpa using x_ne
10
22,026.465795
2
1.4
10
1,479
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero namespace List variable {Ξ± : Type*} [DecidableEq Ξ±] def nextOr : βˆ€ (_ : List Ξ±) (_ _ : Ξ±), Ξ± | [], _, default => default | [_], _, d...
Mathlib/Data/List/Cycle.lean
76
84
theorem mem_of_nextOr_ne {xs : List Ξ±} {x d : Ξ±} (h : nextOr xs x d β‰  d) : x ∈ xs := by
induction' xs with y ys IH Β· simp at h cases' ys with z zs Β· simp at h Β· by_cases hx : x = y Β· simp [hx] Β· rw [nextOr_cons_of_ne _ _ _ _ hx] at h simpa [hx] using IH h
8
2,980.957987
2
1.4
10
1,479
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero namespace List variable {Ξ± : Type*} [DecidableEq Ξ±] def nextOr : βˆ€ (_ : List Ξ±) (_ _ : Ξ±), Ξ± | [], _, default => default | [_], _, d...
Mathlib/Data/List/Cycle.lean
87
91
theorem nextOr_concat {xs : List Ξ±} {x : Ξ±} (d : Ξ±) (h : x βˆ‰ xs) : nextOr (xs ++ [x]) x d = d := by
induction' xs with z zs IH · simp · obtain ⟨hz, hzs⟩ := not_or.mp (mt mem_cons.2 h) rw [cons_append, nextOr_cons_of_ne _ _ _ _ hz, IH hzs]
4
54.59815
2
1.4
10
1,479
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero namespace List variable {Ξ± : Type*} [DecidableEq Ξ±] def nextOr : βˆ€ (_ : List Ξ±) (_ _ : Ξ±), Ξ± | [], _, default => default | [_], _, d...
Mathlib/Data/List/Cycle.lean
94
106
theorem nextOr_mem {xs : List α} {x d : α} (hd : d ∈ xs) : nextOr xs x d ∈ xs := by
revert hd suffices βˆ€ xs' : List Ξ±, (βˆ€ x ∈ xs, x ∈ xs') β†’ d ∈ xs' β†’ nextOr xs x d ∈ xs' by exact this xs fun _ => id intro xs' hxs' hd induction' xs with y ys ih Β· exact hd cases' ys with z zs Β· exact hd rw [nextOr] split_ifs with h Β· exact hxs' _ (mem_cons_of_mem _ (mem_cons_self _ _)) Β· exac...
12
162,754.791419
2
1.4
10
1,479
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero namespace List variable {Ξ± : Type*} [DecidableEq Ξ±] def nextOr : βˆ€ (_ : List Ξ±) (_ _ : Ξ±), Ξ± | [], _, default => default | [_], _, d...
Mathlib/Data/List/Cycle.lean
154
155
theorem next_cons_cons_eq' (y z : α) (h : x ∈ y :: z :: l) (hx : x = y) : next (y :: z :: l) x h = z := by
rw [next, nextOr, if_pos hx]
1
2.718282
0
1.4
10
1,479
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero namespace List variable {Ξ± : Type*} [DecidableEq Ξ±] def nextOr : βˆ€ (_ : List Ξ±) (_ _ : Ξ±), Ξ± | [], _, default => default | [_], _, d...
Mathlib/Data/List/Cycle.lean
163
169
theorem next_ne_head_ne_getLast (h : x ∈ l) (y : Ξ±) (h : x ∈ y :: l) (hy : x β‰  y) (hx : x β‰  getLast (y :: l) (cons_ne_nil _ _)) : next (y :: l) x h = next l x (by simpa [hy] using h) := by
rw [next, next, nextOr_cons_of_ne _ _ _ _ hy, nextOr_eq_nextOr_of_mem_of_ne] Β· rwa [getLast_cons] at hx exact ne_nil_of_mem (by assumption) Β· rwa [getLast_cons] at hx
4
54.59815
2
1.4
10
1,479
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero namespace List variable {Ξ± : Type*} [DecidableEq Ξ±] def nextOr : βˆ€ (_ : List Ξ±) (_ _ : Ξ±), Ξ± | [], _, default => default | [_], _, d...
Mathlib/Data/List/Cycle.lean
172
177
theorem next_cons_concat (y : Ξ±) (hy : x β‰  y) (hx : x βˆ‰ l) (h : x ∈ y :: l ++ [x] := mem_append_right _ (mem_singleton_self x)) : next (y :: l ++ [x]) x h = y := by
rw [next, nextOr_concat] Β· rfl Β· simp [hy, hx]
3
20.085537
1
1.4
10
1,479
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero open List def Cycle (Ξ± : Type*) : Type _ := Quotient (IsRotated.setoid Ξ±) #align cycle Cycle namespace Cycle variable {Ξ± : Type*} --...
Mathlib/Data/List/Cycle.lean
601
602
theorem subsingleton_reverse_iff {s : Cycle Ξ±} : s.reverse.Subsingleton ↔ s.Subsingleton := by
simp [length_subsingleton_iff]
1
2.718282
0
1.4
10
1,479
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero open List def Cycle (Ξ± : Type*) : Type _ := Quotient (IsRotated.setoid Ξ±) #align cycle Cycle namespace Cycle variable {Ξ± : Type*} --...
Mathlib/Data/List/Cycle.lean
605
610
theorem Subsingleton.congr {s : Cycle Ξ±} (h : Subsingleton s) : βˆ€ ⦃x⦄ (_hx : x ∈ s) ⦃y⦄ (_hy : y ∈ s), x = y := by
induction' s using Quot.inductionOn with l simp only [length_subsingleton_iff, length_coe, mk_eq_coe, le_iff_lt_or_eq, Nat.lt_add_one_iff, length_eq_zero, length_eq_one, Nat.not_lt_zero, false_or_iff] at h rcases h with (rfl | ⟨z, rfl⟩) <;> simp
4
54.59815
2
1.4
10
1,479
import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Combinatorics.Enumerative.DoubleCounting import Mathlib.Data.Finset.Pointwise import Mathlib.Tactic.GCongr #align_import combinatorics.additive.pluennecke_ruzsa from "leanprover-community/mathlib"@"4aab2abced69a9e579b1e6dc...
Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean
45
56
theorem card_div_mul_le_card_div_mul_card_div (A B C : Finset Ξ±) : (A / C).card * B.card ≀ (A / B).card * (B / C).card := by
rw [← card_product (A / B), ← mul_one ((A / B) Γ—Λ’ (B / C)).card] refine card_mul_le_card_mul (fun b ac ↦ ac.1 * ac.2 = b) (fun x hx ↦ ?_) fun x _ ↦ card_le_one_iff.2 fun hu hv ↦ ((mem_bipartiteBelow _).1 hu).2.symm.trans ?_ obtain ⟨a, ha, c, hc, rfl⟩ := mem_div.1 hx refine card_le_card_of_inj_on (fun...
10
22,026.465795
2
1.4
5
1,480
import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Combinatorics.Enumerative.DoubleCounting import Mathlib.Data.Finset.Pointwise import Mathlib.Tactic.GCongr #align_import combinatorics.additive.pluennecke_ruzsa from "leanprover-community/mathlib"@"4aab2abced69a9e579b1e6dc...
Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean
63
66
theorem card_div_mul_le_card_mul_mul_card_mul (A B C : Finset Ξ±) : (A / C).card * B.card ≀ (A * B).card * (B * C).card := by
rw [← div_inv_eq_mul, ← card_inv B, ← card_inv (B * C), mul_inv, ← div_eq_mul_inv] exact card_div_mul_le_card_div_mul_card_div _ _ _
2
7.389056
1
1.4
5
1,480
import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Combinatorics.Enumerative.DoubleCounting import Mathlib.Data.Finset.Pointwise import Mathlib.Tactic.GCongr #align_import combinatorics.additive.pluennecke_ruzsa from "leanprover-community/mathlib"@"4aab2abced69a9e579b1e6dc...
Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean
73
76
theorem card_mul_mul_le_card_div_mul_card_mul (A B C : Finset Ξ±) : (A * C).card * B.card ≀ (A / B).card * (B * C).card := by
rw [← div_inv_eq_mul, ← div_inv_eq_mul B] exact card_div_mul_le_card_div_mul_card_div _ _ _
2
7.389056
1
1.4
5
1,480
import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Combinatorics.Enumerative.DoubleCounting import Mathlib.Data.Finset.Pointwise import Mathlib.Tactic.GCongr #align_import combinatorics.additive.pluennecke_ruzsa from "leanprover-community/mathlib"@"4aab2abced69a9e579b1e6dc...
Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean
83
86
theorem card_mul_mul_le_card_mul_mul_card_div (A B C : Finset Ξ±) : (A * C).card * B.card ≀ (A * B).card * (B / C).card := by
rw [← div_inv_eq_mul, div_eq_mul_inv B] exact card_div_mul_le_card_mul_mul_card_mul _ _ _
2
7.389056
1
1.4
5
1,480
import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Combinatorics.Enumerative.DoubleCounting import Mathlib.Data.Finset.Pointwise import Mathlib.Tactic.GCongr #align_import combinatorics.additive.pluennecke_ruzsa from "leanprover-community/mathlib"@"4aab2abced69a9e579b1e6dc...
Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean
92
118
theorem mul_pluennecke_petridis (C : Finset Ξ±) (hA : βˆ€ A' βŠ† A, (A * B).card * A'.card ≀ (A' * B).card * A.card) : (A * B * C).card * A.card ≀ (A * B).card * (A * C).card := by
induction' C using Finset.induction_on with x C _ ih Β· simp set A' := A ∩ (A * C / {x}) with hA' set C' := insert x C with hC' have hβ‚€ : A' * {x} = A * {x} ∩ (A * C) := by rw [hA', inter_mul_singleton, (isUnit_singleton x).div_mul_cancel] have h₁ : A * B * C' = A * B * C βˆͺ (A * B * {x}) \ (A' * B * {x}...
24
26,489,122,129.84347
2
1.4
5
1,480
import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.FormalMultilinearSeries #align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14" noncomputable section open scoped Classical open NNReal Topology Filter local notatio...
Mathlib/Analysis/Calculus/ContDiff/Defs.lean
196
199
theorem HasFTaylorSeriesUpToOn.zero_eq' (h : HasFTaylorSeriesUpToOn n f p s) {x : E} (hx : x ∈ s) : p x 0 = (continuousMultilinearCurryFin0 π•œ E F).symm (f x) := by
rw [← h.zero_eq x hx] exact (p x 0).uncurry0_curry0.symm
2
7.389056
1
1.4
5
1,481
import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.FormalMultilinearSeries #align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14" noncomputable section open scoped Classical open NNReal Topology Filter local notatio...
Mathlib/Analysis/Calculus/ContDiff/Defs.lean
204
208
theorem HasFTaylorSeriesUpToOn.congr (h : HasFTaylorSeriesUpToOn n f p s) (h₁ : βˆ€ x ∈ s, f₁ x = f x) : HasFTaylorSeriesUpToOn n f₁ p s := by
refine ⟨fun x hx => ?_, h.fderivWithin, h.cont⟩ rw [h₁ x hx] exact h.zero_eq x hx
3
20.085537
1
1.4
5
1,481
import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.FormalMultilinearSeries #align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14" noncomputable section open scoped Classical open NNReal Topology Filter local notatio...
Mathlib/Analysis/Calculus/ContDiff/Defs.lean
223
226
theorem HasFTaylorSeriesUpToOn.continuousOn (h : HasFTaylorSeriesUpToOn n f p s) : ContinuousOn f s := by
have := (h.cont 0 bot_le).congr fun x hx => (h.zero_eq' hx).symm rwa [← (continuousMultilinearCurryFin0 π•œ E F).symm.comp_continuousOn_iff]
2
7.389056
1
1.4
5
1,481
import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.FormalMultilinearSeries #align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14" noncomputable section open scoped Classical open NNReal Topology Filter local notatio...
Mathlib/Analysis/Calculus/ContDiff/Defs.lean
229
237
theorem hasFTaylorSeriesUpToOn_zero_iff : HasFTaylorSeriesUpToOn 0 f p s ↔ ContinuousOn f s ∧ βˆ€ x ∈ s, (p x 0).uncurry0 = f x := by
refine ⟨fun H => ⟨H.continuousOn, H.zero_eq⟩, fun H => ⟨H.2, fun m hm => False.elim (not_le.2 hm bot_le), fun m hm ↦ ?_⟩⟩ obtain rfl : m = 0 := mod_cast hm.antisymm (zero_le _) have : EqOn (p Β· 0) ((continuousMultilinearCurryFin0 π•œ E F).symm ∘ f) s := fun x hx ↦ (continuousMultilinearCurryFin0 π•œ E F)...
7
1,096.633158
2
1.4
5
1,481
import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.FormalMultilinearSeries #align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14" noncomputable section open scoped Classical open NNReal Topology Filter local notatio...
Mathlib/Analysis/Calculus/ContDiff/Defs.lean
240
250
theorem hasFTaylorSeriesUpToOn_top_iff : HasFTaylorSeriesUpToOn ∞ f p s ↔ βˆ€ n : β„•, HasFTaylorSeriesUpToOn n f p s := by
constructor Β· intro H n; exact H.of_le le_top Β· intro H constructor Β· exact (H 0).zero_eq Β· intro m _ apply (H m.succ).fderivWithin m (WithTop.coe_lt_coe.2 (lt_add_one m)) Β· intro m _ apply (H m).cont m le_rfl
9
8,103.083928
2
1.4
5
1,481
import Mathlib.Topology.Separation import Mathlib.Topology.NoetherianSpace #align_import topology.quasi_separated from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8" open TopologicalSpace variable {Ξ± Ξ² : Type*} [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] {f : Ξ± β†’ Ξ²} def IsQuasiSeparate...
Mathlib/Topology/QuasiSeparated.lean
53
56
theorem isQuasiSeparated_univ_iff {Ξ± : Type*} [TopologicalSpace Ξ±] : IsQuasiSeparated (Set.univ : Set Ξ±) ↔ QuasiSeparatedSpace Ξ± := by
rw [quasiSeparatedSpace_iff] simp [IsQuasiSeparated]
2
7.389056
1
1.4
5
1,482
import Mathlib.Topology.Separation import Mathlib.Topology.NoetherianSpace #align_import topology.quasi_separated from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8" open TopologicalSpace variable {Ξ± Ξ² : Type*} [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] {f : Ξ± β†’ Ξ²} def IsQuasiSeparate...
Mathlib/Topology/QuasiSeparated.lean
64
86
theorem IsQuasiSeparated.image_of_embedding {s : Set Ξ±} (H : IsQuasiSeparated s) (h : Embedding f) : IsQuasiSeparated (f '' s) := by
intro U V hU hU' hU'' hV hV' hV'' convert (H (f ⁻¹' U) (f ⁻¹' V) ?_ (h.continuous.1 _ hU') ?_ ?_ (h.continuous.1 _ hV') ?_).image h.continuous Β· symm rw [← Set.preimage_inter, Set.image_preimage_eq_inter_range, Set.inter_eq_left] exact Set.inter_subset_left.trans (hU.trans (Set.image_subset_ran...
21
1,318,815,734.483215
2
1.4
5
1,482
import Mathlib.Topology.Separation import Mathlib.Topology.NoetherianSpace #align_import topology.quasi_separated from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8" open TopologicalSpace variable {Ξ± Ξ² : Type*} [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] {f : Ξ± β†’ Ξ²} def IsQuasiSeparate...
Mathlib/Topology/QuasiSeparated.lean
89
96
theorem OpenEmbedding.isQuasiSeparated_iff (h : OpenEmbedding f) {s : Set Ξ±} : IsQuasiSeparated s ↔ IsQuasiSeparated (f '' s) := by
refine ⟨fun hs => hs.image_of_embedding h.toEmbedding, ?_⟩ intro H U V hU hU' hU'' hV hV' hV'' rw [h.toEmbedding.isCompact_iff, Set.image_inter h.inj] exact H (f '' U) (f '' V) (Set.image_subset _ hU) (h.isOpenMap _ hU') (hU''.image h.continuous) (Set.image_subset _ hV) (h.isOpenMap _ hV') (hV''.imag...
6
403.428793
2
1.4
5
1,482
import Mathlib.Topology.Separation import Mathlib.Topology.NoetherianSpace #align_import topology.quasi_separated from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8" open TopologicalSpace variable {Ξ± Ξ² : Type*} [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] {f : Ξ± β†’ Ξ²} def IsQuasiSeparate...
Mathlib/Topology/QuasiSeparated.lean
99
103
theorem isQuasiSeparated_iff_quasiSeparatedSpace (s : Set Ξ±) (hs : IsOpen s) : IsQuasiSeparated s ↔ QuasiSeparatedSpace s := by
rw [← isQuasiSeparated_univ_iff] convert (hs.openEmbedding_subtype_val.isQuasiSeparated_iff (s := Set.univ)).symm simp
3
20.085537
1
1.4
5
1,482
import Mathlib.Topology.Separation import Mathlib.Topology.NoetherianSpace #align_import topology.quasi_separated from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8" open TopologicalSpace variable {Ξ± Ξ² : Type*} [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] {f : Ξ± β†’ Ξ²} def IsQuasiSeparate...
Mathlib/Topology/QuasiSeparated.lean
106
109
theorem IsQuasiSeparated.of_subset {s t : Set Ξ±} (ht : IsQuasiSeparated t) (h : s βŠ† t) : IsQuasiSeparated s := by
intro U V hU hU' hU'' hV hV' hV'' exact ht U V (hU.trans h) hU' hU'' (hV.trans h) hV' hV''
2
7.389056
1
1.4
5
1,482
import Mathlib.Algebra.Order.Ring.Abs #align_import data.int.order.lemmas from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" open Function Nat namespace Int variable {a b : β„€} {n : β„•}
Mathlib/Data/Int/Order/Lemmas.lean
28
30
theorem natAbs_eq_iff_mul_self_eq {a b : β„€} : a.natAbs = b.natAbs ↔ a * a = b * b := by
rw [← abs_eq_iff_mul_self_eq, abs_eq_natAbs, abs_eq_natAbs] exact Int.natCast_inj.symm
2
7.389056
1
1.4
5
1,483
import Mathlib.Algebra.Order.Ring.Abs #align_import data.int.order.lemmas from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" open Function Nat namespace Int variable {a b : β„€} {n : β„•} theorem natAbs_eq_iff_mul_self_eq {a b : β„€} : a.natAbs = b.natAbs ↔ a * a = b * b := by rw [← a...
Mathlib/Data/Int/Order/Lemmas.lean
35
37
theorem natAbs_lt_iff_mul_self_lt {a b : β„€} : a.natAbs < b.natAbs ↔ a * a < b * b := by
rw [← abs_lt_iff_mul_self_lt, abs_eq_natAbs, abs_eq_natAbs] exact Int.ofNat_lt.symm
2
7.389056
1
1.4
5
1,483
import Mathlib.Algebra.Order.Ring.Abs #align_import data.int.order.lemmas from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" open Function Nat namespace Int variable {a b : β„€} {n : β„•} theorem natAbs_eq_iff_mul_self_eq {a b : β„€} : a.natAbs = b.natAbs ↔ a * a = b * b := by rw [← a...
Mathlib/Data/Int/Order/Lemmas.lean
40
42
theorem natAbs_le_iff_mul_self_le {a b : β„€} : a.natAbs ≀ b.natAbs ↔ a * a ≀ b * b := by
rw [← abs_le_iff_mul_self_le, abs_eq_natAbs, abs_eq_natAbs] exact Int.ofNat_le.symm
2
7.389056
1
1.4
5
1,483
import Mathlib.Algebra.Order.Ring.Abs #align_import data.int.order.lemmas from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" open Function Nat namespace Int variable {a b : β„€} {n : β„•} theorem natAbs_eq_iff_mul_self_eq {a b : β„€} : a.natAbs = b.natAbs ↔ a * a = b * b := by rw [← a...
Mathlib/Data/Int/Order/Lemmas.lean
45
50
theorem dvd_div_of_mul_dvd {a b c : β„€} (h : a * b ∣ c) : b ∣ c / a := by
rcases eq_or_ne a 0 with (rfl | ha) · simp only [Int.ediv_zero, Int.dvd_zero] rcases h with ⟨d, rfl⟩ refine ⟨d, ?_⟩ rw [mul_assoc, Int.mul_ediv_cancel_left _ ha]
5
148.413159
2
1.4
5
1,483
import Mathlib.Algebra.Order.Ring.Abs #align_import data.int.order.lemmas from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" open Function Nat namespace Int variable {a b : β„€} {n : β„•} theorem natAbs_eq_iff_mul_self_eq {a b : β„€} : a.natAbs = b.natAbs ↔ a * a = b * b := by rw [← a...
Mathlib/Data/Int/Order/Lemmas.lean
62
68
theorem eq_zero_of_abs_lt_dvd {m x : β„€} (h1 : m ∣ x) (h2 : |x| < m) : x = 0 := by
obtain rfl | hm := eq_or_ne m 0 Β· exact Int.zero_dvd.1 h1 rcases h1 with ⟨d, rfl⟩ apply mul_eq_zero_of_right rw [← abs_lt_one_iff, ← mul_lt_iff_lt_one_right (abs_pos.mpr hm), ← abs_mul] exact lt_of_lt_of_le h2 (le_abs_self m)
6
403.428793
2
1.4
5
1,483
import Mathlib.Data.List.OfFn import Mathlib.Data.List.Nodup import Mathlib.Data.List.Infix #align_import data.list.sort from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" open List.Perm universe u namespace List section Sorted variable {Ξ± : Type u} {r : Ξ± β†’ Ξ± β†’ Prop} {a : Ξ±} {l...
Mathlib/Data/List/Sort.lean
80
85
theorem Sorted.head!_le [Inhabited Ξ±] [Preorder Ξ±] {a : Ξ±} {l : List Ξ±} (h : Sorted (Β· < Β·) l) (ha : a ∈ l) : l.head! ≀ a := by
rw [← List.cons_head!_tail (List.ne_nil_of_mem ha)] at h ha cases ha Β· exact le_rfl Β· exact le_of_lt (rel_of_sorted_cons h a (by assumption))
4
54.59815
2
1.4
5
1,484
import Mathlib.Data.List.OfFn import Mathlib.Data.List.Nodup import Mathlib.Data.List.Infix #align_import data.list.sort from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" open List.Perm universe u namespace List section Sorted variable {Ξ± : Type u} {r : Ξ± β†’ Ξ± β†’ Prop} {a : Ξ±} {l...
Mathlib/Data/List/Sort.lean
87
92
theorem Sorted.le_head! [Inhabited Ξ±] [Preorder Ξ±] {a : Ξ±} {l : List Ξ±} (h : Sorted (Β· > Β·) l) (ha : a ∈ l) : a ≀ l.head! := by
rw [← List.cons_head!_tail (List.ne_nil_of_mem ha)] at h ha cases ha Β· exact le_rfl Β· exact le_of_lt (rel_of_sorted_cons h a (by assumption))
4
54.59815
2
1.4
5
1,484
import Mathlib.Data.List.OfFn import Mathlib.Data.List.Nodup import Mathlib.Data.List.Infix #align_import data.list.sort from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" open List.Perm universe u namespace List section Sorted variable {Ξ± : Type u} {r : Ξ± β†’ Ξ± β†’ Prop} {a : Ξ±} {l...
Mathlib/Data/List/Sort.lean
104
120
theorem eq_of_perm_of_sorted [IsAntisymm Ξ± r] {l₁ lβ‚‚ : List Ξ±} (hp : l₁ ~ lβ‚‚) (hs₁ : Sorted r l₁) (hsβ‚‚ : Sorted r lβ‚‚) : l₁ = lβ‚‚ := by
induction' hs₁ with a l₁ h₁ hs₁ IH generalizing lβ‚‚ Β· exact hp.nil_eq Β· have : a ∈ lβ‚‚ := hp.subset (mem_cons_self _ _) rcases append_of_mem this with ⟨uβ‚‚, vβ‚‚, rfl⟩ have hp' := (perm_cons a).1 (hp.trans perm_middle) obtain rfl := IH hp' (hsβ‚‚.sublist <| by simp) change a :: uβ‚‚ ++ vβ‚‚ = uβ‚‚ ++ ([a] ++ ...
15
3,269,017.372472
2
1.4
5
1,484
import Mathlib.Data.List.OfFn import Mathlib.Data.List.Nodup import Mathlib.Data.List.Infix #align_import data.list.sort from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" open List.Perm universe u namespace List section Sorted variable {Ξ± : Type u} {r : Ξ± β†’ Ξ± β†’ Prop} {a : Ξ±} {l...
Mathlib/Data/List/Sort.lean
123
126
theorem sublist_of_subperm_of_sorted [IsAntisymm Ξ± r] {l₁ lβ‚‚ : List Ξ±} (hp : l₁ <+~ lβ‚‚) (hs₁ : l₁.Sorted r) (hsβ‚‚ : lβ‚‚.Sorted r) : l₁ <+ lβ‚‚ := by
let ⟨_, h, h'⟩ := hp rwa [← eq_of_perm_of_sorted h (hsβ‚‚.sublist h') hs₁]
2
7.389056
1
1.4
5
1,484
import Mathlib.Data.List.OfFn import Mathlib.Data.List.Nodup import Mathlib.Data.List.Infix #align_import data.list.sort from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" open List.Perm universe u namespace List section sort variable {Ξ± : Type u} (r : Ξ± β†’ Ξ± β†’ Prop) [DecidableRe...
Mathlib/Data/List/Sort.lean
273
275
theorem orderedInsert_count [DecidableEq Ξ±] (L : List Ξ±) (a b : Ξ±) : count a (L.orderedInsert r b) = count a L + if a = b then 1 else 0 := by
rw [(L.perm_orderedInsert r b).count_eq, count_cons]
1
2.718282
0
1.4
5
1,484
import Mathlib.Order.Interval.Finset.Fin #align_import data.fintype.fin from "leanprover-community/mathlib"@"759575657f189ccb424b990164c8b1fa9f55cdfe" open Finset open Fintype namespace Fin variable {Ξ± Ξ² : Type*} {n : β„•}
Mathlib/Data/Fintype/Fin.lean
25
27
theorem map_valEmbedding_univ : (Finset.univ : Finset (Fin n)).map Fin.valEmbedding = Iio n := by
ext simp [orderIsoSubtype.symm.surjective.exists, OrderIso.symm]
2
7.389056
1
1.4
5
1,485
import Mathlib.Order.Interval.Finset.Fin #align_import data.fintype.fin from "leanprover-community/mathlib"@"759575657f189ccb424b990164c8b1fa9f55cdfe" open Finset open Fintype namespace Fin variable {Ξ± Ξ² : Type*} {n : β„•} theorem map_valEmbedding_univ : (Finset.univ : Finset (Fin n)).map Fin.valEmbedding = Iio ...
Mathlib/Data/Fintype/Fin.lean
41
51
theorem Ioi_succ (i : Fin n) : Ioi i.succ = (Ioi i).map (Fin.succEmb _) := by
ext i simp only [mem_filter, mem_Ioi, mem_map, mem_univ, true_and_iff, Function.Embedding.coeFn_mk, exists_true_left] constructor · refine cases ?_ ?_ i · rintro ⟨⟨⟩⟩ · intro i hi exact ⟨i, succ_lt_succ_iff.mp hi, rfl⟩ · rintro ⟨i, hi, rfl⟩ simpa
10
22,026.465795
2
1.4
5
1,485
import Mathlib.Order.Interval.Finset.Fin #align_import data.fintype.fin from "leanprover-community/mathlib"@"759575657f189ccb424b990164c8b1fa9f55cdfe" open Finset open Fintype namespace Fin variable {Ξ± Ξ² : Type*} {n : β„•} theorem map_valEmbedding_univ : (Finset.univ : Finset (Fin n)).map Fin.valEmbedding = Iio ...
Mathlib/Data/Fintype/Fin.lean
55
58
theorem Iio_castSucc (i : Fin n) : Iio (castSucc i) = (Iio i).map Fin.castSuccEmb := by
apply Finset.map_injective Fin.valEmbedding rw [Finset.map_map, Fin.map_valEmbedding_Iio] exact (Fin.map_valEmbedding_Iio i).symm
3
20.085537
1
1.4
5
1,485
import Mathlib.Order.Interval.Finset.Fin #align_import data.fintype.fin from "leanprover-community/mathlib"@"759575657f189ccb424b990164c8b1fa9f55cdfe" open Finset open Fintype namespace Fin variable {Ξ± Ξ² : Type*} {n : β„•} theorem map_valEmbedding_univ : (Finset.univ : Finset (Fin n)).map Fin.valEmbedding = Iio ...
Mathlib/Data/Fintype/Fin.lean
61
64
theorem card_filter_univ_succ' (p : Fin (n + 1) β†’ Prop) [DecidablePred p] : (univ.filter p).card = ite (p 0) 1 0 + (univ.filter (p ∘ Fin.succ)).card := by
rw [Fin.univ_succ, filter_cons, card_disjUnion, filter_map, card_map] split_ifs <;> simp
2
7.389056
1
1.4
5
1,485
import Mathlib.Order.Interval.Finset.Fin #align_import data.fintype.fin from "leanprover-community/mathlib"@"759575657f189ccb424b990164c8b1fa9f55cdfe" open Finset open Fintype namespace Fin variable {Ξ± Ξ² : Type*} {n : β„•} theorem map_valEmbedding_univ : (Finset.univ : Finset (Fin n)).map Fin.valEmbedding = Iio ...
Mathlib/Data/Fintype/Fin.lean
73
78
theorem card_filter_univ_eq_vector_get_eq_count [DecidableEq Ξ±] (a : Ξ±) (v : Vector Ξ± n) : (univ.filter fun i => a = v.get i).card = v.toList.count a := by
induction' v with n x xs hxs Β· simp Β· simp_rw [card_filter_univ_succ', Vector.get_cons_zero, Vector.toList_cons, Function.comp, Vector.get_cons_succ, hxs, List.count_cons, add_comm (ite (a = x) 1 0)]
4
54.59815
2
1.4
5
1,485
import Mathlib.NumberTheory.NumberField.Basic import Mathlib.RingTheory.Localization.NormTrace #align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a" open scoped NumberField open Finset NumberField Algebra FiniteDimensional namespace RingOfIn...
Mathlib/NumberTheory/NumberField/Norm.lean
65
69
theorem norm_algebraMap [IsSeparable K L] (x : π“ž K) : norm K (algebraMap (π“ž K) (π“ž L) x) = x ^ finrank K L := by
rw [RingOfIntegers.ext_iff, RingOfIntegers.coe_eq_algebraMap, RingOfIntegers.algebraMap_norm_algebraMap, Algebra.norm_algebraMap, RingOfIntegers.coe_eq_algebraMap, map_pow]
3
20.085537
1
1.4
5
1,486
import Mathlib.NumberTheory.NumberField.Basic import Mathlib.RingTheory.Localization.NormTrace #align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a" open scoped NumberField open Finset NumberField Algebra FiniteDimensional namespace RingOfIn...
Mathlib/NumberTheory/NumberField/Norm.lean
72
85
theorem isUnit_norm_of_isGalois [IsGalois K L] {x : π“ž L} : IsUnit (norm K x) ↔ IsUnit x := by
classical refine ⟨fun hx => ?_, IsUnit.map _⟩ replace hx : IsUnit (algebraMap (π“ž K) (π“ž L) <| norm K x) := hx.map (algebraMap (π“ž K) <| π“ž L) refine @isUnit_of_mul_isUnit_right (π“ž L) _ ⟨(univ \ {AlgEquiv.refl}).prod fun Οƒ : L ≃ₐ[K] L => Οƒ x, prod_mem fun Οƒ _ => x.2.map (Οƒ : L β†’+* L).toIntAlgHom⟩ _ ...
13
442,413.392009
2
1.4
5
1,486
import Mathlib.NumberTheory.NumberField.Basic import Mathlib.RingTheory.Localization.NormTrace #align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a" open scoped NumberField open Finset NumberField Algebra FiniteDimensional namespace RingOfIn...
Mathlib/NumberTheory/NumberField/Norm.lean
90
99
theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L) (norm K x) := by
classical have hint : IsIntegral β„€ (∏ Οƒ ∈ univ.erase (AlgEquiv.refl : L ≃ₐ[K] L), Οƒ x) := IsIntegral.prod _ (fun Οƒ _ => ((RingOfIntegers.isIntegral_coe x).map Οƒ)) refine ⟨⟨_, hint⟩, ?_⟩ ext rw [coe_algebraMap_norm K x, norm_eq_prod_automorphisms] simp [← Finset.mul_prod_erase _ _ (mem_univ Al...
9
8,103.083928
2
1.4
5
1,486