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 Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace ZMod section QuadCharModP @[simps] def Ο‡β‚„ : MulChar (ZMod 4) β„€...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
66
71
theorem Ο‡β‚„_int_eq_if_mod_four (n : β„€) : Ο‡β‚„ n = if n % 2 = 0 then 0 else if n % 4 = 1 then 1 else -1 := by
have help : βˆ€ m : β„€, 0 ≀ m β†’ m < 4 β†’ Ο‡β‚„ m = if m % 2 = 0 then 0 else if m = 1 then 1 else -1 := by decide rw [← Int.emod_emod_of_dvd n (by decide : (2 : β„€) ∣ 4), ← ZMod.intCast_mod n 4] exact help (n % 4) (Int.emod_nonneg n (by norm_num)) (Int.emod_lt n (by norm_num))
322
import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace ZMod section QuadCharModP @[simps] def Ο‡β‚„ : MulChar (ZMod 4) β„€...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
80
91
theorem Ο‡β‚„_eq_neg_one_pow {n : β„•} (hn : n % 2 = 1) : Ο‡β‚„ n = (-1) ^ (n / 2) := by
rw [Ο‡β‚„_nat_eq_if_mod_four] simp only [hn, Nat.one_ne_zero, if_false] conv_rhs => -- Porting note: was `nth_rw` arg 2; rw [← Nat.div_add_mod n 4] enter [1, 1, 1]; rw [(by norm_num : 4 = 2 * 2)] rw [mul_assoc, add_comm, Nat.add_mul_div_left _ _ (by norm_num : 0 < 2), pow_add, pow_mul, neg_one_sq, one...
322
import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace ZMod section QuadCharModP @[simps] def Ο‡β‚„ : MulChar (ZMod 4) β„€...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
95
97
theorem Ο‡β‚„_nat_one_mod_four {n : β„•} (hn : n % 4 = 1) : Ο‡β‚„ n = 1 := by
rw [Ο‡β‚„_nat_mod_four, hn] rfl
322
import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace ZMod section QuadCharModP @[simps] def Ο‡β‚„ : MulChar (ZMod 4) β„€...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
101
103
theorem Ο‡β‚„_nat_three_mod_four {n : β„•} (hn : n % 4 = 3) : Ο‡β‚„ n = -1 := by
rw [Ο‡β‚„_nat_mod_four, hn] rfl
322
import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace ZMod section QuadCharModP @[simps] def Ο‡β‚„ : MulChar (ZMod 4) β„€...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
107
109
theorem Ο‡β‚„_int_one_mod_four {n : β„€} (hn : n % 4 = 1) : Ο‡β‚„ n = 1 := by
rw [Ο‡β‚„_int_mod_four, hn] rfl
322
import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace ZMod section QuadCharModP @[simps] def Ο‡β‚„ : MulChar (ZMod 4) β„€...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
113
115
theorem Ο‡β‚„_int_three_mod_four {n : β„€} (hn : n % 4 = 3) : Ο‡β‚„ n = -1 := by
rw [Ο‡β‚„_int_mod_four, hn] rfl
322
import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace ZMod section QuadCharModP @[simps] def Ο‡β‚„ : MulChar (ZMod 4) β„€...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
119
121
theorem neg_one_pow_div_two_of_one_mod_four {n : β„•} (hn : n % 4 = 1) : (-1 : β„€) ^ (n / 2) = 1 := by
rw [← Ο‡β‚„_eq_neg_one_pow (Nat.odd_of_mod_four_eq_one hn), ← natCast_mod, hn] rfl
322
import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace ZMod section QuadCharModP @[simps] def Ο‡β‚„ : MulChar (ZMod 4) β„€...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
125
128
theorem neg_one_pow_div_two_of_three_mod_four {n : β„•} (hn : n % 4 = 3) : (-1 : β„€) ^ (n / 2) = -1 := by
rw [← Ο‡β‚„_eq_neg_one_pow (Nat.odd_of_mod_four_eq_three hn), ← natCast_mod, hn] rfl
322
import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace ZMod section QuadCharModP @[simps] def Ο‡β‚„ : MulChar (ZMod 4) β„€...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
142
146
theorem isQuadratic_Ο‡β‚ˆ : Ο‡β‚ˆ.IsQuadratic := by
intro a -- Porting note: was `decide!` fin_cases a all_goals decide
322
import Mathlib.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs #align_import data.pnat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Function PNat namespace PNat variable (a b : β„•+) instance instLocallyFiniteOrder : LocallyFiniteOrder β„•+ := Subtype....
Mathlib/Data/PNat/Interval.lean
67
72
theorem card_Icc : (Icc a b).card = b + 1 - a := by
rw [← Nat.card_Icc] -- Porting note: I had to change this to `erw` *and* provide the proof, yuck. -- https://github.com/leanprover-community/mathlib4/issues/5164 erw [← Finset.map_subtype_embedding_Icc _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)] rw [card_map]
323
import Mathlib.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs #align_import data.pnat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Function PNat namespace PNat variable (a b : β„•+) instance instLocallyFiniteOrder : LocallyFiniteOrder β„•+ := Subtype....
Mathlib/Data/PNat/Interval.lean
76
81
theorem card_Ico : (Ico a b).card = b - a := by
rw [← Nat.card_Ico] -- Porting note: I had to change this to `erw` *and* provide the proof, yuck. -- https://github.com/leanprover-community/mathlib4/issues/5164 erw [← Finset.map_subtype_embedding_Ico _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)] rw [card_map]
323
import Mathlib.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs #align_import data.pnat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Function PNat namespace PNat variable (a b : β„•+) instance instLocallyFiniteOrder : LocallyFiniteOrder β„•+ := Subtype....
Mathlib/Data/PNat/Interval.lean
85
90
theorem card_Ioc : (Ioc a b).card = b - a := by
rw [← Nat.card_Ioc] -- Porting note: I had to change this to `erw` *and* provide the proof, yuck. -- https://github.com/leanprover-community/mathlib4/issues/5164 erw [← Finset.map_subtype_embedding_Ioc _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)] rw [card_map]
323
import Mathlib.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs #align_import data.pnat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Function PNat namespace PNat variable (a b : β„•+) instance instLocallyFiniteOrder : LocallyFiniteOrder β„•+ := Subtype....
Mathlib/Data/PNat/Interval.lean
94
99
theorem card_Ioo : (Ioo a b).card = b - a - 1 := by
rw [← Nat.card_Ioo] -- Porting note: I had to change this to `erw` *and* provide the proof, yuck. -- https://github.com/leanprover-community/mathlib4/issues/5164 erw [← Finset.map_subtype_embedding_Ioo _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)] rw [card_map]
323
import Mathlib.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs #align_import data.pnat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Function PNat namespace PNat variable (a b : β„•+) instance instLocallyFiniteOrder : LocallyFiniteOrder β„•+ := Subtype....
Mathlib/Data/PNat/Interval.lean
103
104
theorem card_uIcc : (uIcc a b).card = (b - a : β„€).natAbs + 1 := by
rw [← Nat.card_uIcc, ← map_subtype_embedding_uIcc, card_map]
323
import Mathlib.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs #align_import data.pnat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Function PNat namespace PNat variable (a b : β„•+) instance instLocallyFiniteOrder : LocallyFiniteOrder β„•+ := Subtype....
Mathlib/Data/PNat/Interval.lean
108
109
theorem card_fintype_Icc : Fintype.card (Set.Icc a b) = b + 1 - a := by
rw [← card_Icc, Fintype.card_ofFinset]
323
import Mathlib.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs #align_import data.pnat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Function PNat namespace PNat variable (a b : β„•+) instance instLocallyFiniteOrder : LocallyFiniteOrder β„•+ := Subtype....
Mathlib/Data/PNat/Interval.lean
113
114
theorem card_fintype_Ico : Fintype.card (Set.Ico a b) = b - a := by
rw [← card_Ico, Fintype.card_ofFinset]
323
import Mathlib.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs #align_import data.pnat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Function PNat namespace PNat variable (a b : β„•+) instance instLocallyFiniteOrder : LocallyFiniteOrder β„•+ := Subtype....
Mathlib/Data/PNat/Interval.lean
118
119
theorem card_fintype_Ioc : Fintype.card (Set.Ioc a b) = b - a := by
rw [← card_Ioc, Fintype.card_ofFinset]
323
import Mathlib.Init.Algebra.Classes import Mathlib.Init.Data.Ordering.Basic #align_import init.data.ordering.lemmas from "leanprover-community/lean"@"4bd314f7bd5e0c9e813fc201f1279a23f13f9f1d" universe u namespace Ordering @[simp]
Mathlib/Init/Data/Ordering/Lemmas.lean
20
22
theorem ite_eq_lt_distrib (c : Prop) [Decidable c] (a b : Ordering) : ((if c then a else b) = Ordering.lt) = if c then a = Ordering.lt else b = Ordering.lt := by
by_cases c <;> simp [*]
324
import Mathlib.Init.Algebra.Classes import Mathlib.Init.Data.Ordering.Basic #align_import init.data.ordering.lemmas from "leanprover-community/lean"@"4bd314f7bd5e0c9e813fc201f1279a23f13f9f1d" universe u namespace Ordering @[simp] theorem ite_eq_lt_distrib (c : Prop) [Decidable c] (a b : Ordering) : ((if c th...
Mathlib/Init/Data/Ordering/Lemmas.lean
26
28
theorem ite_eq_eq_distrib (c : Prop) [Decidable c] (a b : Ordering) : ((if c then a else b) = Ordering.eq) = if c then a = Ordering.eq else b = Ordering.eq := by
by_cases c <;> simp [*]
324
import Mathlib.Init.Algebra.Classes import Mathlib.Init.Data.Ordering.Basic #align_import init.data.ordering.lemmas from "leanprover-community/lean"@"4bd314f7bd5e0c9e813fc201f1279a23f13f9f1d" universe u namespace Ordering @[simp] theorem ite_eq_lt_distrib (c : Prop) [Decidable c] (a b : Ordering) : ((if c th...
Mathlib/Init/Data/Ordering/Lemmas.lean
32
34
theorem ite_eq_gt_distrib (c : Prop) [Decidable c] (a b : Ordering) : ((if c then a else b) = Ordering.gt) = if c then a = Ordering.gt else b = Ordering.gt := by
by_cases c <;> simp [*]
324
import Mathlib.Algebra.Group.Semiconj.Defs import Mathlib.Init.Algebra.Classes #align_import algebra.group.commute from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102" assert_not_exists MonoidWithZero assert_not_exists DenselyOrdered variable {G M S : Type*} @[to_additive "Two elements...
Mathlib/Algebra/Group/Commute/Defs.lean
262
263
theorem mul_inv_cancel_assoc (h : Commute a b) : a * (b * a⁻¹) = b := by
rw [← mul_assoc, h.mul_inv_cancel]
325
import Mathlib.Algebra.Group.Commute.Defs import Mathlib.Algebra.Group.Units import Mathlib.Algebra.GroupWithZero.Defs import Mathlib.Algebra.Order.Monoid.Unbundled.Basic import Mathlib.Tactic.NthRewrite #align_import algebra.regular.basic from "leanprover-community/mathlib"@"5cd3c25312f210fec96ba1edb2aebfb2ccf2010f"...
Mathlib/Algebra/Regular/Basic.lean
91
94
theorem IsRightRegular.left_of_commute {a : R} (ca : βˆ€ b, Commute a b) (h : IsRightRegular a) : IsLeftRegular a := by
simp_rw [@Commute.symm_iff R _ a] at ca exact fun x y xy => h <| (ca x).trans <| xy.trans <| (ca y).symm
326
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Regular.Basic #align_import algebra.regular.pow from "leanprover-community/mathlib"@"46a64b5b4268c594af770c44d9e502afc6a515cb" variable {R : Type*} {a b : R} section Monoid variable [Monoid R]
Mathlib/Algebra/Regular/Pow.lean
31
32
theorem IsLeftRegular.pow (n : β„•) (rla : IsLeftRegular a) : IsLeftRegular (a ^ n) := by
simp only [IsLeftRegular, ← mul_left_iterate, rla.iterate n]
327
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Regular.Basic #align_import algebra.regular.pow from "leanprover-community/mathlib"@"46a64b5b4268c594af770c44d9e502afc6a515cb" variable {R : Type*} {a b : R} section Monoid variable [Monoid R] ...
Mathlib/Algebra/Regular/Pow.lean
36
38
theorem IsRightRegular.pow (n : β„•) (rra : IsRightRegular a) : IsRightRegular (a ^ n) := by
rw [IsRightRegular, ← mul_right_iterate] exact rra.iterate n
327
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Regular.Basic #align_import algebra.regular.pow from "leanprover-community/mathlib"@"46a64b5b4268c594af770c44d9e502afc6a515cb" variable {R : Type*} {a b : R} section Monoid variable [Monoid R] ...
Mathlib/Algebra/Regular/Pow.lean
47
50
theorem IsLeftRegular.pow_iff {n : β„•} (n0 : 0 < n) : IsLeftRegular (a ^ n) ↔ IsLeftRegular a := by
refine ⟨?_, IsLeftRegular.pow n⟩ rw [← Nat.succ_pred_eq_of_pos n0, pow_succ] exact IsLeftRegular.of_mul
327
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Regular.Basic #align_import algebra.regular.pow from "leanprover-community/mathlib"@"46a64b5b4268c594af770c44d9e502afc6a515cb" variable {R : Type*} {a b : R} section Monoid variable [Monoid R] ...
Mathlib/Algebra/Regular/Pow.lean
54
58
theorem IsRightRegular.pow_iff {n : β„•} (n0 : 0 < n) : IsRightRegular (a ^ n) ↔ IsRightRegular a := by
refine ⟨?_, IsRightRegular.pow n⟩ rw [← Nat.succ_pred_eq_of_pos n0, pow_succ'] exact IsRightRegular.of_mul
327
import Mathlib.Algebra.Ring.Semiconj import Mathlib.Algebra.Ring.Units import Mathlib.Algebra.Group.Commute.Defs import Mathlib.Data.Bracket #align_import algebra.ring.commute from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" universe u v w x variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : T...
Mathlib/Algebra/Ring/Commute.lean
72
74
theorem mul_self_sub_mul_self_eq [NonUnitalNonAssocRing R] {a b : R} (h : Commute a b) : a * a - b * b = (a + b) * (a - b) := by
rw [add_mul, mul_sub, mul_sub, h.eq, sub_add_sub_cancel]
328
import Mathlib.Algebra.Ring.Semiconj import Mathlib.Algebra.Ring.Units import Mathlib.Algebra.Group.Commute.Defs import Mathlib.Data.Bracket #align_import algebra.ring.commute from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" universe u v w x variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : T...
Mathlib/Algebra/Ring/Commute.lean
77
79
theorem mul_self_sub_mul_self_eq' [NonUnitalNonAssocRing R] {a b : R} (h : Commute a b) : a * a - b * b = (a - b) * (a + b) := by
rw [mul_add, sub_mul, sub_mul, h.eq, sub_add_sub_cancel]
328
import Mathlib.Algebra.Ring.Semiconj import Mathlib.Algebra.Ring.Units import Mathlib.Algebra.Group.Commute.Defs import Mathlib.Data.Bracket #align_import algebra.ring.commute from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" universe u v w x variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : T...
Mathlib/Algebra/Ring/Commute.lean
82
85
theorem mul_self_eq_mul_self_iff [NonUnitalNonAssocRing R] [NoZeroDivisors R] {a b : R} (h : Commute a b) : a * a = b * b ↔ a = b ∨ a = -b := by
rw [← sub_eq_zero, h.mul_self_sub_mul_self_eq, mul_eq_zero, or_comm, sub_eq_zero, add_eq_zero_iff_eq_neg]
328
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion #align_import analysis.normed.group.hom_completion from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" noncomputable section open Set NormedAddGroupHom UniformSpace section Completion variable {G...
Mathlib/Analysis/Normed/Group/HomCompletion.lean
100
104
theorem NormedAddGroupHom.completion_id : (NormedAddGroupHom.id G).completion = NormedAddGroupHom.id (Completion G) := by
ext x rw [NormedAddGroupHom.completion_def, NormedAddGroupHom.coe_id, Completion.map_id] rfl
329
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion #align_import analysis.normed.group.hom_completion from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" noncomputable section open Set NormedAddGroupHom UniformSpace section Completion variable {G...
Mathlib/Analysis/Normed/Group/HomCompletion.lean
107
113
theorem NormedAddGroupHom.completion_comp (f : NormedAddGroupHom G H) (g : NormedAddGroupHom H K) : g.completion.comp f.completion = (g.comp f).completion := by
ext x rw [NormedAddGroupHom.coe_comp, NormedAddGroupHom.completion_def, NormedAddGroupHom.completion_coe_to_fun, NormedAddGroupHom.completion_coe_to_fun, Completion.map_comp g.uniformContinuous f.uniformContinuous] rfl
329
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion #align_import analysis.normed.group.hom_completion from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" noncomputable section open Set NormedAddGroupHom UniformSpace section Completion variable {G...
Mathlib/Analysis/Normed/Group/HomCompletion.lean
155
156
theorem NormedAddGroupHom.completion_toCompl (f : NormedAddGroupHom G H) : f.completion.comp toCompl = toCompl.comp f := by
ext x; simp
329
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion #align_import analysis.normed.group.hom_completion from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" noncomputable section open Set NormedAddGroupHom UniformSpace section Completion variable {G...
Mathlib/Analysis/Normed/Group/HomCompletion.lean
165
168
theorem NormedAddGroupHom.ker_le_ker_completion (f : NormedAddGroupHom G H) : (toCompl.comp <| incl f.ker).range ≀ f.completion.ker := by
rintro _ ⟨⟨g, hβ‚€ : f g = 0⟩, rfl⟩ simp [hβ‚€, mem_ker, Completion.coe_zero]
329
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion #align_import analysis.normed.group.hom_completion from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" noncomputable section open Set NormedAddGroupHom UniformSpace section Completion variable {G...
Mathlib/Analysis/Normed/Group/HomCompletion.lean
171
193
theorem NormedAddGroupHom.ker_completion {f : NormedAddGroupHom G H} {C : ℝ} (h : f.SurjectiveOnWith f.range C) : (f.completion.ker : Set <| Completion G) = closure (toCompl.comp <| incl f.ker).range := by
refine le_antisymm ?_ (closure_minimal f.ker_le_ker_completion f.completion.isClosed_ker) rintro hatg (hatg_in : f.completion hatg = 0) rw [SeminormedAddCommGroup.mem_closure_iff] intro Ξ΅ Ξ΅_pos rcases h.exists_pos with ⟨C', C'_pos, hC'⟩ rcases exists_pos_mul_lt Ξ΅_pos (1 + C' * β€–fβ€–) with ⟨δ, Ξ΄_pos, hδ⟩ ob...
329
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion #align_import analysis.normed.group.hom_completion from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" noncomputable section open Set NormedAddGroupHom UniformSpace section Extension variable {G ...
Mathlib/Analysis/Normed/Group/HomCompletion.lean
226
230
theorem NormedAddGroupHom.extension_unique (f : NormedAddGroupHom G H) {g : NormedAddGroupHom (Completion G) H} (hg : βˆ€ v, f v = g v) : f.extension = g := by
ext v rw [NormedAddGroupHom.extension_coe_to_fun, Completion.extension_unique f.uniformContinuous g.uniformContinuous fun a => hg a]
329
import Mathlib.CategoryTheory.Limits.Shapes.Equalizers import Mathlib.CategoryTheory.Limits.Shapes.CommSq import Mathlib.CategoryTheory.Limits.Shapes.RegularMono #align_import category_theory.limits.shapes.kernel_pair from "leanprover-community/mathlib"@"f6bab67886fb92c3e2f539cc90a83815f69a189d" universe v u uβ‚‚ ...
Mathlib/CategoryTheory/Limits/Shapes/KernelPair.lean
139
150
theorem comp_of_mono {f₁ : X ⟢ Y} {fβ‚‚ : Y ⟢ Z} [Mono fβ‚‚] (small_k : IsKernelPair f₁ a b) : IsKernelPair (f₁ ≫ fβ‚‚) a b := { w := by
rw [small_k.w_assoc] isLimit' := ⟨by refine PullbackCone.isLimitAux _ (fun s => small_k.lift s.fst s.snd (by rw [← cancel_mono fβ‚‚, assoc, s.condition, assoc])) (by simp) (by simp) ?_ intro s m hm apply small_k.isLimit.hom_ext apply PullbackCone.equalizer_ext small_k.cone _ _...
330
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Unary variable (xs : Vector Ξ± n) (f₁ : Ξ² β†’ σ₁ β†’ σ₁ Γ— Ξ³) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ²) @[simp]
Mathlib/Data/Vector/MapLemmas.lean
27
35
theorem mapAccumr_mapAccumr : mapAccumr f₁ (mapAccumr fβ‚‚ xs sβ‚‚).snd s₁ = let m := (mapAccumr (fun x s => let rβ‚‚ := fβ‚‚ x s.snd let r₁ := f₁ rβ‚‚.snd s.fst ((r₁.fst, rβ‚‚.fst), r₁.snd) ) xs (s₁, sβ‚‚)) (m.fst.fst, m.snd) := by
induction xs using Vector.revInductionOn generalizing s₁ sβ‚‚ <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Unary variable (xs : Vector Ξ± n) (f₁ : Ξ² β†’ σ₁ β†’ σ₁ Γ— Ξ³) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ²) @[simp] theorem mapAccumr_mapAccumr : mapAccumr f₁ (mapAccumr fβ‚‚ xs sβ‚‚).snd s₁ = let m := (...
Mathlib/Data/Vector/MapLemmas.lean
38
40
theorem mapAccumr_map (fβ‚‚ : Ξ± β†’ Ξ²) : (mapAccumr f₁ (map fβ‚‚ xs) s) = (mapAccumr (fun x s => f₁ (fβ‚‚ x) s) xs s) := by
induction xs using Vector.revInductionOn generalizing s <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Unary variable (xs : Vector Ξ± n) (f₁ : Ξ² β†’ σ₁ β†’ σ₁ Γ— Ξ³) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ²) @[simp] theorem mapAccumr_mapAccumr : mapAccumr f₁ (mapAccumr fβ‚‚ xs sβ‚‚).snd s₁ = let m := (...
Mathlib/Data/Vector/MapLemmas.lean
43
47
theorem map_mapAccumr (f₁ : Ξ² β†’ Ξ³) : (map f₁ (mapAccumr fβ‚‚ xs s).snd) = (mapAccumr (fun x s => let r := (fβ‚‚ x s); (r.fst, f₁ r.snd) ) xs s).snd := by
induction xs using Vector.revInductionOn generalizing s <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Unary variable (xs : Vector Ξ± n) (f₁ : Ξ² β†’ σ₁ β†’ σ₁ Γ— Ξ³) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ²) @[simp] theorem mapAccumr_mapAccumr : mapAccumr f₁ (mapAccumr fβ‚‚ xs sβ‚‚).snd s₁ = let m := (...
Mathlib/Data/Vector/MapLemmas.lean
50
52
theorem map_map (f₁ : Ξ² β†’ Ξ³) (fβ‚‚ : Ξ± β†’ Ξ²) : map f₁ (map fβ‚‚ xs) = map (fun x => f₁ <| fβ‚‚ x) xs := by
induction xs <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Binary variable (xs : Vector Ξ± n) (ys : Vector Ξ² n) @[simp]
Mathlib/Data/Vector/MapLemmas.lean
60
68
theorem mapAccumrβ‚‚_mapAccumr_left (f₁ : Ξ³ β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— ΞΆ) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ (mapAccumr fβ‚‚ xs sβ‚‚).snd ys s₁) = let m := (mapAccumrβ‚‚ (fun x y s => let rβ‚‚ := fβ‚‚ x s.snd let r₁ := f₁ rβ‚‚.snd y s.fst ((r₁.fst, rβ‚‚.fst), r₁.snd) ) xs ys (s₁, sβ‚‚)) (m.f...
induction xs, ys using Vector.revInductionOnβ‚‚ generalizing s₁ sβ‚‚ <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Binary variable (xs : Vector Ξ± n) (ys : Vector Ξ² n) @[simp] theorem mapAccumrβ‚‚_mapAccumr_left (f₁ : Ξ³ β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— ΞΆ) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ (mapAccumr fβ‚‚...
Mathlib/Data/Vector/MapLemmas.lean
71
73
theorem mapβ‚‚_map_left (f₁ : Ξ³ β†’ Ξ² β†’ ΞΆ) (fβ‚‚ : Ξ± β†’ Ξ³) : mapβ‚‚ f₁ (map fβ‚‚ xs) ys = mapβ‚‚ (fun x y => f₁ (fβ‚‚ x) y) xs ys := by
induction xs, ys using Vector.revInductionOnβ‚‚ <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Binary variable (xs : Vector Ξ± n) (ys : Vector Ξ² n) @[simp] theorem mapAccumrβ‚‚_mapAccumr_left (f₁ : Ξ³ β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— ΞΆ) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ (mapAccumr fβ‚‚...
Mathlib/Data/Vector/MapLemmas.lean
76
84
theorem mapAccumrβ‚‚_mapAccumr_right (f₁ : Ξ± β†’ Ξ³ β†’ σ₁ β†’ σ₁ Γ— ΞΆ) (fβ‚‚ : Ξ² β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ xs (mapAccumr fβ‚‚ ys sβ‚‚).snd s₁) = let m := (mapAccumrβ‚‚ (fun x y s => let rβ‚‚ := fβ‚‚ y s.snd let r₁ := f₁ x rβ‚‚.snd s.fst ((r₁.fst, rβ‚‚.fst), r₁.snd) ) xs ys (s₁, sβ‚‚)) (m....
induction xs, ys using Vector.revInductionOnβ‚‚ generalizing s₁ sβ‚‚ <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Binary variable (xs : Vector Ξ± n) (ys : Vector Ξ² n) @[simp] theorem mapAccumrβ‚‚_mapAccumr_left (f₁ : Ξ³ β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— ΞΆ) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ (mapAccumr fβ‚‚...
Mathlib/Data/Vector/MapLemmas.lean
87
89
theorem mapβ‚‚_map_right (f₁ : Ξ± β†’ Ξ³ β†’ ΞΆ) (fβ‚‚ : Ξ² β†’ Ξ³) : mapβ‚‚ f₁ xs (map fβ‚‚ ys) = mapβ‚‚ (fun x y => f₁ x (fβ‚‚ y)) xs ys := by
induction xs, ys using Vector.revInductionOnβ‚‚ <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Binary variable (xs : Vector Ξ± n) (ys : Vector Ξ² n) @[simp] theorem mapAccumrβ‚‚_mapAccumr_left (f₁ : Ξ³ β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— ΞΆ) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ (mapAccumr fβ‚‚...
Mathlib/Data/Vector/MapLemmas.lean
92
100
theorem mapAccumr_mapAccumrβ‚‚ (f₁ : Ξ³ β†’ σ₁ β†’ σ₁ Γ— ΞΆ) (fβ‚‚ : Ξ± β†’ Ξ² β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumr f₁ (mapAccumrβ‚‚ fβ‚‚ xs ys sβ‚‚).snd s₁) = let m := mapAccumrβ‚‚ (fun x y s => let rβ‚‚ := fβ‚‚ x y s.snd let r₁ := f₁ rβ‚‚.snd s.fst ((r₁.fst, rβ‚‚.fst), r₁.snd) ) xs ys (s₁, sβ‚‚) (m.fst.fst,...
induction xs, ys using Vector.revInductionOnβ‚‚ generalizing s₁ sβ‚‚ <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Binary variable (xs : Vector Ξ± n) (ys : Vector Ξ² n) @[simp] theorem mapAccumrβ‚‚_mapAccumr_left (f₁ : Ξ³ β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— ΞΆ) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ (mapAccumr fβ‚‚...
Mathlib/Data/Vector/MapLemmas.lean
103
105
theorem map_mapβ‚‚ (f₁ : Ξ³ β†’ ΞΆ) (fβ‚‚ : Ξ± β†’ Ξ² β†’ Ξ³) : map f₁ (mapβ‚‚ fβ‚‚ xs ys) = mapβ‚‚ (fun x y => f₁ <| fβ‚‚ x y) xs ys := by
induction xs, ys using Vector.revInductionOnβ‚‚ <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Binary variable (xs : Vector Ξ± n) (ys : Vector Ξ² n) @[simp] theorem mapAccumrβ‚‚_mapAccumr_left (f₁ : Ξ³ β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— ΞΆ) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ (mapAccumr fβ‚‚...
Mathlib/Data/Vector/MapLemmas.lean
108
117
theorem mapAccumrβ‚‚_mapAccumrβ‚‚_left_left (f₁ : Ξ³ β†’ Ξ± β†’ σ₁ β†’ σ₁ Γ— Ο†) (fβ‚‚ : Ξ± β†’ Ξ² β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ (mapAccumrβ‚‚ fβ‚‚ xs ys sβ‚‚).snd xs s₁) = let m := mapAccumrβ‚‚ (fun x y (s₁, sβ‚‚) => let rβ‚‚ := fβ‚‚ x y sβ‚‚ let r₁ := f₁ rβ‚‚.snd x s₁ ((r₁.fst, rβ‚‚.fst), r₁.snd) ...
induction xs, ys using Vector.revInductionOnβ‚‚ generalizing s₁ sβ‚‚ <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Binary variable (xs : Vector Ξ± n) (ys : Vector Ξ² n) @[simp] theorem mapAccumrβ‚‚_mapAccumr_left (f₁ : Ξ³ β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— ΞΆ) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ (mapAccumr fβ‚‚...
Mathlib/Data/Vector/MapLemmas.lean
120
130
theorem mapAccumrβ‚‚_mapAccumrβ‚‚_left_right (f₁ : Ξ³ β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— Ο†) (fβ‚‚ : Ξ± β†’ Ξ² β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ (mapAccumrβ‚‚ fβ‚‚ xs ys sβ‚‚).snd ys s₁) = let m := mapAccumrβ‚‚ (fun x y (s₁, sβ‚‚) => let rβ‚‚ := fβ‚‚ x y sβ‚‚ let r₁ := f₁ rβ‚‚.snd y s₁ ((r₁.fst, rβ‚‚.fst), r₁.sn...
induction xs, ys using Vector.revInductionOnβ‚‚ generalizing s₁ sβ‚‚ <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Binary variable (xs : Vector Ξ± n) (ys : Vector Ξ² n) @[simp] theorem mapAccumrβ‚‚_mapAccumr_left (f₁ : Ξ³ β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— ΞΆ) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ (mapAccumr fβ‚‚...
Mathlib/Data/Vector/MapLemmas.lean
133
142
theorem mapAccumrβ‚‚_mapAccumrβ‚‚_right_left (f₁ : Ξ± β†’ Ξ³ β†’ σ₁ β†’ σ₁ Γ— Ο†) (fβ‚‚ : Ξ± β†’ Ξ² β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ xs (mapAccumrβ‚‚ fβ‚‚ xs ys sβ‚‚).snd s₁) = let m := mapAccumrβ‚‚ (fun x y (s₁, sβ‚‚) => let rβ‚‚ := fβ‚‚ x y sβ‚‚ let r₁ := f₁ x rβ‚‚.snd s₁ ((r₁.fst, rβ‚‚.fst), r₁.snd) ...
induction xs, ys using Vector.revInductionOnβ‚‚ generalizing s₁ sβ‚‚ <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Binary variable (xs : Vector Ξ± n) (ys : Vector Ξ² n) @[simp] theorem mapAccumrβ‚‚_mapAccumr_left (f₁ : Ξ³ β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— ΞΆ) (fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ (mapAccumr fβ‚‚...
Mathlib/Data/Vector/MapLemmas.lean
145
154
theorem mapAccumrβ‚‚_mapAccumrβ‚‚_right_right (f₁ : Ξ² β†’ Ξ³ β†’ σ₁ β†’ σ₁ Γ— Ο†) (fβ‚‚ : Ξ± β†’ Ξ² β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³) : (mapAccumrβ‚‚ f₁ ys (mapAccumrβ‚‚ fβ‚‚ xs ys sβ‚‚).snd s₁) = let m := mapAccumrβ‚‚ (fun x y (s₁, sβ‚‚) => let rβ‚‚ := fβ‚‚ x y sβ‚‚ let r₁ := f₁ y rβ‚‚.snd s₁ ((r₁.fst, rβ‚‚.fst), r₁.snd) ...
induction xs, ys using Vector.revInductionOnβ‚‚ generalizing s₁ sβ‚‚ <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Bisim variable {xs : Vector Ξ± n}
Mathlib/Data/Vector/MapLemmas.lean
173
183
theorem mapAccumr_bisim {f₁ : Ξ± β†’ σ₁ β†’ σ₁ Γ— Ξ²} {fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ²} {s₁ : σ₁} {sβ‚‚ : Οƒβ‚‚} (R : σ₁ β†’ Οƒβ‚‚ β†’ Prop) (hβ‚€ : R s₁ sβ‚‚) (hR : βˆ€ {s q} a, R s q β†’ R (f₁ a s).1 (fβ‚‚ a q).1 ∧ (f₁ a s).2 = (fβ‚‚ a q).2) : R (mapAccumr f₁ xs s₁).fst (mapAccumr fβ‚‚ xs sβ‚‚).fst ∧ (mapAccumr f₁ xs s₁).snd = (mapAccumr fβ‚‚ xs sβ‚‚...
induction xs using Vector.revInductionOn generalizing s₁ sβ‚‚ next => exact ⟨hβ‚€, rfl⟩ next xs x ih => rcases (hR x hβ‚€) with ⟨hR, _⟩ simp only [mapAccumr_snoc, ih hR, true_and] congr 1
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Bisim variable {xs : Vector Ξ± n} theorem mapAccumr_bisim {f₁ : Ξ± β†’ σ₁ β†’ σ₁ Γ— Ξ²} {fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ²} {s₁ : σ₁} {sβ‚‚ : Οƒβ‚‚} (R : σ₁ β†’ Οƒβ‚‚ β†’ Prop) (hβ‚€ : R s₁ sβ‚‚) (hR : βˆ€ {...
Mathlib/Data/Vector/MapLemmas.lean
185
190
theorem mapAccumr_bisim_tail {f₁ : Ξ± β†’ σ₁ β†’ σ₁ Γ— Ξ²} {fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ²} {s₁ : σ₁} {sβ‚‚ : Οƒβ‚‚} (h : βˆƒ R : σ₁ β†’ Οƒβ‚‚ β†’ Prop, R s₁ sβ‚‚ ∧ βˆ€ {s q} a, R s q β†’ R (f₁ a s).1 (fβ‚‚ a q).1 ∧ (f₁ a s).2 = (fβ‚‚ a q).2) : (mapAccumr f₁ xs s₁).snd = (mapAccumr fβ‚‚ xs sβ‚‚).snd := by
rcases h with ⟨R, hβ‚€, hR⟩ exact (mapAccumr_bisim R hβ‚€ hR).2
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Bisim variable {xs : Vector Ξ± n} theorem mapAccumr_bisim {f₁ : Ξ± β†’ σ₁ β†’ σ₁ Γ— Ξ²} {fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ²} {s₁ : σ₁} {sβ‚‚ : Οƒβ‚‚} (R : σ₁ β†’ Οƒβ‚‚ β†’ Prop) (hβ‚€ : R s₁ sβ‚‚) (hR : βˆ€ {...
Mathlib/Data/Vector/MapLemmas.lean
192
203
theorem mapAccumrβ‚‚_bisim {ys : Vector Ξ² n} {f₁ : Ξ± β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— Ξ³} {fβ‚‚ : Ξ± β†’ Ξ² β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³} {s₁ : σ₁} {sβ‚‚ : Οƒβ‚‚} (R : σ₁ β†’ Οƒβ‚‚ β†’ Prop) (hβ‚€ : R s₁ sβ‚‚) (hR : βˆ€ {s q} a b, R s q β†’ R (f₁ a b s).1 (fβ‚‚ a b q).1 ∧ (f₁ a b s).2 = (fβ‚‚ a b q).2) : R (mapAccumrβ‚‚ f₁ xs ys s₁).1 (mapAccumrβ‚‚ fβ‚‚ xs ys sβ‚‚).1 ∧ ...
induction xs, ys using Vector.revInductionOnβ‚‚ generalizing s₁ sβ‚‚ next => exact ⟨hβ‚€, rfl⟩ next xs ys x y ih => rcases (hR x y hβ‚€) with ⟨hR, _⟩ simp only [mapAccumrβ‚‚_snoc, ih hR, true_and] congr 1
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Bisim variable {xs : Vector Ξ± n} theorem mapAccumr_bisim {f₁ : Ξ± β†’ σ₁ β†’ σ₁ Γ— Ξ²} {fβ‚‚ : Ξ± β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ²} {s₁ : σ₁} {sβ‚‚ : Οƒβ‚‚} (R : σ₁ β†’ Οƒβ‚‚ β†’ Prop) (hβ‚€ : R s₁ sβ‚‚) (hR : βˆ€ {...
Mathlib/Data/Vector/MapLemmas.lean
205
211
theorem mapAccumrβ‚‚_bisim_tail {ys : Vector Ξ² n} {f₁ : Ξ± β†’ Ξ² β†’ σ₁ β†’ σ₁ Γ— Ξ³} {fβ‚‚ : Ξ± β†’ Ξ² β†’ Οƒβ‚‚ β†’ Οƒβ‚‚ Γ— Ξ³} {s₁ : σ₁} {sβ‚‚ : Οƒβ‚‚} (h : βˆƒ R : σ₁ β†’ Οƒβ‚‚ β†’ Prop, R s₁ sβ‚‚ ∧ βˆ€ {s q} a b, R s q β†’ R (f₁ a b s).1 (fβ‚‚ a b q).1 ∧ (f₁ a b s).2 = (fβ‚‚ a b q).2) : (mapAccumrβ‚‚ f₁ xs ys s₁).2 = (mapAccumrβ‚‚ fβ‚‚ xs ys sβ‚‚).2 := by
rcases h with ⟨R, hβ‚€, hR⟩ exact (mapAccumrβ‚‚_bisim R hβ‚€ hR).2
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section UnusedInput variable {xs : Vector Ξ± n} {ys : Vector Ξ² n} @[simp]
Mathlib/Data/Vector/MapLemmas.lean
342
347
theorem mapAccumrβ‚‚_unused_input_left [Inhabited Ξ±] (f : Ξ± β†’ Ξ² β†’ Οƒ β†’ Οƒ Γ— Ξ³) (h : βˆ€ a b s, f default b s = f a b s) : mapAccumrβ‚‚ f xs ys s = mapAccumr (fun b s => f default b s) ys s := by
induction xs, ys using Vector.revInductionOnβ‚‚ generalizing s with | nil => rfl | snoc xs ys x y ih => simp [h x y s, ih]
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section UnusedInput variable {xs : Vector Ξ± n} {ys : Vector Ξ² n} @[simp] theorem mapAccumrβ‚‚_unused_input_left [Inhabited Ξ±] (f : Ξ± β†’ Ξ² β†’ Οƒ β†’ Οƒ Γ— Ξ³) (h : βˆ€ a b s, f default b s =...
Mathlib/Data/Vector/MapLemmas.lean
354
359
theorem mapAccumrβ‚‚_unused_input_right [Inhabited Ξ²] (f : Ξ± β†’ Ξ² β†’ Οƒ β†’ Οƒ Γ— Ξ³) (h : βˆ€ a b s, f a default s = f a b s) : mapAccumrβ‚‚ f xs ys s = mapAccumr (fun a s => f a default s) xs s := by
induction xs, ys using Vector.revInductionOnβ‚‚ generalizing s with | nil => rfl | snoc xs ys x y ih => simp [h x y s, ih]
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Comm variable (xs ys : Vector Ξ± n)
Mathlib/Data/Vector/MapLemmas.lean
369
371
theorem mapβ‚‚_comm (f : Ξ± β†’ Ξ± β†’ Ξ²) (comm : βˆ€ a₁ aβ‚‚, f a₁ aβ‚‚ = f aβ‚‚ a₁) : mapβ‚‚ f xs ys = mapβ‚‚ f ys xs := by
induction xs, ys using Vector.inductionOnβ‚‚ <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Comm variable (xs ys : Vector Ξ± n) theorem mapβ‚‚_comm (f : Ξ± β†’ Ξ± β†’ Ξ²) (comm : βˆ€ a₁ aβ‚‚, f a₁ aβ‚‚ = f aβ‚‚ a₁) : mapβ‚‚ f xs ys = mapβ‚‚ f ys xs := by induction xs, ys using Vec...
Mathlib/Data/Vector/MapLemmas.lean
373
375
theorem mapAccumrβ‚‚_comm (f : Ξ± β†’ Ξ± β†’ Οƒ β†’ Οƒ Γ— Ξ³) (comm : βˆ€ a₁ aβ‚‚ s, f a₁ aβ‚‚ s = f aβ‚‚ a₁ s) : mapAccumrβ‚‚ f xs ys s = mapAccumrβ‚‚ f ys xs s := by
induction xs, ys using Vector.inductionOnβ‚‚ generalizing s <;> simp_all
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Flip variable (xs : Vector Ξ± n) (ys : Vector Ξ² n)
Mathlib/Data/Vector/MapLemmas.lean
385
387
theorem mapβ‚‚_flip (f : Ξ± β†’ Ξ² β†’ Ξ³) : mapβ‚‚ f xs ys = mapβ‚‚ (flip f) ys xs := by
induction xs, ys using Vector.inductionOnβ‚‚ <;> simp_all[flip]
331
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Flip variable (xs : Vector Ξ± n) (ys : Vector Ξ² n) theorem mapβ‚‚_flip (f : Ξ± β†’ Ξ² β†’ Ξ³) : mapβ‚‚ f xs ys = mapβ‚‚ (flip f) ys xs := by induction xs, ys using Vector.induction...
Mathlib/Data/Vector/MapLemmas.lean
389
391
theorem mapAccumrβ‚‚_flip (f : Ξ± β†’ Ξ² β†’ Οƒ β†’ Οƒ Γ— Ξ³) : mapAccumrβ‚‚ f xs ys s = mapAccumrβ‚‚ (flip f) ys xs s := by
induction xs, ys using Vector.inductionOnβ‚‚ <;> simp_all[flip]
331
import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.FreeAlgebra import Mathlib.RingTheory.Localization.FractionRing #align_import algebra.char_p.algebra from "leanprover-community/mathlib"@"96782a2d6dcded92116d8ac9ae48efb41d46a27c"
Mathlib/Algebra/CharP/Algebra.lean
34
37
theorem charP_of_injective_ringHom {R A : Type*} [NonAssocSemiring R] [NonAssocSemiring A] {f : R β†’+* A} (h : Function.Injective f) (p : β„•) [CharP R p] : CharP A p where cast_eq_zero_iff' x := by
rw [← CharP.cast_eq_zero_iff R p x, ← map_natCast f x, map_eq_zero_iff f h]
332
import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.FreeAlgebra import Mathlib.RingTheory.Localization.FractionRing #align_import algebra.char_p.algebra from "leanprover-community/mathlib"@"96782a2d6dcded92116d8ac9ae48efb41d46a27c" theorem charP_of_injective_ringHom {R A : Type*} [NonAssocSemiring R] [NonAs...
Mathlib/Algebra/CharP/Algebra.lean
64
67
theorem RingHom.charP {R A : Type*} [NonAssocSemiring R] [NonAssocSemiring A] (f : R β†’+* A) (H : Function.Injective f) (p : β„•) [CharP A p] : CharP R p := by
obtain ⟨q, h⟩ := CharP.exists R exact CharP.eq _ (charP_of_injective_ringHom H q) β€ΉCharP A pβ€Ί β–Έ h
332
import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.FreeAlgebra import Mathlib.RingTheory.Localization.FractionRing #align_import algebra.char_p.algebra from "leanprover-community/mathlib"@"96782a2d6dcded92116d8ac9ae48efb41d46a27c" theorem charP_of_injective_ringHom {R A : Type*} [NonAssocSemiring R] [NonAs...
Mathlib/Algebra/CharP/Algebra.lean
121
123
theorem Algebra.ringChar_eq : ringChar K = ringChar L := by
rw [ringChar.eq_iff, Algebra.charP_iff K L] apply ringChar.charP
332
import Mathlib.FieldTheory.SplittingField.IsSplittingField import Mathlib.Algebra.CharP.Algebra #align_import field_theory.splitting_field.construction from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" noncomputable section open scoped Classical Polynomial universe u v w variable {...
Mathlib/FieldTheory/SplittingField/Construction.lean
55
59
theorem irreducible_factor (f : K[X]) : Irreducible (factor f) := by
rw [factor] split_ifs with H Β· exact (Classical.choose_spec H).1 Β· exact irreducible_X
333
import Mathlib.FieldTheory.SplittingField.IsSplittingField import Mathlib.Algebra.CharP.Algebra #align_import field_theory.splitting_field.construction from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" noncomputable section open scoped Classical Polynomial universe u v w variable {...
Mathlib/FieldTheory/SplittingField/Construction.lean
69
72
theorem factor_dvd_of_not_isUnit {f : K[X]} (hf1 : ¬IsUnit f) : factor f ∣ f := by
by_cases hf2 : f = 0; Β· rw [hf2]; exact dvd_zero _ rw [factor, dif_pos (WfDvdMonoid.exists_irreducible_factor hf1 hf2)] exact (Classical.choose_spec <| WfDvdMonoid.exists_irreducible_factor hf1 hf2).2
333
import Mathlib.FieldTheory.SplittingField.IsSplittingField import Mathlib.Algebra.CharP.Algebra #align_import field_theory.splitting_field.construction from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" noncomputable section open scoped Classical Polynomial universe u v w variable {...
Mathlib/FieldTheory/SplittingField/Construction.lean
88
93
theorem X_sub_C_mul_removeFactor (f : K[X]) (hf : f.natDegree β‰  0) : (X - C (AdjoinRoot.root f.factor)) * f.removeFactor = map (AdjoinRoot.of f.factor) f := by
let ⟨g, hg⟩ := factor_dvd_of_natDegree_ne_zero hf apply (mul_divByMonic_eq_iff_isRoot (R := AdjoinRoot f.factor) (a := AdjoinRoot.root f.factor)).mpr rw [IsRoot.def, eval_map, hg, evalβ‚‚_mul, ← hg, AdjoinRoot.evalβ‚‚_root, zero_mul]
333
import Mathlib.FieldTheory.SplittingField.IsSplittingField import Mathlib.Algebra.CharP.Algebra #align_import field_theory.splitting_field.construction from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" noncomputable section open scoped Classical Polynomial universe u v w variable {...
Mathlib/FieldTheory/SplittingField/Construction.lean
97
100
theorem natDegree_removeFactor (f : K[X]) : f.removeFactor.natDegree = f.natDegree - 1 := by
-- Porting note: `(map (AdjoinRoot.of f.factor) f)` was `_` rw [removeFactor, natDegree_divByMonic (map (AdjoinRoot.of f.factor) f) (monic_X_sub_C _), natDegree_map, natDegree_X_sub_C]
333
import Mathlib.FieldTheory.SplittingField.IsSplittingField import Mathlib.Algebra.CharP.Algebra #align_import field_theory.splitting_field.construction from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" noncomputable section open scoped Classical Polynomial universe u v w variable {...
Mathlib/FieldTheory/SplittingField/Construction.lean
103
104
theorem natDegree_removeFactor' {f : K[X]} {n : β„•} (hfn : f.natDegree = n + 1) : f.removeFactor.natDegree = n := by
rw [natDegree_removeFactor, hfn, n.add_sub_cancel]
333
import Mathlib.Algebra.Order.Ring.Int import Mathlib.Data.Nat.SuccPred #align_import data.int.succ_pred from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Function Order namespace Int -- so that Lean reads `Int.succ` through `SuccOrder.succ` @[instance] abbrev instSuccOrder : Su...
Mathlib/Data/Int/SuccPred.lean
79
79
theorem sub_one_covBy (z : β„€) : z - 1 β‹– z := by
rw [Int.covBy_iff_succ_eq, sub_add_cancel]
334
import Mathlib.Algebra.Order.Ring.Int import Mathlib.Data.Nat.SuccPred #align_import data.int.succ_pred from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Function Order namespace Int -- so that Lean reads `Int.succ` through `SuccOrder.succ` @[instance] abbrev instSuccOrder : Su...
Mathlib/Data/Int/SuccPred.lean
88
90
theorem natCast_covBy {a b : β„•} : (a : β„€) β‹– b ↔ a β‹– b := by
rw [Nat.covBy_iff_succ_eq, Int.covBy_iff_succ_eq] exact Int.natCast_inj
334
import Mathlib.Topology.Sets.Closeds #align_import topology.noetherian_space from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" variable (Ξ± Ξ² : Type*) [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] namespace TopologicalSpace @[mk_iff] class NoetherianSpace : Prop where wellFounded_open...
Mathlib/Topology/NoetherianSpace.lean
53
56
theorem noetherianSpace_iff_opens : NoetherianSpace Ξ± ↔ βˆ€ s : Opens Ξ±, IsCompact (s : Set Ξ±) := by
rw [noetherianSpace_iff, CompleteLattice.wellFounded_iff_isSupFiniteCompact, CompleteLattice.isSupFiniteCompact_iff_all_elements_compact] exact forall_congr' Opens.isCompactElement_iff
335
import Mathlib.Topology.Sets.Closeds #align_import topology.noetherian_space from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" variable (Ξ± Ξ² : Type*) [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] namespace TopologicalSpace @[mk_iff] class NoetherianSpace : Prop where wellFounded_open...
Mathlib/Topology/NoetherianSpace.lean
87
101
theorem noetherianSpace_TFAE : TFAE [NoetherianSpace Ξ±, WellFounded fun s t : Closeds Ξ± => s < t, βˆ€ s : Set Ξ±, IsCompact s, βˆ€ s : Opens Ξ±, IsCompact (s : Set Ξ±)] := by
tfae_have 1 ↔ 2 Β· refine (noetherianSpace_iff Ξ±).trans (Opens.compl_bijective.2.wellFounded_iff ?_) exact (@OrderIso.compl (Set Ξ±)).lt_iff_lt.symm tfae_have 1 ↔ 4 Β· exact noetherianSpace_iff_opens Ξ± tfae_have 1 β†’ 3 Β· exact @NoetherianSpace.isCompact Ξ± _ tfae_have 3 β†’ 4 Β· exact fun h s => h s tfae...
335
import Mathlib.Topology.Sets.Closeds #align_import topology.noetherian_space from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" variable (Ξ± Ξ² : Type*) [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] namespace TopologicalSpace @[mk_iff] class NoetherianSpace : Prop where wellFounded_open...
Mathlib/Topology/NoetherianSpace.lean
139
142
theorem noetherianSpace_set_iff (s : Set Ξ±) : NoetherianSpace s ↔ βˆ€ t, t βŠ† s β†’ IsCompact t := by
simp only [noetherianSpace_iff_isCompact, embedding_subtype_val.isCompact_iff, Subtype.forall_set_subtype]
335
import Mathlib.Topology.Sets.Closeds #align_import topology.noetherian_space from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" variable (Ξ± Ξ² : Type*) [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] namespace TopologicalSpace @[mk_iff] class NoetherianSpace : Prop where wellFounded_open...
Mathlib/Topology/NoetherianSpace.lean
150
155
theorem NoetherianSpace.iUnion {ΞΉ : Type*} (f : ΞΉ β†’ Set Ξ±) [Finite ΞΉ] [hf : βˆ€ i, NoetherianSpace (f i)] : NoetherianSpace (⋃ i, f i) := by
simp_rw [noetherianSpace_set_iff] at hf ⊒ intro t ht rw [← Set.inter_eq_left.mpr ht, Set.inter_iUnion] exact isCompact_iUnion fun i => hf i _ Set.inter_subset_right
335
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Tactic.Ring #align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" def hyperoperation : β„• β†’ β„• β†’ β„• β†’ β„• | 0, _, k => k + 1 | 1, m, 0 => m | 2, _, 0 => 0 | _ + 3, _, 0 => 1 | n + 1, m, k + 1 ...
Mathlib/Data/Nat/Hyperoperation.lean
49
50
theorem hyperoperation_ge_three_eq_one (n m : β„•) : hyperoperation (n + 3) m 0 = 1 := by
rw [hyperoperation]
336
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Tactic.Ring #align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" def hyperoperation : β„• β†’ β„• β†’ β„• β†’ β„• | 0, _, k => k + 1 | 1, m, 0 => m | 2, _, 0 => 0 | _ + 3, _, 0 => 1 | n + 1, m, k + 1 ...
Mathlib/Data/Nat/Hyperoperation.lean
53
55
theorem hyperoperation_recursion (n m k : β„•) : hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k) := by
rw [hyperoperation]
336
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Tactic.Ring #align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" def hyperoperation : β„• β†’ β„• β†’ β„• β†’ β„• | 0, _, k => k + 1 | 1, m, 0 => m | 2, _, 0 => 0 | _ + 3, _, 0 => 1 | n + 1, m, k + 1 ...
Mathlib/Data/Nat/Hyperoperation.lean
60
65
theorem hyperoperation_one : hyperoperation 1 = (Β· + Β·) := by
ext m k induction' k with bn bih Β· rw [Nat.add_zero m, hyperoperation] Β· rw [hyperoperation_recursion, bih, hyperoperation_zero] exact Nat.add_assoc m bn 1
336
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Tactic.Ring #align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" def hyperoperation : β„• β†’ β„• β†’ β„• β†’ β„• | 0, _, k => k + 1 | 1, m, 0 => m | 2, _, 0 => 0 | _ + 3, _, 0 => 1 | n + 1, m, k + 1 ...
Mathlib/Data/Nat/Hyperoperation.lean
69
78
theorem hyperoperation_two : hyperoperation 2 = (Β· * Β·) := by
ext m k induction' k with bn bih Β· rw [hyperoperation] exact (Nat.mul_zero m).symm Β· rw [hyperoperation_recursion, hyperoperation_one, bih] -- Porting note: was `ring` dsimp only nth_rewrite 1 [← mul_one m] rw [← mul_add, add_comm]
336
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Tactic.Ring #align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" def hyperoperation : β„• β†’ β„• β†’ β„• β†’ β„• | 0, _, k => k + 1 | 1, m, 0 => m | 2, _, 0 => 0 | _ + 3, _, 0 => 1 | n + 1, m, k + 1 ...
Mathlib/Data/Nat/Hyperoperation.lean
82
88
theorem hyperoperation_three : hyperoperation 3 = (Β· ^ Β·) := by
ext m k induction' k with bn bih Β· rw [hyperoperation_ge_three_eq_one] exact (pow_zero m).symm Β· rw [hyperoperation_recursion, hyperoperation_two, bih] exact (pow_succ' m bn).symm
336
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Tactic.Ring #align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" def hyperoperation : β„• β†’ β„• β†’ β„• β†’ β„• | 0, _, k => k + 1 | 1, m, 0 => m | 2, _, 0 => 0 | _ + 3, _, 0 => 1 | n + 1, m, k + 1 ...
Mathlib/Data/Nat/Hyperoperation.lean
91
95
theorem hyperoperation_ge_two_eq_self (n m : β„•) : hyperoperation (n + 2) m 1 = m := by
induction' n with nn nih Β· rw [hyperoperation_two] ring Β· rw [hyperoperation_recursion, hyperoperation_ge_three_eq_one, nih]
336
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Tactic.Ring #align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" def hyperoperation : β„• β†’ β„• β†’ β„• β†’ β„• | 0, _, k => k + 1 | 1, m, 0 => m | 2, _, 0 => 0 | _ + 3, _, 0 => 1 | n + 1, m, k + 1 ...
Mathlib/Data/Nat/Hyperoperation.lean
98
101
theorem hyperoperation_two_two_eq_four (n : β„•) : hyperoperation (n + 1) 2 2 = 4 := by
induction' n with nn nih Β· rw [hyperoperation_one] Β· rw [hyperoperation_recursion, hyperoperation_ge_two_eq_self, nih]
336
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Tactic.Ring #align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" def hyperoperation : β„• β†’ β„• β†’ β„• β†’ β„• | 0, _, k => k + 1 | 1, m, 0 => m | 2, _, 0 => 0 | _ + 3, _, 0 => 1 | n + 1, m, k + 1 ...
Mathlib/Data/Nat/Hyperoperation.lean
104
113
theorem hyperoperation_ge_three_one (n : β„•) : βˆ€ k : β„•, hyperoperation (n + 3) 1 k = 1 := by
induction' n with nn nih Β· intro k rw [hyperoperation_three] dsimp rw [one_pow] Β· intro k cases k Β· rw [hyperoperation_ge_three_eq_one] Β· rw [hyperoperation_recursion, nih]
336
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Tactic.Ring #align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" def hyperoperation : β„• β†’ β„• β†’ β„• β†’ β„• | 0, _, k => k + 1 | 1, m, 0 => m | 2, _, 0 => 0 | _ + 3, _, 0 => 1 | n + 1, m, k + 1 ...
Mathlib/Data/Nat/Hyperoperation.lean
116
126
theorem hyperoperation_ge_four_zero (n k : β„•) : hyperoperation (n + 4) 0 k = if Even k then 1 else 0 := by
induction' k with kk kih Β· rw [hyperoperation_ge_three_eq_one] simp only [Nat.zero_eq, even_zero, if_true] Β· rw [hyperoperation_recursion] rw [kih] simp_rw [Nat.even_add_one] split_ifs Β· exact hyperoperation_ge_two_eq_self (n + 1) 0 Β· exact hyperoperation_ge_three_eq_one n 0
336
import Mathlib.AlgebraicTopology.DoldKan.Normalized #align_import algebraic_topology.dold_kan.homotopy_equivalence from "leanprover-community/mathlib"@"f951e201d416fb50cc7826171d80aa510ec20747" open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Preadditive Simplicial DoldKan nonco...
Mathlib/AlgebraicTopology/DoldKan/HomotopyEquivalence.lean
52
58
theorem homotopyPToId_eventually_constant {q n : β„•} (hqn : n < q) : ((homotopyPToId X (q + 1)).hom n (n + 1) : X _[n] ⟢ X _[n + 1]) = (homotopyPToId X q).hom n (n + 1) := by
simp only [homotopyHσToZero, AlternatingFaceMapComplex.obj_X, Nat.add_eq, Homotopy.trans_hom, Homotopy.ofEq_hom, Pi.zero_apply, Homotopy.add_hom, Homotopy.compLeft_hom, add_zero, Homotopy.nullHomotopy'_hom, ComplexShape.down_Rel, hσ'_eq_zero hqn (c_mk (n + 1) n rfl), dite_eq_ite, ite_self, comp_zero, zer...
337
import Mathlib.Topology.Order.Basic #align_import topology.algebra.order.monotone_convergence from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Filter Set Function open scoped Classical open Filter Topology variable {Ξ± Ξ² : Type*} class SupConvergenceClass (Ξ± : Type*) [Preorde...
Mathlib/Topology/Order/MonotoneConvergence.lean
96
100
theorem tendsto_atTop_isLUB (h_mono : Monotone f) (ha : IsLUB (Set.range f) a) : Tendsto f atTop (𝓝 a) := by
suffices Tendsto (rangeFactorization f) atTop atTop from (SupConvergenceClass.tendsto_coe_atTop_isLUB _ _ ha).comp this exact h_mono.rangeFactorization.tendsto_atTop_atTop fun b => b.2.imp fun a ha => ha.ge
338
import Mathlib.Topology.Order.Basic #align_import topology.algebra.order.monotone_convergence from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Filter Set Function open scoped Classical open Filter Topology variable {Ξ± Ξ² : Type*} class SupConvergenceClass (Ξ± : Type*) [Preorde...
Mathlib/Topology/Order/MonotoneConvergence.lean
103
104
theorem tendsto_atBot_isLUB (h_anti : Antitone f) (ha : IsLUB (Set.range f) a) : Tendsto f atBot (𝓝 a) := by
convert tendsto_atTop_isLUB h_anti.dual_left ha using 1
338
import Mathlib.Algebra.Group.Semiconj.Defs import Mathlib.Algebra.Group.Units #align_import algebra.group.semiconj from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64" assert_not_exists MonoidWithZero assert_not_exists DenselyOrdered open scoped Int variable {M G : Type*} namespace Sem...
Mathlib/Algebra/Group/Semiconj/Units.lean
48
51
theorem units_inv_right {a : M} {x y : MΛ£} (h : SemiconjBy a x y) : SemiconjBy a ↑x⁻¹ ↑y⁻¹ := calc a * ↑x⁻¹ = ↑y⁻¹ * (y * a) * ↑x⁻¹ := by
rw [Units.inv_mul_cancel_left] _ = ↑y⁻¹ * a := by rw [← h.eq, mul_assoc, Units.mul_inv_cancel_right]
339
import Mathlib.Algebra.Group.Semiconj.Defs import Mathlib.Algebra.Group.Units #align_import algebra.group.semiconj from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64" assert_not_exists MonoidWithZero assert_not_exists DenselyOrdered open scoped Int variable {M G : Type*} namespace Sem...
Mathlib/Algebra/Group/Semiconj/Units.lean
64
67
theorem units_inv_symm_left {a : MΛ£} {x y : M} (h : SemiconjBy (↑a) x y) : SemiconjBy (↑a⁻¹) y x := calc ↑a⁻¹ * y = ↑a⁻¹ * (y * a * ↑a⁻¹) := by
rw [Units.mul_inv_cancel_right] _ = x * ↑a⁻¹ := by rw [← h.eq, ← mul_assoc, Units.inv_mul_cancel_left]
339
import Mathlib.Algebra.GroupWithZero.Units.Basic import Mathlib.Algebra.Group.Semiconj.Units import Mathlib.Init.Classical #align_import algebra.group_with_zero.semiconj from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" assert_not_exists DenselyOrdered variable {Ξ± Mβ‚€ Gβ‚€ Mβ‚€' Gβ‚€' F F' :...
Mathlib/Algebra/GroupWithZero/Semiconj.lean
24
25
theorem zero_right [MulZeroClass Gβ‚€] (a : Gβ‚€) : SemiconjBy a 0 0 := by
simp only [SemiconjBy, mul_zero, zero_mul]
340
import Mathlib.Algebra.GroupWithZero.Units.Basic import Mathlib.Algebra.Group.Semiconj.Units import Mathlib.Init.Classical #align_import algebra.group_with_zero.semiconj from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" assert_not_exists DenselyOrdered variable {Ξ± Mβ‚€ Gβ‚€ Mβ‚€' Gβ‚€' F F' :...
Mathlib/Algebra/GroupWithZero/Semiconj.lean
29
30
theorem zero_left [MulZeroClass Gβ‚€] (x y : Gβ‚€) : SemiconjBy 0 x y := by
simp only [SemiconjBy, mul_zero, zero_mul]
340
import Mathlib.Algebra.GroupWithZero.Units.Basic import Mathlib.Algebra.Group.Semiconj.Units import Mathlib.Init.Classical #align_import algebra.group_with_zero.semiconj from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" assert_not_exists DenselyOrdered variable {Ξ± Mβ‚€ Gβ‚€ Mβ‚€' Gβ‚€' F F' :...
Mathlib/Algebra/GroupWithZero/Semiconj.lean
45
54
theorem inv_rightβ‚€ (h : SemiconjBy a x y) : SemiconjBy a x⁻¹ y⁻¹ := by
by_cases ha : a = 0 Β· simp only [ha, zero_left] by_cases hx : x = 0 Β· subst x simp only [SemiconjBy, mul_zero, @eq_comm _ _ (y * a), mul_eq_zero] at h simp [h.resolve_right ha] Β· have := mul_ne_zero ha hx rw [h.eq, mul_ne_zero_iff] at this exact @units_inv_right _ _ _ (Units.mk0 x hx) (Units....
340
import Mathlib.Algebra.GroupWithZero.Units.Basic import Mathlib.Algebra.Group.Semiconj.Units import Mathlib.Init.Classical #align_import algebra.group_with_zero.semiconj from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" assert_not_exists DenselyOrdered variable {Ξ± Mβ‚€ Gβ‚€ Mβ‚€' Gβ‚€' F F' :...
Mathlib/Algebra/GroupWithZero/Semiconj.lean
62
65
theorem div_right (h : SemiconjBy a x y) (h' : SemiconjBy a x' y') : SemiconjBy a (x / x') (y / y') := by
rw [div_eq_mul_inv, div_eq_mul_inv] exact h.mul_right h'.inv_rightβ‚€
340
import Mathlib.Algebra.GroupWithZero.Semiconj import Mathlib.Algebra.Group.Commute.Units import Mathlib.Tactic.Nontriviality #align_import algebra.group_with_zero.commute from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" #align_import algebra.group_with_zero.power from "leanprover-communi...
Mathlib/Algebra/GroupWithZero/Commute.lean
27
34
theorem mul_inverse_rev' {a b : Mβ‚€} (h : Commute a b) : inverse (a * b) = inverse b * inverse a := by
by_cases hab : IsUnit (a * b) Β· obtain ⟨⟨a, rfl⟩, b, rfl⟩ := h.isUnit_mul_iff.mp hab rw [← Units.val_mul, inverse_unit, inverse_unit, inverse_unit, ← Units.val_mul, mul_inv_rev] obtain ha | hb := not_and_or.mp (mt h.isUnit_mul_iff.mpr hab) Β· rw [inverse_non_unit _ hab, inverse_non_unit _ ha, mul_zero] Β· ...
341
import Mathlib.Algebra.GroupWithZero.Commute import Mathlib.Algebra.Ring.Commute #align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441" variable {Ξ± Ξ² : Type*} namespace Nat section Commute variable [NonAssocSemiring Ξ±]
Mathlib/Data/Nat/Cast/Commute.lean
24
27
theorem cast_commute (n : β„•) (x : Ξ±) : Commute (n : Ξ±) x := by
induction n with | zero => rw [Nat.cast_zero]; exact Commute.zero_left x | succ n ihn => rw [Nat.cast_succ]; exact ihn.add_left (Commute.one_left x)
342
import Mathlib.Tactic.NormNum.Core import Mathlib.Tactic.HaveI import Mathlib.Data.Nat.Cast.Commute import Mathlib.Algebra.Ring.Int import Mathlib.Algebra.GroupWithZero.Invertible import Mathlib.Tactic.ClearExclamation import Mathlib.Data.Nat.Cast.Basic set_option autoImplicit true namespace Mathlib open Lean hidi...
Mathlib/Tactic/NormNum/Basic.lean
104
105
theorem isNat_natCast {R} [AddMonoidWithOne R] (n m : β„•) : IsNat n m β†’ IsNat (n : R) m := by
rintro ⟨⟨⟩⟩; exact ⟨rfl⟩
343
import Mathlib.Tactic.NormNum.Core import Mathlib.Tactic.HaveI import Mathlib.Data.Nat.Cast.Commute import Mathlib.Algebra.Ring.Int import Mathlib.Algebra.GroupWithZero.Invertible import Mathlib.Tactic.ClearExclamation import Mathlib.Data.Nat.Cast.Basic set_option autoImplicit true namespace Mathlib open Lean hidi...
Mathlib/Tactic/NormNum/Basic.lean
119
120
theorem isNat_intCast {R} [Ring R] (n : β„€) (m : β„•) : IsNat n m β†’ IsNat (n : R) m := by
rintro ⟨⟨⟩⟩; exact ⟨by simp⟩
343
import Mathlib.Tactic.NormNum.Core import Mathlib.Tactic.HaveI import Mathlib.Data.Nat.Cast.Commute import Mathlib.Algebra.Ring.Int import Mathlib.Algebra.GroupWithZero.Invertible import Mathlib.Tactic.ClearExclamation import Mathlib.Data.Nat.Cast.Basic set_option autoImplicit true namespace Mathlib open Lean hidi...
Mathlib/Tactic/NormNum/Basic.lean
125
126
theorem isintCast {R} [Ring R] (n m : β„€) : IsInt n m β†’ IsInt (n : R) m := by
rintro ⟨⟨⟩⟩; exact ⟨rfl⟩
343
import Mathlib.Algebra.Group.Units.Hom import Mathlib.Algebra.GroupWithZero.Commute import Mathlib.Algebra.GroupWithZero.Hom import Mathlib.GroupTheory.GroupAction.Units #align_import algebra.group_with_zero.units.lemmas from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" assert_not_exis...
Mathlib/Algebra/GroupWithZero/Units/Lemmas.lean
49
52
theorem eq_on_invβ‚€ (f g : F') (h : f a = g a) : f a⁻¹ = g a⁻¹ := by
rcases eq_or_ne a 0 with (rfl | ha) Β· rw [inv_zero, map_zero, map_zero] Β· exact (IsUnit.mk0 a ha).eq_on_inv f g h
344
import Mathlib.Algebra.Group.Units.Hom import Mathlib.Algebra.GroupWithZero.Commute import Mathlib.Algebra.GroupWithZero.Hom import Mathlib.GroupTheory.GroupAction.Units #align_import algebra.group_with_zero.units.lemmas from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" assert_not_exis...
Mathlib/Algebra/GroupWithZero/Units/Lemmas.lean
64
68
theorem map_invβ‚€ : f a⁻¹ = (f a)⁻¹ := by
by_cases h : a = 0 Β· simp [h, map_zero f] Β· apply eq_inv_of_mul_eq_one_left rw [← map_mul, inv_mul_cancel h, map_one]
344
import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Fintype.BigOperators #align_import data.sign from "leanprover-community/mathlib"@"2445c98ae4b87eabebdde552593519b9b6dc350c" -- Porting note (#11081): cannot automatically derive Fintype, adde...
Mathlib/Data/Sign.lean
162
162
theorem nonneg_iff {a : SignType} : 0 ≀ a ↔ a = 0 ∨ a = 1 := by
cases a <;> decide
345