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.Algebra.Module.BigOperators import Mathlib.Data.Fintype.Perm import Mathlib.GroupTheory.Perm.Finite import Mathlib.GroupTheory.Perm.List #align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open Equiv Function Finset variable {ι α β : Type*} namespace Equiv.Perm section SameCycle variable {f g : Perm α} {p : α → Prop} {x y z : α} def SameCycle (f : Perm α) (x y : α) : Prop := ∃ i : ℤ, (f ^ i) x = y #align equiv.perm.same_cycle Equiv.Perm.SameCycle @[refl] theorem SameCycle.refl (f : Perm α) (x : α) : SameCycle f x x := ⟨0, rfl⟩ #align equiv.perm.same_cycle.refl Equiv.Perm.SameCycle.refl theorem SameCycle.rfl : SameCycle f x x := SameCycle.refl _ _ #align equiv.perm.same_cycle.rfl Equiv.Perm.SameCycle.rfl protected theorem _root_.Eq.sameCycle (h : x = y) (f : Perm α) : f.SameCycle x y := by rw [h] #align eq.same_cycle Eq.sameCycle @[symm] theorem SameCycle.symm : SameCycle f x y → SameCycle f y x := fun ⟨i, hi⟩ => ⟨-i, by rw [zpow_neg, ← hi, inv_apply_self]⟩ #align equiv.perm.same_cycle.symm Equiv.Perm.SameCycle.symm theorem sameCycle_comm : SameCycle f x y ↔ SameCycle f y x := ⟨SameCycle.symm, SameCycle.symm⟩ #align equiv.perm.same_cycle_comm Equiv.Perm.sameCycle_comm @[trans] theorem SameCycle.trans : SameCycle f x y → SameCycle f y z → SameCycle f x z := fun ⟨i, hi⟩ ⟨j, hj⟩ => ⟨j + i, by rw [zpow_add, mul_apply, hi, hj]⟩ #align equiv.perm.same_cycle.trans Equiv.Perm.SameCycle.trans variable (f) in theorem SameCycle.equivalence : Equivalence (SameCycle f) := ⟨SameCycle.refl f, SameCycle.symm, SameCycle.trans⟩ def SameCycle.setoid (f : Perm α) : Setoid α where iseqv := SameCycle.equivalence f @[simp] theorem sameCycle_one : SameCycle 1 x y ↔ x = y := by simp [SameCycle] #align equiv.perm.same_cycle_one Equiv.Perm.sameCycle_one @[simp] theorem sameCycle_inv : SameCycle f⁻¹ x y ↔ SameCycle f x y := (Equiv.neg _).exists_congr_left.trans <| by simp [SameCycle] #align equiv.perm.same_cycle_inv Equiv.Perm.sameCycle_inv alias ⟨SameCycle.of_inv, SameCycle.inv⟩ := sameCycle_inv #align equiv.perm.same_cycle.of_inv Equiv.Perm.SameCycle.of_inv #align equiv.perm.same_cycle.inv Equiv.Perm.SameCycle.inv @[simp] theorem sameCycle_conj : SameCycle (g * f * g⁻¹) x y ↔ SameCycle f (g⁻¹ x) (g⁻¹ y) := exists_congr fun i => by simp [conj_zpow, eq_inv_iff_eq] #align equiv.perm.same_cycle_conj Equiv.Perm.sameCycle_conj theorem SameCycle.conj : SameCycle f x y → SameCycle (g * f * g⁻¹) (g x) (g y) := by simp [sameCycle_conj] #align equiv.perm.same_cycle.conj Equiv.Perm.SameCycle.conj theorem SameCycle.apply_eq_self_iff : SameCycle f x y → (f x = x ↔ f y = y) := fun ⟨i, hi⟩ => by rw [← hi, ← mul_apply, ← zpow_one_add, add_comm, zpow_add_one, mul_apply, (f ^ i).injective.eq_iff] #align equiv.perm.same_cycle.apply_eq_self_iff Equiv.Perm.SameCycle.apply_eq_self_iff theorem SameCycle.eq_of_left (h : SameCycle f x y) (hx : IsFixedPt f x) : x = y := let ⟨_, hn⟩ := h (hx.perm_zpow _).eq.symm.trans hn #align equiv.perm.same_cycle.eq_of_left Equiv.Perm.SameCycle.eq_of_left theorem SameCycle.eq_of_right (h : SameCycle f x y) (hy : IsFixedPt f y) : x = y := h.eq_of_left <| h.apply_eq_self_iff.2 hy #align equiv.perm.same_cycle.eq_of_right Equiv.Perm.SameCycle.eq_of_right @[simp] theorem sameCycle_apply_left : SameCycle f (f x) y ↔ SameCycle f x y := (Equiv.addRight 1).exists_congr_left.trans <| by simp [zpow_sub, SameCycle, Int.add_neg_one, Function.comp] #align equiv.perm.same_cycle_apply_left Equiv.Perm.sameCycle_apply_left @[simp] theorem sameCycle_apply_right : SameCycle f x (f y) ↔ SameCycle f x y := by rw [sameCycle_comm, sameCycle_apply_left, sameCycle_comm] #align equiv.perm.same_cycle_apply_right Equiv.Perm.sameCycle_apply_right @[simp] theorem sameCycle_inv_apply_left : SameCycle f (f⁻¹ x) y ↔ SameCycle f x y := by rw [← sameCycle_apply_left, apply_inv_self] #align equiv.perm.same_cycle_inv_apply_left Equiv.Perm.sameCycle_inv_apply_left @[simp]
Mathlib/GroupTheory/Perm/Cycle/Basic.lean
142
143
theorem sameCycle_inv_apply_right : SameCycle f x (f⁻¹ y) ↔ SameCycle f x y := by
rw [← sameCycle_apply_right, apply_inv_self]
1
2.718282
0
0
7
112
import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Fintype.Perm import Mathlib.GroupTheory.Perm.Finite import Mathlib.GroupTheory.Perm.List #align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open Equiv Function Finset variable {ι α β : Type*} namespace Equiv.Perm section SameCycle variable {f g : Perm α} {p : α → Prop} {x y z : α} def SameCycle (f : Perm α) (x y : α) : Prop := ∃ i : ℤ, (f ^ i) x = y #align equiv.perm.same_cycle Equiv.Perm.SameCycle @[refl] theorem SameCycle.refl (f : Perm α) (x : α) : SameCycle f x x := ⟨0, rfl⟩ #align equiv.perm.same_cycle.refl Equiv.Perm.SameCycle.refl theorem SameCycle.rfl : SameCycle f x x := SameCycle.refl _ _ #align equiv.perm.same_cycle.rfl Equiv.Perm.SameCycle.rfl protected theorem _root_.Eq.sameCycle (h : x = y) (f : Perm α) : f.SameCycle x y := by rw [h] #align eq.same_cycle Eq.sameCycle @[symm] theorem SameCycle.symm : SameCycle f x y → SameCycle f y x := fun ⟨i, hi⟩ => ⟨-i, by rw [zpow_neg, ← hi, inv_apply_self]⟩ #align equiv.perm.same_cycle.symm Equiv.Perm.SameCycle.symm theorem sameCycle_comm : SameCycle f x y ↔ SameCycle f y x := ⟨SameCycle.symm, SameCycle.symm⟩ #align equiv.perm.same_cycle_comm Equiv.Perm.sameCycle_comm @[trans] theorem SameCycle.trans : SameCycle f x y → SameCycle f y z → SameCycle f x z := fun ⟨i, hi⟩ ⟨j, hj⟩ => ⟨j + i, by rw [zpow_add, mul_apply, hi, hj]⟩ #align equiv.perm.same_cycle.trans Equiv.Perm.SameCycle.trans variable (f) in theorem SameCycle.equivalence : Equivalence (SameCycle f) := ⟨SameCycle.refl f, SameCycle.symm, SameCycle.trans⟩ def SameCycle.setoid (f : Perm α) : Setoid α where iseqv := SameCycle.equivalence f @[simp] theorem sameCycle_one : SameCycle 1 x y ↔ x = y := by simp [SameCycle] #align equiv.perm.same_cycle_one Equiv.Perm.sameCycle_one @[simp] theorem sameCycle_inv : SameCycle f⁻¹ x y ↔ SameCycle f x y := (Equiv.neg _).exists_congr_left.trans <| by simp [SameCycle] #align equiv.perm.same_cycle_inv Equiv.Perm.sameCycle_inv alias ⟨SameCycle.of_inv, SameCycle.inv⟩ := sameCycle_inv #align equiv.perm.same_cycle.of_inv Equiv.Perm.SameCycle.of_inv #align equiv.perm.same_cycle.inv Equiv.Perm.SameCycle.inv @[simp] theorem sameCycle_conj : SameCycle (g * f * g⁻¹) x y ↔ SameCycle f (g⁻¹ x) (g⁻¹ y) := exists_congr fun i => by simp [conj_zpow, eq_inv_iff_eq] #align equiv.perm.same_cycle_conj Equiv.Perm.sameCycle_conj theorem SameCycle.conj : SameCycle f x y → SameCycle (g * f * g⁻¹) (g x) (g y) := by simp [sameCycle_conj] #align equiv.perm.same_cycle.conj Equiv.Perm.SameCycle.conj theorem SameCycle.apply_eq_self_iff : SameCycle f x y → (f x = x ↔ f y = y) := fun ⟨i, hi⟩ => by rw [← hi, ← mul_apply, ← zpow_one_add, add_comm, zpow_add_one, mul_apply, (f ^ i).injective.eq_iff] #align equiv.perm.same_cycle.apply_eq_self_iff Equiv.Perm.SameCycle.apply_eq_self_iff theorem SameCycle.eq_of_left (h : SameCycle f x y) (hx : IsFixedPt f x) : x = y := let ⟨_, hn⟩ := h (hx.perm_zpow _).eq.symm.trans hn #align equiv.perm.same_cycle.eq_of_left Equiv.Perm.SameCycle.eq_of_left theorem SameCycle.eq_of_right (h : SameCycle f x y) (hy : IsFixedPt f y) : x = y := h.eq_of_left <| h.apply_eq_self_iff.2 hy #align equiv.perm.same_cycle.eq_of_right Equiv.Perm.SameCycle.eq_of_right @[simp] theorem sameCycle_apply_left : SameCycle f (f x) y ↔ SameCycle f x y := (Equiv.addRight 1).exists_congr_left.trans <| by simp [zpow_sub, SameCycle, Int.add_neg_one, Function.comp] #align equiv.perm.same_cycle_apply_left Equiv.Perm.sameCycle_apply_left @[simp] theorem sameCycle_apply_right : SameCycle f x (f y) ↔ SameCycle f x y := by rw [sameCycle_comm, sameCycle_apply_left, sameCycle_comm] #align equiv.perm.same_cycle_apply_right Equiv.Perm.sameCycle_apply_right @[simp] theorem sameCycle_inv_apply_left : SameCycle f (f⁻¹ x) y ↔ SameCycle f x y := by rw [← sameCycle_apply_left, apply_inv_self] #align equiv.perm.same_cycle_inv_apply_left Equiv.Perm.sameCycle_inv_apply_left @[simp] theorem sameCycle_inv_apply_right : SameCycle f x (f⁻¹ y) ↔ SameCycle f x y := by rw [← sameCycle_apply_right, apply_inv_self] #align equiv.perm.same_cycle_inv_apply_right Equiv.Perm.sameCycle_inv_apply_right @[simp] theorem sameCycle_zpow_left {n : ℤ} : SameCycle f ((f ^ n) x) y ↔ SameCycle f x y := (Equiv.addRight (n : ℤ)).exists_congr_left.trans <| by simp [SameCycle, zpow_add] #align equiv.perm.same_cycle_zpow_left Equiv.Perm.sameCycle_zpow_left @[simp]
Mathlib/GroupTheory/Perm/Cycle/Basic.lean
152
153
theorem sameCycle_zpow_right {n : ℤ} : SameCycle f x ((f ^ n) y) ↔ SameCycle f x y := by
rw [sameCycle_comm, sameCycle_zpow_left, sameCycle_comm]
1
2.718282
0
0
7
112
import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Fintype.Perm import Mathlib.GroupTheory.Perm.Finite import Mathlib.GroupTheory.Perm.List #align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open Equiv Function Finset variable {ι α β : Type*} namespace Equiv.Perm section SameCycle variable {f g : Perm α} {p : α → Prop} {x y z : α} def SameCycle (f : Perm α) (x y : α) : Prop := ∃ i : ℤ, (f ^ i) x = y #align equiv.perm.same_cycle Equiv.Perm.SameCycle @[refl] theorem SameCycle.refl (f : Perm α) (x : α) : SameCycle f x x := ⟨0, rfl⟩ #align equiv.perm.same_cycle.refl Equiv.Perm.SameCycle.refl theorem SameCycle.rfl : SameCycle f x x := SameCycle.refl _ _ #align equiv.perm.same_cycle.rfl Equiv.Perm.SameCycle.rfl protected theorem _root_.Eq.sameCycle (h : x = y) (f : Perm α) : f.SameCycle x y := by rw [h] #align eq.same_cycle Eq.sameCycle @[symm] theorem SameCycle.symm : SameCycle f x y → SameCycle f y x := fun ⟨i, hi⟩ => ⟨-i, by rw [zpow_neg, ← hi, inv_apply_self]⟩ #align equiv.perm.same_cycle.symm Equiv.Perm.SameCycle.symm theorem sameCycle_comm : SameCycle f x y ↔ SameCycle f y x := ⟨SameCycle.symm, SameCycle.symm⟩ #align equiv.perm.same_cycle_comm Equiv.Perm.sameCycle_comm @[trans] theorem SameCycle.trans : SameCycle f x y → SameCycle f y z → SameCycle f x z := fun ⟨i, hi⟩ ⟨j, hj⟩ => ⟨j + i, by rw [zpow_add, mul_apply, hi, hj]⟩ #align equiv.perm.same_cycle.trans Equiv.Perm.SameCycle.trans variable (f) in theorem SameCycle.equivalence : Equivalence (SameCycle f) := ⟨SameCycle.refl f, SameCycle.symm, SameCycle.trans⟩ def SameCycle.setoid (f : Perm α) : Setoid α where iseqv := SameCycle.equivalence f @[simp] theorem sameCycle_one : SameCycle 1 x y ↔ x = y := by simp [SameCycle] #align equiv.perm.same_cycle_one Equiv.Perm.sameCycle_one @[simp] theorem sameCycle_inv : SameCycle f⁻¹ x y ↔ SameCycle f x y := (Equiv.neg _).exists_congr_left.trans <| by simp [SameCycle] #align equiv.perm.same_cycle_inv Equiv.Perm.sameCycle_inv alias ⟨SameCycle.of_inv, SameCycle.inv⟩ := sameCycle_inv #align equiv.perm.same_cycle.of_inv Equiv.Perm.SameCycle.of_inv #align equiv.perm.same_cycle.inv Equiv.Perm.SameCycle.inv @[simp] theorem sameCycle_conj : SameCycle (g * f * g⁻¹) x y ↔ SameCycle f (g⁻¹ x) (g⁻¹ y) := exists_congr fun i => by simp [conj_zpow, eq_inv_iff_eq] #align equiv.perm.same_cycle_conj Equiv.Perm.sameCycle_conj theorem SameCycle.conj : SameCycle f x y → SameCycle (g * f * g⁻¹) (g x) (g y) := by simp [sameCycle_conj] #align equiv.perm.same_cycle.conj Equiv.Perm.SameCycle.conj theorem SameCycle.apply_eq_self_iff : SameCycle f x y → (f x = x ↔ f y = y) := fun ⟨i, hi⟩ => by rw [← hi, ← mul_apply, ← zpow_one_add, add_comm, zpow_add_one, mul_apply, (f ^ i).injective.eq_iff] #align equiv.perm.same_cycle.apply_eq_self_iff Equiv.Perm.SameCycle.apply_eq_self_iff theorem SameCycle.eq_of_left (h : SameCycle f x y) (hx : IsFixedPt f x) : x = y := let ⟨_, hn⟩ := h (hx.perm_zpow _).eq.symm.trans hn #align equiv.perm.same_cycle.eq_of_left Equiv.Perm.SameCycle.eq_of_left theorem SameCycle.eq_of_right (h : SameCycle f x y) (hy : IsFixedPt f y) : x = y := h.eq_of_left <| h.apply_eq_self_iff.2 hy #align equiv.perm.same_cycle.eq_of_right Equiv.Perm.SameCycle.eq_of_right @[simp] theorem sameCycle_apply_left : SameCycle f (f x) y ↔ SameCycle f x y := (Equiv.addRight 1).exists_congr_left.trans <| by simp [zpow_sub, SameCycle, Int.add_neg_one, Function.comp] #align equiv.perm.same_cycle_apply_left Equiv.Perm.sameCycle_apply_left @[simp] theorem sameCycle_apply_right : SameCycle f x (f y) ↔ SameCycle f x y := by rw [sameCycle_comm, sameCycle_apply_left, sameCycle_comm] #align equiv.perm.same_cycle_apply_right Equiv.Perm.sameCycle_apply_right @[simp] theorem sameCycle_inv_apply_left : SameCycle f (f⁻¹ x) y ↔ SameCycle f x y := by rw [← sameCycle_apply_left, apply_inv_self] #align equiv.perm.same_cycle_inv_apply_left Equiv.Perm.sameCycle_inv_apply_left @[simp] theorem sameCycle_inv_apply_right : SameCycle f x (f⁻¹ y) ↔ SameCycle f x y := by rw [← sameCycle_apply_right, apply_inv_self] #align equiv.perm.same_cycle_inv_apply_right Equiv.Perm.sameCycle_inv_apply_right @[simp] theorem sameCycle_zpow_left {n : ℤ} : SameCycle f ((f ^ n) x) y ↔ SameCycle f x y := (Equiv.addRight (n : ℤ)).exists_congr_left.trans <| by simp [SameCycle, zpow_add] #align equiv.perm.same_cycle_zpow_left Equiv.Perm.sameCycle_zpow_left @[simp] theorem sameCycle_zpow_right {n : ℤ} : SameCycle f x ((f ^ n) y) ↔ SameCycle f x y := by rw [sameCycle_comm, sameCycle_zpow_left, sameCycle_comm] #align equiv.perm.same_cycle_zpow_right Equiv.Perm.sameCycle_zpow_right @[simp]
Mathlib/GroupTheory/Perm/Cycle/Basic.lean
157
158
theorem sameCycle_pow_left {n : ℕ} : SameCycle f ((f ^ n) x) y ↔ SameCycle f x y := by
rw [← zpow_natCast, sameCycle_zpow_left]
1
2.718282
0
0
7
112
import Batteries.Control.ForInStep.Basic @[simp] theorem ForInStep.bind_done [Monad m] (a : α) (f : α → m (ForInStep α)) : (ForInStep.done a).bind (m := m) f = pure (.done a) := rfl @[simp] theorem ForInStep.bind_yield [Monad m] (a : α) (f : α → m (ForInStep α)) : (ForInStep.yield a).bind (m := m) f = f a := rfl attribute [simp] ForInStep.bindM @[simp] theorem ForInStep.run_done : (ForInStep.done a).run = a := rfl @[simp] theorem ForInStep.run_yield : (ForInStep.yield a).run = a := rfl @[simp] theorem ForInStep.bindList_nil [Monad m] (f : α → β → m (ForInStep β)) (s : ForInStep β) : s.bindList f [] = pure s := rfl @[simp] theorem ForInStep.bindList_cons [Monad m] (f : α → β → m (ForInStep β)) (s : ForInStep β) (a l) : s.bindList f (a::l) = s.bind fun b => f a b >>= (·.bindList f l) := rfl @[simp] theorem ForInStep.done_bindList [Monad m] (f : α → β → m (ForInStep β)) (a l) : (ForInStep.done a).bindList f l = pure (.done a) := by cases l <;> simp @[simp] theorem ForInStep.bind_yield_bindList [Monad m] (f : α → β → m (ForInStep β)) (s : ForInStep β) (l) : (s.bind fun a => (yield a).bindList f l) = s.bindList f l := by cases s <;> simp @[simp] theorem ForInStep.bind_bindList_assoc [Monad m] [LawfulMonad m] (f : β → m (ForInStep β)) (g : α → β → m (ForInStep β)) (s : ForInStep β) (l) : s.bind f >>= (·.bindList g l) = s.bind fun b => f b >>= (·.bindList g l) := by cases s <;> simp
.lake/packages/batteries/Batteries/Control/ForInStep/Lemmas.lean
40
42
theorem ForInStep.bindList_cons' [Monad m] [LawfulMonad m] (f : α → β → m (ForInStep β)) (s : ForInStep β) (a l) : s.bindList f (a::l) = s.bind (f a) >>= (·.bindList f l) := by
simp
1
2.718282
0
0
1
113
import Mathlib.Algebra.Associated import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra.Ring.Opposite import Mathlib.GroupTheory.GroupAction.Opposite #align_import ring_theory.non_zero_divisors from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe" variable (M₀ : Type*) [MonoidWithZero M₀] def nonZeroDivisorsLeft : Submonoid M₀ where carrier := {x | ∀ y, y * x = 0 → y = 0} one_mem' := by simp mul_mem' {x} {y} hx hy := fun z hz ↦ hx _ <| hy _ (mul_assoc z x y ▸ hz) @[simp] lemma mem_nonZeroDivisorsLeft_iff {x : M₀} : x ∈ nonZeroDivisorsLeft M₀ ↔ ∀ y, y * x = 0 → y = 0 := Iff.rfl lemma nmem_nonZeroDivisorsLeft_iff {r : M₀} : r ∉ nonZeroDivisorsLeft M₀ ↔ {s | s * r = 0 ∧ s ≠ 0}.Nonempty := by simpa [mem_nonZeroDivisorsLeft_iff] using Set.nonempty_def.symm def nonZeroDivisorsRight : Submonoid M₀ where carrier := {x | ∀ y, x * y = 0 → y = 0} one_mem' := by simp mul_mem' := fun {x} {y} hx hy z hz ↦ hy _ (hx _ ((mul_assoc x y z).symm ▸ hz)) @[simp] lemma mem_nonZeroDivisorsRight_iff {x : M₀} : x ∈ nonZeroDivisorsRight M₀ ↔ ∀ y, x * y = 0 → y = 0 := Iff.rfl lemma nmem_nonZeroDivisorsRight_iff {r : M₀} : r ∉ nonZeroDivisorsRight M₀ ↔ {s | r * s = 0 ∧ s ≠ 0}.Nonempty := by simpa [mem_nonZeroDivisorsRight_iff] using Set.nonempty_def.symm lemma nonZeroDivisorsLeft_eq_right (M₀ : Type*) [CommMonoidWithZero M₀] : nonZeroDivisorsLeft M₀ = nonZeroDivisorsRight M₀ := by ext x; simp [mul_comm x] @[simp] lemma coe_nonZeroDivisorsLeft_eq [NoZeroDivisors M₀] [Nontrivial M₀] : nonZeroDivisorsLeft M₀ = {x : M₀ | x ≠ 0} := by ext x simp only [SetLike.mem_coe, mem_nonZeroDivisorsLeft_iff, mul_eq_zero, forall_eq_or_imp, true_and, Set.mem_setOf_eq] refine ⟨fun h ↦ ?_, fun hx y hx' ↦ by contradiction⟩ contrapose! h exact ⟨1, h, one_ne_zero⟩ @[simp] lemma coe_nonZeroDivisorsRight_eq [NoZeroDivisors M₀] [Nontrivial M₀] : nonZeroDivisorsRight M₀ = {x : M₀ | x ≠ 0} := by ext x simp only [SetLike.mem_coe, mem_nonZeroDivisorsRight_iff, mul_eq_zero, Set.mem_setOf_eq] refine ⟨fun h ↦ ?_, fun hx y hx' ↦ by aesop⟩ contrapose! h exact ⟨1, Or.inl h, one_ne_zero⟩ def nonZeroDivisors (R : Type*) [MonoidWithZero R] : Submonoid R where carrier := { x | ∀ z, z * x = 0 → z = 0 } one_mem' _ hz := by rwa [mul_one] at hz mul_mem' hx₁ hx₂ _ hz := by rw [← mul_assoc] at hz exact hx₁ _ (hx₂ _ hz) #align non_zero_divisors nonZeroDivisors scoped[nonZeroDivisors] notation:9000 R "⁰" => nonZeroDivisors R def nonZeroSMulDivisors (R : Type*) [MonoidWithZero R] (M : Type _) [Zero M] [MulAction R M] : Submonoid R where carrier := { r | ∀ m : M, r • m = 0 → m = 0} one_mem' m h := (one_smul R m) ▸ h mul_mem' {r₁ r₂} h₁ h₂ m H := h₂ _ <| h₁ _ <| mul_smul r₁ r₂ m ▸ H scoped[nonZeroSMulDivisors] notation:9000 R "⁰[" M "]" => nonZeroSMulDivisors R M section nonZeroDivisors open nonZeroDivisors variable {M M' M₁ R R' F : Type*} [MonoidWithZero M] [MonoidWithZero M'] [CommMonoidWithZero M₁] [Ring R] [CommRing R'] theorem mem_nonZeroDivisors_iff {r : M} : r ∈ M⁰ ↔ ∀ x, x * r = 0 → x = 0 := Iff.rfl #align mem_non_zero_divisors_iff mem_nonZeroDivisors_iff lemma nmem_nonZeroDivisors_iff {r : M} : r ∉ M⁰ ↔ {s | s * r = 0 ∧ s ≠ 0}.Nonempty := by simpa [mem_nonZeroDivisors_iff] using Set.nonempty_def.symm theorem mul_right_mem_nonZeroDivisors_eq_zero_iff {x r : M} (hr : r ∈ M⁰) : x * r = 0 ↔ x = 0 := ⟨hr _, by simp (config := { contextual := true })⟩ #align mul_right_mem_non_zero_divisors_eq_zero_iff mul_right_mem_nonZeroDivisors_eq_zero_iff @[simp] theorem mul_right_coe_nonZeroDivisors_eq_zero_iff {x : M} {c : M⁰} : x * c = 0 ↔ x = 0 := mul_right_mem_nonZeroDivisors_eq_zero_iff c.prop #align mul_right_coe_non_zero_divisors_eq_zero_iff mul_right_coe_nonZeroDivisors_eq_zero_iff
Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
129
130
theorem mul_left_mem_nonZeroDivisors_eq_zero_iff {r x : M₁} (hr : r ∈ M₁⁰) : r * x = 0 ↔ x = 0 := by
rw [mul_comm, mul_right_mem_nonZeroDivisors_eq_zero_iff hr]
1
2.718282
0
0
1
114
import Mathlib.Init.ZeroOne import Mathlib.Data.Set.Defs import Mathlib.Order.Basic import Mathlib.Order.SymmDiff import Mathlib.Tactic.Tauto import Mathlib.Tactic.ByContra import Mathlib.Util.Delaborators #align_import data.set.basic from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29" open Function universe u v w x namespace Set variable {α : Type u} {s t : Set α} instance instBooleanAlgebraSet : BooleanAlgebra (Set α) := { (inferInstance : BooleanAlgebra (α → Prop)) with sup := (· ∪ ·), le := (· ≤ ·), lt := fun s t => s ⊆ t ∧ ¬t ⊆ s, inf := (· ∩ ·), bot := ∅, compl := (·ᶜ), top := univ, sdiff := (· \ ·) } instance : HasSSubset (Set α) := ⟨(· < ·)⟩ @[simp] theorem top_eq_univ : (⊤ : Set α) = univ := rfl #align set.top_eq_univ Set.top_eq_univ @[simp] theorem bot_eq_empty : (⊥ : Set α) = ∅ := rfl #align set.bot_eq_empty Set.bot_eq_empty @[simp] theorem sup_eq_union : ((· ⊔ ·) : Set α → Set α → Set α) = (· ∪ ·) := rfl #align set.sup_eq_union Set.sup_eq_union @[simp] theorem inf_eq_inter : ((· ⊓ ·) : Set α → Set α → Set α) = (· ∩ ·) := rfl #align set.inf_eq_inter Set.inf_eq_inter @[simp] theorem le_eq_subset : ((· ≤ ·) : Set α → Set α → Prop) = (· ⊆ ·) := rfl #align set.le_eq_subset Set.le_eq_subset @[simp] theorem lt_eq_ssubset : ((· < ·) : Set α → Set α → Prop) = (· ⊂ ·) := rfl #align set.lt_eq_ssubset Set.lt_eq_ssubset theorem le_iff_subset : s ≤ t ↔ s ⊆ t := Iff.rfl #align set.le_iff_subset Set.le_iff_subset theorem lt_iff_ssubset : s < t ↔ s ⊂ t := Iff.rfl #align set.lt_iff_ssubset Set.lt_iff_ssubset alias ⟨_root_.LE.le.subset, _root_.HasSubset.Subset.le⟩ := le_iff_subset #align has_subset.subset.le HasSubset.Subset.le alias ⟨_root_.LT.lt.ssubset, _root_.HasSSubset.SSubset.lt⟩ := lt_iff_ssubset #align has_ssubset.ssubset.lt HasSSubset.SSubset.lt instance PiSetCoe.canLift (ι : Type u) (α : ι → Type v) [∀ i, Nonempty (α i)] (s : Set ι) : CanLift (∀ i : s, α i) (∀ i, α i) (fun f i => f i) fun _ => True := PiSubtype.canLift ι α s #align set.pi_set_coe.can_lift Set.PiSetCoe.canLift instance PiSetCoe.canLift' (ι : Type u) (α : Type v) [Nonempty α] (s : Set ι) : CanLift (s → α) (ι → α) (fun f i => f i) fun _ => True := PiSetCoe.canLift ι (fun _ => α) s #align set.pi_set_coe.can_lift' Set.PiSetCoe.canLift' end Set theorem Subtype.mem {α : Type*} {s : Set α} (p : s) : (p : α) ∈ s := p.prop #align subtype.mem Subtype.mem theorem Eq.subset {α} {s t : Set α} : s = t → s ⊆ t := fun h₁ _ h₂ => by rw [← h₁]; exact h₂ #align eq.subset Eq.subset namespace Set variable {α : Type u} {β : Type v} {γ : Type w} {ι : Sort x} {a b : α} {s s₁ s₂ t t₁ t₂ u : Set α} instance : Inhabited (Set α) := ⟨∅⟩ theorem ext_iff {s t : Set α} : s = t ↔ ∀ x, x ∈ s ↔ x ∈ t := ⟨fun h x => by rw [h], ext⟩ #align set.ext_iff Set.ext_iff @[trans] theorem mem_of_mem_of_subset {x : α} {s t : Set α} (hx : x ∈ s) (h : s ⊆ t) : x ∈ t := h hx #align set.mem_of_mem_of_subset Set.mem_of_mem_of_subset
Mathlib/Data/Set/Basic.lean
224
225
theorem forall_in_swap {p : α → β → Prop} : (∀ a ∈ s, ∀ (b), p a b) ↔ ∀ (b), ∀ a ∈ s, p a b := by
tauto
1
2.718282
0
0
1
115
import Mathlib.Logic.Equiv.Nat import Mathlib.Logic.Equiv.Fin import Mathlib.Data.Countable.Defs #align_import data.countable.basic from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58" universe u v w open Function instance : Countable ℤ := Countable.of_equiv ℕ Equiv.intEquivNat.symm section Embedding variable {α : Sort u} {β : Sort v} theorem countable_iff_nonempty_embedding : Countable α ↔ Nonempty (α ↪ ℕ) := ⟨fun ⟨⟨f, hf⟩⟩ => ⟨⟨f, hf⟩⟩, fun ⟨f⟩ => ⟨⟨f, f.2⟩⟩⟩ #align countable_iff_nonempty_embedding countable_iff_nonempty_embedding
Mathlib/Data/Countable/Basic.lean
38
39
theorem uncountable_iff_isEmpty_embedding : Uncountable α ↔ IsEmpty (α ↪ ℕ) := by
rw [← not_countable_iff, countable_iff_nonempty_embedding, not_nonempty_iff]
1
2.718282
0
0
1
116
import Mathlib.RingTheory.Localization.LocalizationLocalization #align_import ring_theory.localization.as_subring from "leanprover-community/mathlib"@"649ca66bf4d62796b5eefef966e622d91aa471f3" namespace Localization open nonZeroDivisors variable {A : Type*} (K : Type*) [CommRing A] (S : Submonoid A) (hS : S ≤ A⁰) section CommRing variable [CommRing K] [Algebra A K] [IsFractionRing A K]
Mathlib/RingTheory/Localization/AsSubring.lean
31
32
theorem map_isUnit_of_le (hS : S ≤ A⁰) (s : S) : IsUnit (algebraMap A K s) := by
apply IsLocalization.map_units K (⟨s.1, hS s.2⟩ : A⁰)
1
2.718282
0
0
1
117
import Mathlib.RingTheory.GradedAlgebra.Basic import Mathlib.Algebra.GradedMulAction import Mathlib.Algebra.DirectSum.Decomposition import Mathlib.Algebra.Module.BigOperators #align_import algebra.module.graded_module from "leanprover-community/mathlib"@"59cdeb0da2480abbc235b7e611ccd9a7e5603d7c" section open DirectSum variable {ιA ιB : Type*} (A : ιA → Type*) (M : ιB → Type*) namespace DirectSum open GradedMonoid class GdistribMulAction [AddMonoid ιA] [VAdd ιA ιB] [GMonoid A] [∀ i, AddMonoid (M i)] extends GMulAction A M where smul_add {i j} (a : A i) (b c : M j) : smul a (b + c) = smul a b + smul a c smul_zero {i j} (a : A i) : smul a (0 : M j) = 0 #align direct_sum.gdistrib_mul_action DirectSum.GdistribMulAction class Gmodule [AddMonoid ιA] [VAdd ιA ιB] [∀ i, AddMonoid (A i)] [∀ i, AddMonoid (M i)] [GMonoid A] extends GdistribMulAction A M where add_smul {i j} (a a' : A i) (b : M j) : smul (a + a') b = smul a b + smul a' b zero_smul {i j} (b : M j) : smul (0 : A i) b = 0 #align direct_sum.gmodule DirectSum.Gmodule instance GSemiring.toGmodule [AddMonoid ιA] [∀ i : ιA, AddCommMonoid (A i)] [h : GSemiring A] : Gmodule A A := { GMonoid.toGMulAction A with smul_add := fun _ _ _ => h.mul_add _ _ _ smul_zero := fun _ => h.mul_zero _ add_smul := fun _ _ => h.add_mul _ _ zero_smul := fun _ => h.zero_mul _ } #align direct_sum.gsemiring.to_gmodule DirectSum.GSemiring.toGmodule variable [AddMonoid ιA] [VAdd ιA ιB] [∀ i : ιA, AddCommMonoid (A i)] [∀ i, AddCommMonoid (M i)] @[simps] def gsmulHom [GMonoid A] [Gmodule A M] {i j} : A i →+ M j →+ M (i +ᵥ j) where toFun a := { toFun := fun b => GSMul.smul a b map_zero' := GdistribMulAction.smul_zero _ map_add' := GdistribMulAction.smul_add _ } map_zero' := AddMonoidHom.ext fun a => Gmodule.zero_smul a map_add' _a₁ _a₂ := AddMonoidHom.ext fun _b => Gmodule.add_smul _ _ _ #align direct_sum.gsmul_hom DirectSum.gsmulHom namespace Gmodule def smulAddMonoidHom [DecidableEq ιA] [DecidableEq ιB] [GMonoid A] [Gmodule A M] : (⨁ i, A i) →+ (⨁ i, M i) →+ ⨁ i, M i := toAddMonoid fun _i => AddMonoidHom.flip <| toAddMonoid fun _j => AddMonoidHom.flip <| (of M _).compHom.comp <| gsmulHom A M #align direct_sum.gmodule.smul_add_monoid_hom DirectSum.Gmodule.smulAddMonoidHom section open GradedMonoid DirectSum Gmodule instance [DecidableEq ιA] [DecidableEq ιB] [GMonoid A] [Gmodule A M] : SMul (⨁ i, A i) (⨁ i, M i) where smul x y := smulAddMonoidHom A M x y @[simp] theorem smul_def [DecidableEq ιA] [DecidableEq ιB] [GMonoid A] [Gmodule A M] (x : ⨁ i, A i) (y : ⨁ i, M i) : x • y = smulAddMonoidHom _ _ x y := rfl #align direct_sum.gmodule.smul_def DirectSum.Gmodule.smul_def @[simp]
Mathlib/Algebra/Module/GradedModule.lean
99
102
theorem smulAddMonoidHom_apply_of_of [DecidableEq ιA] [DecidableEq ιB] [GMonoid A] [Gmodule A M] {i j} (x : A i) (y : M j) : smulAddMonoidHom A M (DirectSum.of A i x) (of M j y) = of M (i +ᵥ j) (GSMul.smul x y) := by
simp [smulAddMonoidHom]
1
2.718282
0
0
1
118
import Mathlib.Algebra.Group.Int import Mathlib.GroupTheory.GroupAction.Opposite import Mathlib.Logic.Function.Iterate #align_import algebra.hom.iterate from "leanprover-community/mathlib"@"792a2a264169d64986541c6f8f7e3bbb6acb6295" assert_not_exists DenselyOrdered assert_not_exists Ring open Function variable {M : Type*} {N : Type*} {G : Type*} {H : Type*} theorem hom_coe_pow {F : Type*} [Monoid F] (c : F → M → M) (h1 : c 1 = id) (hmul : ∀ f g, c (f * g) = c f ∘ c g) (f : F) : ∀ n, c (f ^ n) = (c f)^[n] | 0 => by rw [pow_zero, h1] rfl | n + 1 => by rw [pow_succ, iterate_succ, hmul, hom_coe_pow c h1 hmul f n] #align hom_coe_pow hom_coe_pow @[to_additive (attr := simp)] theorem iterate_map_mul {M F : Type*} [Mul M] [FunLike F M M] [MulHomClass F M M] (f : F) (n : ℕ) (x y : M) : f^[n] (x * y) = f^[n] x * f^[n] y := Function.Semiconj₂.iterate (map_mul f) n x y @[to_additive (attr := simp)] theorem iterate_map_one {M F : Type*} [One M] [FunLike F M M] [OneHomClass F M M] (f : F) (n : ℕ) : f^[n] 1 = 1 := iterate_fixed (map_one f) n @[to_additive (attr := simp)] theorem iterate_map_inv {M F : Type*} [Group M] [FunLike F M M] [MonoidHomClass F M M] (f : F) (n : ℕ) (x : M) : f^[n] x⁻¹ = (f^[n] x)⁻¹ := Commute.iterate_left (map_inv f) n x @[to_additive (attr := simp)] theorem iterate_map_div {M F : Type*} [Group M] [FunLike F M M] [MonoidHomClass F M M] (f : F) (n : ℕ) (x y : M) : f^[n] (x / y) = f^[n] x / f^[n] y := Semiconj₂.iterate (map_div f) n x y @[to_additive (attr := simp)] theorem iterate_map_pow {M F : Type*} [Monoid M] [FunLike F M M] [MonoidHomClass F M M] (f : F) (n : ℕ) (x : M) (k : ℕ) : f^[n] (x ^ k) = f^[n] x ^ k := Commute.iterate_left (map_pow f · k) n x @[to_additive (attr := simp)] theorem iterate_map_zpow {M F : Type*} [Group M] [FunLike F M M] [MonoidHomClass F M M] (f : F) (n : ℕ) (x : M) (k : ℤ) : f^[n] (x ^ k) = f^[n] x ^ k := Commute.iterate_left (map_zpow f · k) n x --what should be the namespace for this section? section Monoid variable [Monoid G] (a : G) (n : ℕ) @[to_additive (attr := simp)] theorem smul_iterate [MulAction G H] : (a • · : H → H)^[n] = (a ^ n • ·) := funext fun b => Nat.recOn n (by rw [iterate_zero, id, pow_zero, one_smul]) fun n ih => by rw [iterate_succ', comp_apply, ih, pow_succ', mul_smul] #align smul_iterate smul_iterate #align vadd_iterate vadd_iterate @[to_additive] lemma smul_iterate_apply [MulAction G H] {b : H} : (a • ·)^[n] b = a ^ n • b := by rw [smul_iterate] @[to_additive (attr := simp)] theorem mul_left_iterate : (a * ·)^[n] = (a ^ n * ·) := smul_iterate a n #align mul_left_iterate mul_left_iterate #align add_left_iterate add_left_iterate @[to_additive (attr := simp)] theorem mul_right_iterate : (· * a)^[n] = (· * a ^ n) := smul_iterate (MulOpposite.op a) n #align mul_right_iterate mul_right_iterate #align add_right_iterate add_right_iterate @[to_additive]
Mathlib/Algebra/GroupPower/IterateHom.lean
111
111
theorem mul_right_iterate_apply_one : (· * a)^[n] 1 = a ^ n := by
simp [mul_right_iterate]
1
2.718282
0
0
1
119
import Mathlib.Data.Finset.Card #align_import data.finset.option from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0" variable {α β : Type*} open Function namespace Option def toFinset (o : Option α) : Finset α := o.elim ∅ singleton #align option.to_finset Option.toFinset @[simp] theorem toFinset_none : none.toFinset = (∅ : Finset α) := rfl #align option.to_finset_none Option.toFinset_none @[simp] theorem toFinset_some {a : α} : (some a).toFinset = {a} := rfl #align option.to_finset_some Option.toFinset_some @[simp]
Mathlib/Data/Finset/Option.lean
51
52
theorem mem_toFinset {a : α} {o : Option α} : a ∈ o.toFinset ↔ a ∈ o := by
cases o <;> simp [eq_comm]
1
2.718282
0
0
5
120
import Mathlib.Data.Finset.Card #align_import data.finset.option from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0" variable {α β : Type*} open Function namespace Option def toFinset (o : Option α) : Finset α := o.elim ∅ singleton #align option.to_finset Option.toFinset @[simp] theorem toFinset_none : none.toFinset = (∅ : Finset α) := rfl #align option.to_finset_none Option.toFinset_none @[simp] theorem toFinset_some {a : α} : (some a).toFinset = {a} := rfl #align option.to_finset_some Option.toFinset_some @[simp] theorem mem_toFinset {a : α} {o : Option α} : a ∈ o.toFinset ↔ a ∈ o := by cases o <;> simp [eq_comm] #align option.mem_to_finset Option.mem_toFinset
Mathlib/Data/Finset/Option.lean
55
55
theorem card_toFinset (o : Option α) : o.toFinset.card = o.elim 0 1 := by
cases o <;> rfl
1
2.718282
0
0
5
120
import Mathlib.Data.Finset.Card #align_import data.finset.option from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0" variable {α β : Type*} open Function namespace Finset def insertNone : Finset α ↪o Finset (Option α) := (OrderEmbedding.ofMapLEIff fun s => cons none (s.map Embedding.some) <| by simp) fun s t => by rw [le_iff_subset, cons_subset_cons, map_subset_map, le_iff_subset] #align finset.insert_none Finset.insertNone @[simp] theorem mem_insertNone {s : Finset α} : ∀ {o : Option α}, o ∈ insertNone s ↔ ∀ a ∈ o, a ∈ s | none => iff_of_true (Multiset.mem_cons_self _ _) fun a h => by cases h | some a => Multiset.mem_cons.trans <| by simp #align finset.mem_insert_none Finset.mem_insertNone lemma forall_mem_insertNone {s : Finset α} {p : Option α → Prop} : (∀ a ∈ insertNone s, p a) ↔ p none ∧ ∀ a ∈ s, p a := by simp [Option.forall]
Mathlib/Data/Finset/Option.lean
78
78
theorem some_mem_insertNone {s : Finset α} {a : α} : some a ∈ insertNone s ↔ a ∈ s := by
simp
1
2.718282
0
0
5
120
import Mathlib.Data.Finset.Card #align_import data.finset.option from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0" variable {α β : Type*} open Function namespace Finset def insertNone : Finset α ↪o Finset (Option α) := (OrderEmbedding.ofMapLEIff fun s => cons none (s.map Embedding.some) <| by simp) fun s t => by rw [le_iff_subset, cons_subset_cons, map_subset_map, le_iff_subset] #align finset.insert_none Finset.insertNone @[simp] theorem mem_insertNone {s : Finset α} : ∀ {o : Option α}, o ∈ insertNone s ↔ ∀ a ∈ o, a ∈ s | none => iff_of_true (Multiset.mem_cons_self _ _) fun a h => by cases h | some a => Multiset.mem_cons.trans <| by simp #align finset.mem_insert_none Finset.mem_insertNone lemma forall_mem_insertNone {s : Finset α} {p : Option α → Prop} : (∀ a ∈ insertNone s, p a) ↔ p none ∧ ∀ a ∈ s, p a := by simp [Option.forall] theorem some_mem_insertNone {s : Finset α} {a : α} : some a ∈ insertNone s ↔ a ∈ s := by simp #align finset.some_mem_insert_none Finset.some_mem_insertNone lemma none_mem_insertNone {s : Finset α} : none ∈ insertNone s := by simp @[aesop safe apply (rule_sets := [finsetNonempty])] lemma insertNone_nonempty {s : Finset α} : insertNone s |>.Nonempty := ⟨none, none_mem_insertNone⟩ @[simp]
Mathlib/Data/Finset/Option.lean
87
87
theorem card_insertNone (s : Finset α) : s.insertNone.card = s.card + 1 := by
simp [insertNone]
1
2.718282
0
0
5
120
import Mathlib.Data.Finset.Card #align_import data.finset.option from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0" variable {α β : Type*} open Function namespace Finset def insertNone : Finset α ↪o Finset (Option α) := (OrderEmbedding.ofMapLEIff fun s => cons none (s.map Embedding.some) <| by simp) fun s t => by rw [le_iff_subset, cons_subset_cons, map_subset_map, le_iff_subset] #align finset.insert_none Finset.insertNone @[simp] theorem mem_insertNone {s : Finset α} : ∀ {o : Option α}, o ∈ insertNone s ↔ ∀ a ∈ o, a ∈ s | none => iff_of_true (Multiset.mem_cons_self _ _) fun a h => by cases h | some a => Multiset.mem_cons.trans <| by simp #align finset.mem_insert_none Finset.mem_insertNone lemma forall_mem_insertNone {s : Finset α} {p : Option α → Prop} : (∀ a ∈ insertNone s, p a) ↔ p none ∧ ∀ a ∈ s, p a := by simp [Option.forall] theorem some_mem_insertNone {s : Finset α} {a : α} : some a ∈ insertNone s ↔ a ∈ s := by simp #align finset.some_mem_insert_none Finset.some_mem_insertNone lemma none_mem_insertNone {s : Finset α} : none ∈ insertNone s := by simp @[aesop safe apply (rule_sets := [finsetNonempty])] lemma insertNone_nonempty {s : Finset α} : insertNone s |>.Nonempty := ⟨none, none_mem_insertNone⟩ @[simp] theorem card_insertNone (s : Finset α) : s.insertNone.card = s.card + 1 := by simp [insertNone] #align finset.card_insert_none Finset.card_insertNone def eraseNone : Finset (Option α) →o Finset α := (Finset.mapEmbedding (Equiv.optionIsSomeEquiv α).toEmbedding).toOrderHom.comp ⟨Finset.subtype _, subtype_mono⟩ #align finset.erase_none Finset.eraseNone @[simp]
Mathlib/Data/Finset/Option.lean
98
99
theorem mem_eraseNone {s : Finset (Option α)} {x : α} : x ∈ eraseNone s ↔ some x ∈ s := by
simp [eraseNone]
1
2.718282
0
0
5
120
import Mathlib.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup import Mathlib.Tactic.AdaptationNote #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" open Complex UpperHalfPlane ModularGroup open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp]
Mathlib/NumberTheory/ModularForms/SlashActions.lean
67
70
theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by
rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul]
1
2.718282
0
0
1
121
import Mathlib.Control.EquivFunctor import Mathlib.CategoryTheory.Groupoid import Mathlib.CategoryTheory.Whiskering import Mathlib.CategoryTheory.Types #align_import category_theory.core from "leanprover-community/mathlib"@"369525b73f229ccd76a6ec0e0e0bf2be57599768" namespace CategoryTheory universe v₁ v₂ u₁ u₂ -- morphism levels before object levels. See note [CategoryTheory universes]. -- Porting note(#5171): linter not yet ported -- @[nolint has_nonempty_instance] def Core (C : Type u₁) := C #align category_theory.core CategoryTheory.Core variable {C : Type u₁} [Category.{v₁} C] instance coreCategory : Groupoid.{v₁} (Core C) where Hom (X Y : C) := X ≅ Y id (X : C) := Iso.refl X comp f g := Iso.trans f g inv {X Y} f := Iso.symm f #align category_theory.core_category CategoryTheory.coreCategory namespace Core @[simp]
Mathlib/CategoryTheory/Core.lean
52
53
theorem id_hom (X : C) : Iso.hom (coreCategory.id X) = @CategoryStruct.id C _ X := by
rfl
1
2.718282
0
0
1
122
import Mathlib.Order.Ideal #align_import order.pfilter from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da" open OrderDual namespace Order structure PFilter (P : Type*) [Preorder P] where dual : Ideal Pᵒᵈ #align order.pfilter Order.PFilter variable {P : Type*} def IsPFilter [Preorder P] (F : Set P) : Prop := IsIdeal (OrderDual.ofDual ⁻¹' F) #align order.is_pfilter Order.IsPFilter theorem IsPFilter.of_def [Preorder P] {F : Set P} (nonempty : F.Nonempty) (directed : DirectedOn (· ≥ ·) F) (mem_of_le : ∀ {x y : P}, x ≤ y → x ∈ F → y ∈ F) : IsPFilter F := ⟨fun _ _ _ _ => mem_of_le ‹_› ‹_›, nonempty, directed⟩ #align order.is_pfilter.of_def Order.IsPFilter.of_def def IsPFilter.toPFilter [Preorder P] {F : Set P} (h : IsPFilter F) : PFilter P := ⟨h.toIdeal⟩ #align order.is_pfilter.to_pfilter Order.IsPFilter.toPFilter namespace PFilter section Preorder variable [Preorder P] {x y : P} (F s t : PFilter P) instance [Inhabited P] : Inhabited (PFilter P) := ⟨⟨default⟩⟩ instance : SetLike (PFilter P) P where coe F := toDual ⁻¹' F.dual.carrier coe_injective' := fun ⟨_⟩ ⟨_⟩ h => congr_arg mk <| Ideal.ext h #align order.pfilter.mem_coe SetLike.mem_coeₓ theorem isPFilter : IsPFilter (F : Set P) := F.dual.isIdeal #align order.pfilter.is_pfilter Order.PFilter.isPFilter protected theorem nonempty : (F : Set P).Nonempty := F.dual.nonempty #align order.pfilter.nonempty Order.PFilter.nonempty theorem directed : DirectedOn (· ≥ ·) (F : Set P) := F.dual.directed #align order.pfilter.directed Order.PFilter.directed theorem mem_of_le {F : PFilter P} : x ≤ y → x ∈ F → y ∈ F := fun h => F.dual.lower h #align order.pfilter.mem_of_le Order.PFilter.mem_of_le @[ext] theorem ext (h : (s : Set P) = t) : s = t := SetLike.ext' h #align order.pfilter.ext Order.PFilter.ext @[trans] theorem mem_of_mem_of_le {F G : PFilter P} (hx : x ∈ F) (hle : F ≤ G) : x ∈ G := hle hx #align order.pfilter.mem_of_mem_of_le Order.PFilter.mem_of_mem_of_le def principal (p : P) : PFilter P := ⟨Ideal.principal (toDual p)⟩ #align order.pfilter.principal Order.PFilter.principal @[simp] theorem mem_mk (x : P) (I : Ideal Pᵒᵈ) : x ∈ (⟨I⟩ : PFilter P) ↔ toDual x ∈ I := Iff.rfl #align order.pfilter.mem_def Order.PFilter.mem_mk @[simp] theorem principal_le_iff {F : PFilter P} : principal x ≤ F ↔ x ∈ F := Ideal.principal_le_iff (x := toDual x) #align order.pfilter.principal_le_iff Order.PFilter.principal_le_iff @[simp] theorem mem_principal : x ∈ principal y ↔ y ≤ x := Iff.rfl #align order.pfilter.mem_principal Order.PFilter.mem_principal
Mathlib/Order/PFilter.lean
120
120
theorem principal_le_principal_iff {p q : P} : principal q ≤ principal p ↔ p ≤ q := by
simp
1
2.718282
0
0
1
123
import Mathlib.Tactic.Ring set_option autoImplicit true namespace Mathlib.Tactic.LinearCombination open Lean hiding Rat open Elab Meta Term theorem pf_add_c [Add α] (p : a = b) (c : α) : a + c = b + c := p ▸ rfl theorem c_add_pf [Add α] (p : b = c) (a : α) : a + b = a + c := p ▸ rfl theorem add_pf [Add α] (p₁ : (a₁:α) = b₁) (p₂ : a₂ = b₂) : a₁ + a₂ = b₁ + b₂ := p₁ ▸ p₂ ▸ rfl theorem pf_sub_c [Sub α] (p : a = b) (c : α) : a - c = b - c := p ▸ rfl theorem c_sub_pf [Sub α] (p : b = c) (a : α) : a - b = a - c := p ▸ rfl theorem sub_pf [Sub α] (p₁ : (a₁:α) = b₁) (p₂ : a₂ = b₂) : a₁ - a₂ = b₁ - b₂ := p₁ ▸ p₂ ▸ rfl theorem neg_pf [Neg α] (p : (a:α) = b) : -a = -b := p ▸ rfl theorem pf_mul_c [Mul α] (p : a = b) (c : α) : a * c = b * c := p ▸ rfl theorem c_mul_pf [Mul α] (p : b = c) (a : α) : a * b = a * c := p ▸ rfl theorem mul_pf [Mul α] (p₁ : (a₁:α) = b₁) (p₂ : a₂ = b₂) : a₁ * a₂ = b₁ * b₂ := p₁ ▸ p₂ ▸ rfl theorem inv_pf [Inv α] (p : (a:α) = b) : a⁻¹ = b⁻¹ := p ▸ rfl theorem pf_div_c [Div α] (p : a = b) (c : α) : a / c = b / c := p ▸ rfl theorem c_div_pf [Div α] (p : b = c) (a : α) : a / b = a / c := p ▸ rfl theorem div_pf [Div α] (p₁ : (a₁:α) = b₁) (p₂ : a₂ = b₂) : a₁ / a₂ = b₁ / b₂ := p₁ ▸ p₂ ▸ rfl partial def expandLinearCombo (stx : Syntax.Term) : TermElabM (Option Syntax.Term) := do let mut result ← match stx with | `(($e)) => expandLinearCombo e | `($e₁ + $e₂) => do match ← expandLinearCombo e₁, ← expandLinearCombo e₂ with | none, none => pure none | some p₁, none => ``(pf_add_c $p₁ $e₂) | none, some p₂ => ``(c_add_pf $p₂ $e₁) | some p₁, some p₂ => ``(add_pf $p₁ $p₂) | `($e₁ - $e₂) => do match ← expandLinearCombo e₁, ← expandLinearCombo e₂ with | none, none => pure none | some p₁, none => ``(pf_sub_c $p₁ $e₂) | none, some p₂ => ``(c_sub_pf $p₂ $e₁) | some p₁, some p₂ => ``(sub_pf $p₁ $p₂) | `(-$e) => do match ← expandLinearCombo e with | none => pure none | some p => ``(neg_pf $p) | `(← $e) => do match ← expandLinearCombo e with | none => pure none | some p => ``(Eq.symm $p) | `($e₁ * $e₂) => do match ← expandLinearCombo e₁, ← expandLinearCombo e₂ with | none, none => pure none | some p₁, none => ``(pf_mul_c $p₁ $e₂) | none, some p₂ => ``(c_mul_pf $p₂ $e₁) | some p₁, some p₂ => ``(mul_pf $p₁ $p₂) | `($e⁻¹) => do match ← expandLinearCombo e with | none => pure none | some p => ``(inv_pf $p) | `($e₁ / $e₂) => do match ← expandLinearCombo e₁, ← expandLinearCombo e₂ with | none, none => pure none | some p₁, none => ``(pf_div_c $p₁ $e₂) | none, some p₂ => ``(c_div_pf $p₂ $e₁) | some p₁, some p₂ => ``(div_pf $p₁ $p₂) | e => do let e ← elabTerm e none let eType ← inferType e let .true := (← withReducible do whnf eType).isEq | pure none some <$> e.toSyntax return result.map fun r => ⟨r.raw.setInfo (SourceInfo.fromRef stx true)⟩ theorem eq_trans₃ (p : (a:α) = b) (p₁ : a = a') (p₂ : b = b') : a' = b' := p₁ ▸ p₂ ▸ p
Mathlib/Tactic/LinearCombination.lean
111
112
theorem eq_of_add [AddGroup α] (p : (a:α) = b) (H : (a' - b') - (a - b) = 0) : a' = b' := by
rw [← sub_eq_zero] at p ⊢; rwa [sub_eq_zero, p] at H
1
2.718282
0
0
2
124
import Mathlib.Tactic.Ring set_option autoImplicit true namespace Mathlib.Tactic.LinearCombination open Lean hiding Rat open Elab Meta Term theorem pf_add_c [Add α] (p : a = b) (c : α) : a + c = b + c := p ▸ rfl theorem c_add_pf [Add α] (p : b = c) (a : α) : a + b = a + c := p ▸ rfl theorem add_pf [Add α] (p₁ : (a₁:α) = b₁) (p₂ : a₂ = b₂) : a₁ + a₂ = b₁ + b₂ := p₁ ▸ p₂ ▸ rfl theorem pf_sub_c [Sub α] (p : a = b) (c : α) : a - c = b - c := p ▸ rfl theorem c_sub_pf [Sub α] (p : b = c) (a : α) : a - b = a - c := p ▸ rfl theorem sub_pf [Sub α] (p₁ : (a₁:α) = b₁) (p₂ : a₂ = b₂) : a₁ - a₂ = b₁ - b₂ := p₁ ▸ p₂ ▸ rfl theorem neg_pf [Neg α] (p : (a:α) = b) : -a = -b := p ▸ rfl theorem pf_mul_c [Mul α] (p : a = b) (c : α) : a * c = b * c := p ▸ rfl theorem c_mul_pf [Mul α] (p : b = c) (a : α) : a * b = a * c := p ▸ rfl theorem mul_pf [Mul α] (p₁ : (a₁:α) = b₁) (p₂ : a₂ = b₂) : a₁ * a₂ = b₁ * b₂ := p₁ ▸ p₂ ▸ rfl theorem inv_pf [Inv α] (p : (a:α) = b) : a⁻¹ = b⁻¹ := p ▸ rfl theorem pf_div_c [Div α] (p : a = b) (c : α) : a / c = b / c := p ▸ rfl theorem c_div_pf [Div α] (p : b = c) (a : α) : a / b = a / c := p ▸ rfl theorem div_pf [Div α] (p₁ : (a₁:α) = b₁) (p₂ : a₂ = b₂) : a₁ / a₂ = b₁ / b₂ := p₁ ▸ p₂ ▸ rfl partial def expandLinearCombo (stx : Syntax.Term) : TermElabM (Option Syntax.Term) := do let mut result ← match stx with | `(($e)) => expandLinearCombo e | `($e₁ + $e₂) => do match ← expandLinearCombo e₁, ← expandLinearCombo e₂ with | none, none => pure none | some p₁, none => ``(pf_add_c $p₁ $e₂) | none, some p₂ => ``(c_add_pf $p₂ $e₁) | some p₁, some p₂ => ``(add_pf $p₁ $p₂) | `($e₁ - $e₂) => do match ← expandLinearCombo e₁, ← expandLinearCombo e₂ with | none, none => pure none | some p₁, none => ``(pf_sub_c $p₁ $e₂) | none, some p₂ => ``(c_sub_pf $p₂ $e₁) | some p₁, some p₂ => ``(sub_pf $p₁ $p₂) | `(-$e) => do match ← expandLinearCombo e with | none => pure none | some p => ``(neg_pf $p) | `(← $e) => do match ← expandLinearCombo e with | none => pure none | some p => ``(Eq.symm $p) | `($e₁ * $e₂) => do match ← expandLinearCombo e₁, ← expandLinearCombo e₂ with | none, none => pure none | some p₁, none => ``(pf_mul_c $p₁ $e₂) | none, some p₂ => ``(c_mul_pf $p₂ $e₁) | some p₁, some p₂ => ``(mul_pf $p₁ $p₂) | `($e⁻¹) => do match ← expandLinearCombo e with | none => pure none | some p => ``(inv_pf $p) | `($e₁ / $e₂) => do match ← expandLinearCombo e₁, ← expandLinearCombo e₂ with | none, none => pure none | some p₁, none => ``(pf_div_c $p₁ $e₂) | none, some p₂ => ``(c_div_pf $p₂ $e₁) | some p₁, some p₂ => ``(div_pf $p₁ $p₂) | e => do let e ← elabTerm e none let eType ← inferType e let .true := (← withReducible do whnf eType).isEq | pure none some <$> e.toSyntax return result.map fun r => ⟨r.raw.setInfo (SourceInfo.fromRef stx true)⟩ theorem eq_trans₃ (p : (a:α) = b) (p₁ : a = a') (p₂ : b = b') : a' = b' := p₁ ▸ p₂ ▸ p theorem eq_of_add [AddGroup α] (p : (a:α) = b) (H : (a' - b') - (a - b) = 0) : a' = b' := by rw [← sub_eq_zero] at p ⊢; rwa [sub_eq_zero, p] at H
Mathlib/Tactic/LinearCombination.lean
114
116
theorem eq_of_add_pow [Ring α] [NoZeroDivisors α] (n : ℕ) (p : (a:α) = b) (H : (a' - b')^n - (a - b) = 0) : a' = b' := by
rw [← sub_eq_zero] at p ⊢; apply pow_eq_zero (n := n); rwa [sub_eq_zero, p] at H
1
2.718282
0
0
2
124
import Mathlib.Data.Nat.Bits import Mathlib.Data.Nat.Pairing #align_import logic.equiv.nat from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open Nat Function namespace Equiv variable {α : Type*} @[simps] def boolProdNatEquivNat : Bool × ℕ ≃ ℕ where toFun := uncurry bit invFun := boddDiv2 left_inv := fun ⟨b, n⟩ => by simp only [bodd_bit, div2_bit, uncurry_apply_pair, boddDiv2_eq] right_inv n := by simp only [bit_decomp, boddDiv2_eq, uncurry_apply_pair] #align equiv.bool_prod_nat_equiv_nat Equiv.boolProdNatEquivNat #align equiv.bool_prod_nat_equiv_nat_symm_apply Equiv.boolProdNatEquivNat_symm_apply #align equiv.bool_prod_nat_equiv_nat_apply Equiv.boolProdNatEquivNat_apply @[simps! symm_apply] def natSumNatEquivNat : ℕ ⊕ ℕ ≃ ℕ := (boolProdEquivSum ℕ).symm.trans boolProdNatEquivNat #align equiv.nat_sum_nat_equiv_nat Equiv.natSumNatEquivNat #align equiv.nat_sum_nat_equiv_nat_symm_apply Equiv.natSumNatEquivNat_symm_apply set_option linter.deprecated false in @[simp]
Mathlib/Logic/Equiv/Nat.lean
48
49
theorem natSumNatEquivNat_apply : ⇑natSumNatEquivNat = Sum.elim bit0 bit1 := by
ext (x | x) <;> rfl
1
2.718282
0
0
1
125
import Mathlib.Order.Filter.Basic import Mathlib.Algebra.Module.Pi #align_import order.filter.germ from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58" namespace Filter variable {α β γ δ : Type*} {l : Filter α} {f g h : α → β} theorem const_eventuallyEq' [NeBot l] {a b : β} : (∀ᶠ _ in l, a = b) ↔ a = b := eventually_const #align filter.const_eventually_eq' Filter.const_eventuallyEq' theorem const_eventuallyEq [NeBot l] {a b : β} : ((fun _ => a) =ᶠ[l] fun _ => b) ↔ a = b := @const_eventuallyEq' _ _ _ _ a b #align filter.const_eventually_eq Filter.const_eventuallyEq def germSetoid (l : Filter α) (β : Type*) : Setoid (α → β) where r := EventuallyEq l iseqv := ⟨EventuallyEq.refl _, EventuallyEq.symm, EventuallyEq.trans⟩ #align filter.germ_setoid Filter.germSetoid def Germ (l : Filter α) (β : Type*) : Type _ := Quotient (germSetoid l β) #align filter.germ Filter.Germ def productSetoid (l : Filter α) (ε : α → Type*) : Setoid ((a : _) → ε a) where r f g := ∀ᶠ a in l, f a = g a iseqv := ⟨fun _ => eventually_of_forall fun _ => rfl, fun h => h.mono fun _ => Eq.symm, fun h1 h2 => h1.congr (h2.mono fun _ hx => hx ▸ Iff.rfl)⟩ #align filter.product_setoid Filter.productSetoid -- Porting note: removed @[protected] def Product (l : Filter α) (ε : α → Type*) : Type _ := Quotient (productSetoid l ε) #align filter.product Filter.Product namespace Germ -- Porting note: added @[coe] def ofFun : (α → β) → (Germ l β) := @Quotient.mk' _ (germSetoid _ _) instance : CoeTC (α → β) (Germ l β) := ⟨ofFun⟩ @[coe] -- Porting note: removed `HasLiftT` instance def const {l : Filter α} (b : β) : (Germ l β) := ofFun fun _ => b instance coeTC : CoeTC β (Germ l β) := ⟨const⟩ def IsConstant {l : Filter α} (P : Germ l β) : Prop := P.liftOn (fun f ↦ ∃ b : β, f =ᶠ[l] (fun _ ↦ b)) <| by suffices ∀ f g : α → β, ∀ b : β, f =ᶠ[l] g → (f =ᶠ[l] fun _ ↦ b) → (g =ᶠ[l] fun _ ↦ b) from fun f g h ↦ propext ⟨fun ⟨b, hb⟩ ↦ ⟨b, this f g b h hb⟩, fun ⟨b, hb⟩ ↦ ⟨b, h.trans hb⟩⟩ exact fun f g b hfg hf ↦ (hfg.symm).trans hf theorem isConstant_coe {l : Filter α} {b} (h : ∀ x', f x' = b) : (↑f : Germ l β).IsConstant := ⟨b, eventually_of_forall (fun x ↦ h x)⟩ @[simp]
Mathlib/Order/Filter/Germ.lean
132
133
theorem isConstant_coe_const {l : Filter α} {b : β} : (fun _ : α ↦ b : Germ l β).IsConstant := by
use b
1
2.718282
0
0
1
126
import Mathlib.Algebra.Order.Kleene import Mathlib.Algebra.Ring.Hom.Defs import Mathlib.Data.List.Join import Mathlib.Data.Set.Lattice import Mathlib.Tactic.DeriveFintype #align_import computability.language from "leanprover-community/mathlib"@"a239cd3e7ac2c7cde36c913808f9d40c411344f6" open List Set Computability universe v variable {α β γ : Type*} def Language (α) := Set (List α) #align language Language instance : Membership (List α) (Language α) := ⟨Set.Mem⟩ instance : Singleton (List α) (Language α) := ⟨Set.singleton⟩ instance : Insert (List α) (Language α) := ⟨Set.insert⟩ instance : CompleteAtomicBooleanAlgebra (Language α) := Set.completeAtomicBooleanAlgebra namespace Language variable {l m : Language α} {a b x : List α} -- Porting note: `reducible` attribute cannot be local. -- attribute [local reducible] Language instance : Zero (Language α) := ⟨(∅ : Set _)⟩ instance : One (Language α) := ⟨{[]}⟩ instance : Inhabited (Language α) := ⟨(∅ : Set _)⟩ instance : Add (Language α) := ⟨((· ∪ ·) : Set (List α) → Set (List α) → Set (List α))⟩ instance : Mul (Language α) := ⟨image2 (· ++ ·)⟩ theorem zero_def : (0 : Language α) = (∅ : Set _) := rfl #align language.zero_def Language.zero_def theorem one_def : (1 : Language α) = ({[]} : Set (List α)) := rfl #align language.one_def Language.one_def theorem add_def (l m : Language α) : l + m = (l ∪ m : Set (List α)) := rfl #align language.add_def Language.add_def theorem mul_def (l m : Language α) : l * m = image2 (· ++ ·) l m := rfl #align language.mul_def Language.mul_def instance : KStar (Language α) := ⟨fun l ↦ {x | ∃ L : List (List α), x = L.join ∧ ∀ y ∈ L, y ∈ l}⟩ lemma kstar_def (l : Language α) : l∗ = {x | ∃ L : List (List α), x = L.join ∧ ∀ y ∈ L, y ∈ l} := rfl #align language.kstar_def Language.kstar_def -- Porting note: `reducible` attribute cannot be local, -- so this new theorem is required in place of `Set.ext`. @[ext] theorem ext {l m : Language α} (h : ∀ (x : List α), x ∈ l ↔ x ∈ m) : l = m := Set.ext h @[simp] theorem not_mem_zero (x : List α) : x ∉ (0 : Language α) := id #align language.not_mem_zero Language.not_mem_zero @[simp]
Mathlib/Computability/Language.lean
104
104
theorem mem_one (x : List α) : x ∈ (1 : Language α) ↔ x = [] := by
rfl
1
2.718282
0
0
3
127
import Mathlib.Algebra.Order.Kleene import Mathlib.Algebra.Ring.Hom.Defs import Mathlib.Data.List.Join import Mathlib.Data.Set.Lattice import Mathlib.Tactic.DeriveFintype #align_import computability.language from "leanprover-community/mathlib"@"a239cd3e7ac2c7cde36c913808f9d40c411344f6" open List Set Computability universe v variable {α β γ : Type*} def Language (α) := Set (List α) #align language Language instance : Membership (List α) (Language α) := ⟨Set.Mem⟩ instance : Singleton (List α) (Language α) := ⟨Set.singleton⟩ instance : Insert (List α) (Language α) := ⟨Set.insert⟩ instance : CompleteAtomicBooleanAlgebra (Language α) := Set.completeAtomicBooleanAlgebra namespace Language variable {l m : Language α} {a b x : List α} -- Porting note: `reducible` attribute cannot be local. -- attribute [local reducible] Language instance : Zero (Language α) := ⟨(∅ : Set _)⟩ instance : One (Language α) := ⟨{[]}⟩ instance : Inhabited (Language α) := ⟨(∅ : Set _)⟩ instance : Add (Language α) := ⟨((· ∪ ·) : Set (List α) → Set (List α) → Set (List α))⟩ instance : Mul (Language α) := ⟨image2 (· ++ ·)⟩ theorem zero_def : (0 : Language α) = (∅ : Set _) := rfl #align language.zero_def Language.zero_def theorem one_def : (1 : Language α) = ({[]} : Set (List α)) := rfl #align language.one_def Language.one_def theorem add_def (l m : Language α) : l + m = (l ∪ m : Set (List α)) := rfl #align language.add_def Language.add_def theorem mul_def (l m : Language α) : l * m = image2 (· ++ ·) l m := rfl #align language.mul_def Language.mul_def instance : KStar (Language α) := ⟨fun l ↦ {x | ∃ L : List (List α), x = L.join ∧ ∀ y ∈ L, y ∈ l}⟩ lemma kstar_def (l : Language α) : l∗ = {x | ∃ L : List (List α), x = L.join ∧ ∀ y ∈ L, y ∈ l} := rfl #align language.kstar_def Language.kstar_def -- Porting note: `reducible` attribute cannot be local, -- so this new theorem is required in place of `Set.ext`. @[ext] theorem ext {l m : Language α} (h : ∀ (x : List α), x ∈ l ↔ x ∈ m) : l = m := Set.ext h @[simp] theorem not_mem_zero (x : List α) : x ∉ (0 : Language α) := id #align language.not_mem_zero Language.not_mem_zero @[simp] theorem mem_one (x : List α) : x ∈ (1 : Language α) ↔ x = [] := by rfl #align language.mem_one Language.mem_one theorem nil_mem_one : [] ∈ (1 : Language α) := Set.mem_singleton _ #align language.nil_mem_one Language.nil_mem_one theorem mem_add (l m : Language α) (x : List α) : x ∈ l + m ↔ x ∈ l ∨ x ∈ m := Iff.rfl #align language.mem_add Language.mem_add theorem mem_mul : x ∈ l * m ↔ ∃ a ∈ l, ∃ b ∈ m, a ++ b = x := mem_image2 #align language.mem_mul Language.mem_mul theorem append_mem_mul : a ∈ l → b ∈ m → a ++ b ∈ l * m := mem_image2_of_mem #align language.append_mem_mul Language.append_mem_mul theorem mem_kstar : x ∈ l∗ ↔ ∃ L : List (List α), x = L.join ∧ ∀ y ∈ L, y ∈ l := Iff.rfl #align language.mem_kstar Language.mem_kstar theorem join_mem_kstar {L : List (List α)} (h : ∀ y ∈ L, y ∈ l) : L.join ∈ l∗ := ⟨L, rfl, h⟩ #align language.join_mem_kstar Language.join_mem_kstar theorem nil_mem_kstar (l : Language α) : [] ∈ l∗ := ⟨[], rfl, fun _ h ↦ by contradiction⟩ #align language.nil_mem_kstar Language.nil_mem_kstar instance instSemiring : Semiring (Language α) where add := (· + ·) add_assoc := union_assoc zero := 0 zero_add := empty_union add_zero := union_empty add_comm := union_comm mul := (· * ·) mul_assoc _ _ _ := image2_assoc append_assoc zero_mul _ := image2_empty_left mul_zero _ := image2_empty_right one := 1 one_mul l := by simp [mul_def, one_def] mul_one l := by simp [mul_def, one_def] natCast n := if n = 0 then 0 else 1 natCast_zero := rfl natCast_succ n := by cases n <;> simp [Nat.cast, add_def, zero_def] left_distrib _ _ _ := image2_union_right right_distrib _ _ _ := image2_union_left nsmul := nsmulRec @[simp] theorem add_self (l : Language α) : l + l = l := sup_idem _ #align language.add_self Language.add_self def map (f : α → β) : Language α →+* Language β where toFun := image (List.map f) map_zero' := image_empty _ map_one' := image_singleton map_add' := image_union _ map_mul' _ _ := image_image2_distrib <| map_append _ #align language.map Language.map @[simp]
Mathlib/Computability/Language.lean
171
171
theorem map_id (l : Language α) : map id l = l := by
simp [map]
1
2.718282
0
0
3
127
import Mathlib.Algebra.Order.Kleene import Mathlib.Algebra.Ring.Hom.Defs import Mathlib.Data.List.Join import Mathlib.Data.Set.Lattice import Mathlib.Tactic.DeriveFintype #align_import computability.language from "leanprover-community/mathlib"@"a239cd3e7ac2c7cde36c913808f9d40c411344f6" open List Set Computability universe v variable {α β γ : Type*} def Language (α) := Set (List α) #align language Language instance : Membership (List α) (Language α) := ⟨Set.Mem⟩ instance : Singleton (List α) (Language α) := ⟨Set.singleton⟩ instance : Insert (List α) (Language α) := ⟨Set.insert⟩ instance : CompleteAtomicBooleanAlgebra (Language α) := Set.completeAtomicBooleanAlgebra namespace Language variable {l m : Language α} {a b x : List α} -- Porting note: `reducible` attribute cannot be local. -- attribute [local reducible] Language instance : Zero (Language α) := ⟨(∅ : Set _)⟩ instance : One (Language α) := ⟨{[]}⟩ instance : Inhabited (Language α) := ⟨(∅ : Set _)⟩ instance : Add (Language α) := ⟨((· ∪ ·) : Set (List α) → Set (List α) → Set (List α))⟩ instance : Mul (Language α) := ⟨image2 (· ++ ·)⟩ theorem zero_def : (0 : Language α) = (∅ : Set _) := rfl #align language.zero_def Language.zero_def theorem one_def : (1 : Language α) = ({[]} : Set (List α)) := rfl #align language.one_def Language.one_def theorem add_def (l m : Language α) : l + m = (l ∪ m : Set (List α)) := rfl #align language.add_def Language.add_def theorem mul_def (l m : Language α) : l * m = image2 (· ++ ·) l m := rfl #align language.mul_def Language.mul_def instance : KStar (Language α) := ⟨fun l ↦ {x | ∃ L : List (List α), x = L.join ∧ ∀ y ∈ L, y ∈ l}⟩ lemma kstar_def (l : Language α) : l∗ = {x | ∃ L : List (List α), x = L.join ∧ ∀ y ∈ L, y ∈ l} := rfl #align language.kstar_def Language.kstar_def -- Porting note: `reducible` attribute cannot be local, -- so this new theorem is required in place of `Set.ext`. @[ext] theorem ext {l m : Language α} (h : ∀ (x : List α), x ∈ l ↔ x ∈ m) : l = m := Set.ext h @[simp] theorem not_mem_zero (x : List α) : x ∉ (0 : Language α) := id #align language.not_mem_zero Language.not_mem_zero @[simp] theorem mem_one (x : List α) : x ∈ (1 : Language α) ↔ x = [] := by rfl #align language.mem_one Language.mem_one theorem nil_mem_one : [] ∈ (1 : Language α) := Set.mem_singleton _ #align language.nil_mem_one Language.nil_mem_one theorem mem_add (l m : Language α) (x : List α) : x ∈ l + m ↔ x ∈ l ∨ x ∈ m := Iff.rfl #align language.mem_add Language.mem_add theorem mem_mul : x ∈ l * m ↔ ∃ a ∈ l, ∃ b ∈ m, a ++ b = x := mem_image2 #align language.mem_mul Language.mem_mul theorem append_mem_mul : a ∈ l → b ∈ m → a ++ b ∈ l * m := mem_image2_of_mem #align language.append_mem_mul Language.append_mem_mul theorem mem_kstar : x ∈ l∗ ↔ ∃ L : List (List α), x = L.join ∧ ∀ y ∈ L, y ∈ l := Iff.rfl #align language.mem_kstar Language.mem_kstar theorem join_mem_kstar {L : List (List α)} (h : ∀ y ∈ L, y ∈ l) : L.join ∈ l∗ := ⟨L, rfl, h⟩ #align language.join_mem_kstar Language.join_mem_kstar theorem nil_mem_kstar (l : Language α) : [] ∈ l∗ := ⟨[], rfl, fun _ h ↦ by contradiction⟩ #align language.nil_mem_kstar Language.nil_mem_kstar instance instSemiring : Semiring (Language α) where add := (· + ·) add_assoc := union_assoc zero := 0 zero_add := empty_union add_zero := union_empty add_comm := union_comm mul := (· * ·) mul_assoc _ _ _ := image2_assoc append_assoc zero_mul _ := image2_empty_left mul_zero _ := image2_empty_right one := 1 one_mul l := by simp [mul_def, one_def] mul_one l := by simp [mul_def, one_def] natCast n := if n = 0 then 0 else 1 natCast_zero := rfl natCast_succ n := by cases n <;> simp [Nat.cast, add_def, zero_def] left_distrib _ _ _ := image2_union_right right_distrib _ _ _ := image2_union_left nsmul := nsmulRec @[simp] theorem add_self (l : Language α) : l + l = l := sup_idem _ #align language.add_self Language.add_self def map (f : α → β) : Language α →+* Language β where toFun := image (List.map f) map_zero' := image_empty _ map_one' := image_singleton map_add' := image_union _ map_mul' _ _ := image_image2_distrib <| map_append _ #align language.map Language.map @[simp] theorem map_id (l : Language α) : map id l = l := by simp [map] #align language.map_id Language.map_id @[simp]
Mathlib/Computability/Language.lean
175
176
theorem map_map (g : β → γ) (f : α → β) (l : Language α) : map g (map f l) = map (g ∘ f) l := by
simp [map, image_image]
1
2.718282
0
0
3
127
import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Order.Hom.CompleteLattice namespace Submodule variable (S : Type*) {R M : Type*} [Semiring R] [AddCommMonoid M] [Semiring S] [Module S M] [Module R M] [SMul S R] [IsScalarTower S R M] def restrictScalars (V : Submodule R M) : Submodule S M where carrier := V zero_mem' := V.zero_mem smul_mem' c _ h := V.smul_of_tower_mem c h add_mem' hx hy := V.add_mem hx hy #align submodule.restrict_scalars Submodule.restrictScalars @[simp] theorem coe_restrictScalars (V : Submodule R M) : (V.restrictScalars S : Set M) = V := rfl #align submodule.coe_restrict_scalars Submodule.coe_restrictScalars @[simp] theorem toAddSubmonoid_restrictScalars (V : Submodule R M) : (V.restrictScalars S).toAddSubmonoid = V.toAddSubmonoid := rfl @[simp] theorem restrictScalars_mem (V : Submodule R M) (m : M) : m ∈ V.restrictScalars S ↔ m ∈ V := Iff.refl _ #align submodule.restrict_scalars_mem Submodule.restrictScalars_mem @[simp] theorem restrictScalars_self (V : Submodule R M) : V.restrictScalars R = V := SetLike.coe_injective rfl #align submodule.restrict_scalars_self Submodule.restrictScalars_self variable (R M) theorem restrictScalars_injective : Function.Injective (restrictScalars S : Submodule R M → Submodule S M) := fun _ _ h => ext <| Set.ext_iff.1 (SetLike.ext'_iff.1 h : _) #align submodule.restrict_scalars_injective Submodule.restrictScalars_injective @[simp] theorem restrictScalars_inj {V₁ V₂ : Submodule R M} : restrictScalars S V₁ = restrictScalars S V₂ ↔ V₁ = V₂ := (restrictScalars_injective S _ _).eq_iff #align submodule.restrict_scalars_inj Submodule.restrictScalars_inj instance restrictScalars.origModule (p : Submodule R M) : Module R (p.restrictScalars S) := (by infer_instance : Module R p) #align submodule.restrict_scalars.orig_module Submodule.restrictScalars.origModule instance restrictScalars.isScalarTower (p : Submodule R M) : IsScalarTower S R (p.restrictScalars S) where smul_assoc r s x := Subtype.ext <| smul_assoc r s (x : M) #align submodule.restrict_scalars.is_scalar_tower Submodule.restrictScalars.isScalarTower @[simps] def restrictScalarsEmbedding : Submodule R M ↪o Submodule S M where toFun := restrictScalars S inj' := restrictScalars_injective S R M map_rel_iff' := by simp [SetLike.le_def] #align submodule.restrict_scalars_embedding Submodule.restrictScalarsEmbedding #align submodule.restrict_scalars_embedding_apply Submodule.restrictScalarsEmbedding_apply @[simps (config := { simpRhs := true })] def restrictScalarsEquiv (p : Submodule R M) : p.restrictScalars S ≃ₗ[R] p := { AddEquiv.refl p with map_smul' := fun _ _ => rfl } #align submodule.restrict_scalars_equiv Submodule.restrictScalarsEquiv #align submodule.restrict_scalars_equiv_symm_apply Submodule.restrictScalarsEquiv_symm_apply @[simp] theorem restrictScalars_bot : restrictScalars S (⊥ : Submodule R M) = ⊥ := rfl #align submodule.restrict_scalars_bot Submodule.restrictScalars_bot @[simp]
Mathlib/Algebra/Module/Submodule/RestrictScalars.lean
106
107
theorem restrictScalars_eq_bot_iff {p : Submodule R M} : restrictScalars S p = ⊥ ↔ p = ⊥ := by
simp [SetLike.ext_iff]
1
2.718282
0
0
2
128
import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Order.Hom.CompleteLattice namespace Submodule variable (S : Type*) {R M : Type*} [Semiring R] [AddCommMonoid M] [Semiring S] [Module S M] [Module R M] [SMul S R] [IsScalarTower S R M] def restrictScalars (V : Submodule R M) : Submodule S M where carrier := V zero_mem' := V.zero_mem smul_mem' c _ h := V.smul_of_tower_mem c h add_mem' hx hy := V.add_mem hx hy #align submodule.restrict_scalars Submodule.restrictScalars @[simp] theorem coe_restrictScalars (V : Submodule R M) : (V.restrictScalars S : Set M) = V := rfl #align submodule.coe_restrict_scalars Submodule.coe_restrictScalars @[simp] theorem toAddSubmonoid_restrictScalars (V : Submodule R M) : (V.restrictScalars S).toAddSubmonoid = V.toAddSubmonoid := rfl @[simp] theorem restrictScalars_mem (V : Submodule R M) (m : M) : m ∈ V.restrictScalars S ↔ m ∈ V := Iff.refl _ #align submodule.restrict_scalars_mem Submodule.restrictScalars_mem @[simp] theorem restrictScalars_self (V : Submodule R M) : V.restrictScalars R = V := SetLike.coe_injective rfl #align submodule.restrict_scalars_self Submodule.restrictScalars_self variable (R M) theorem restrictScalars_injective : Function.Injective (restrictScalars S : Submodule R M → Submodule S M) := fun _ _ h => ext <| Set.ext_iff.1 (SetLike.ext'_iff.1 h : _) #align submodule.restrict_scalars_injective Submodule.restrictScalars_injective @[simp] theorem restrictScalars_inj {V₁ V₂ : Submodule R M} : restrictScalars S V₁ = restrictScalars S V₂ ↔ V₁ = V₂ := (restrictScalars_injective S _ _).eq_iff #align submodule.restrict_scalars_inj Submodule.restrictScalars_inj instance restrictScalars.origModule (p : Submodule R M) : Module R (p.restrictScalars S) := (by infer_instance : Module R p) #align submodule.restrict_scalars.orig_module Submodule.restrictScalars.origModule instance restrictScalars.isScalarTower (p : Submodule R M) : IsScalarTower S R (p.restrictScalars S) where smul_assoc r s x := Subtype.ext <| smul_assoc r s (x : M) #align submodule.restrict_scalars.is_scalar_tower Submodule.restrictScalars.isScalarTower @[simps] def restrictScalarsEmbedding : Submodule R M ↪o Submodule S M where toFun := restrictScalars S inj' := restrictScalars_injective S R M map_rel_iff' := by simp [SetLike.le_def] #align submodule.restrict_scalars_embedding Submodule.restrictScalarsEmbedding #align submodule.restrict_scalars_embedding_apply Submodule.restrictScalarsEmbedding_apply @[simps (config := { simpRhs := true })] def restrictScalarsEquiv (p : Submodule R M) : p.restrictScalars S ≃ₗ[R] p := { AddEquiv.refl p with map_smul' := fun _ _ => rfl } #align submodule.restrict_scalars_equiv Submodule.restrictScalarsEquiv #align submodule.restrict_scalars_equiv_symm_apply Submodule.restrictScalarsEquiv_symm_apply @[simp] theorem restrictScalars_bot : restrictScalars S (⊥ : Submodule R M) = ⊥ := rfl #align submodule.restrict_scalars_bot Submodule.restrictScalars_bot @[simp] theorem restrictScalars_eq_bot_iff {p : Submodule R M} : restrictScalars S p = ⊥ ↔ p = ⊥ := by simp [SetLike.ext_iff] #align submodule.restrict_scalars_eq_bot_iff Submodule.restrictScalars_eq_bot_iff @[simp] theorem restrictScalars_top : restrictScalars S (⊤ : Submodule R M) = ⊤ := rfl #align submodule.restrict_scalars_top Submodule.restrictScalars_top @[simp]
Mathlib/Algebra/Module/Submodule/RestrictScalars.lean
116
117
theorem restrictScalars_eq_top_iff {p : Submodule R M} : restrictScalars S p = ⊤ ↔ p = ⊤ := by
simp [SetLike.ext_iff]
1
2.718282
0
0
2
128
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Analysis.Normed.Field.UnitBall #align_import analysis.complex.circle from "leanprover-community/mathlib"@"ad3dfaca9ea2465198bcf58aa114401c324e29d1" noncomputable section open Complex Metric open ComplexConjugate def circle : Submonoid ℂ := Submonoid.unitSphere ℂ #align circle circle @[simp] theorem mem_circle_iff_abs {z : ℂ} : z ∈ circle ↔ abs z = 1 := mem_sphere_zero_iff_norm #align mem_circle_iff_abs mem_circle_iff_abs theorem circle_def : ↑circle = { z : ℂ | abs z = 1 } := Set.ext fun _ => mem_circle_iff_abs #align circle_def circle_def @[simp] theorem abs_coe_circle (z : circle) : abs z = 1 := mem_circle_iff_abs.mp z.2 #align abs_coe_circle abs_coe_circle
Mathlib/Analysis/Complex/Circle.lean
62
62
theorem mem_circle_iff_normSq {z : ℂ} : z ∈ circle ↔ normSq z = 1 := by
simp [Complex.abs]
1
2.718282
0
0
3
129
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Analysis.Normed.Field.UnitBall #align_import analysis.complex.circle from "leanprover-community/mathlib"@"ad3dfaca9ea2465198bcf58aa114401c324e29d1" noncomputable section open Complex Metric open ComplexConjugate def circle : Submonoid ℂ := Submonoid.unitSphere ℂ #align circle circle @[simp] theorem mem_circle_iff_abs {z : ℂ} : z ∈ circle ↔ abs z = 1 := mem_sphere_zero_iff_norm #align mem_circle_iff_abs mem_circle_iff_abs theorem circle_def : ↑circle = { z : ℂ | abs z = 1 } := Set.ext fun _ => mem_circle_iff_abs #align circle_def circle_def @[simp] theorem abs_coe_circle (z : circle) : abs z = 1 := mem_circle_iff_abs.mp z.2 #align abs_coe_circle abs_coe_circle theorem mem_circle_iff_normSq {z : ℂ} : z ∈ circle ↔ normSq z = 1 := by simp [Complex.abs] #align mem_circle_iff_norm_sq mem_circle_iff_normSq @[simp]
Mathlib/Analysis/Complex/Circle.lean
66
66
theorem normSq_eq_of_mem_circle (z : circle) : normSq z = 1 := by
simp [normSq_eq_abs]
1
2.718282
0
0
3
129
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Analysis.Normed.Field.UnitBall #align_import analysis.complex.circle from "leanprover-community/mathlib"@"ad3dfaca9ea2465198bcf58aa114401c324e29d1" noncomputable section open Complex Metric open ComplexConjugate def circle : Submonoid ℂ := Submonoid.unitSphere ℂ #align circle circle @[simp] theorem mem_circle_iff_abs {z : ℂ} : z ∈ circle ↔ abs z = 1 := mem_sphere_zero_iff_norm #align mem_circle_iff_abs mem_circle_iff_abs theorem circle_def : ↑circle = { z : ℂ | abs z = 1 } := Set.ext fun _ => mem_circle_iff_abs #align circle_def circle_def @[simp] theorem abs_coe_circle (z : circle) : abs z = 1 := mem_circle_iff_abs.mp z.2 #align abs_coe_circle abs_coe_circle theorem mem_circle_iff_normSq {z : ℂ} : z ∈ circle ↔ normSq z = 1 := by simp [Complex.abs] #align mem_circle_iff_norm_sq mem_circle_iff_normSq @[simp] theorem normSq_eq_of_mem_circle (z : circle) : normSq z = 1 := by simp [normSq_eq_abs] #align norm_sq_eq_of_mem_circle normSq_eq_of_mem_circle theorem ne_zero_of_mem_circle (z : circle) : (z : ℂ) ≠ 0 := ne_zero_of_mem_unit_sphere z #align ne_zero_of_mem_circle ne_zero_of_mem_circle instance commGroup : CommGroup circle := Metric.sphere.commGroup @[simp] theorem coe_inv_circle (z : circle) : ↑z⁻¹ = (z : ℂ)⁻¹ := rfl #align coe_inv_circle coe_inv_circle
Mathlib/Analysis/Complex/Circle.lean
81
82
theorem coe_inv_circle_eq_conj (z : circle) : ↑z⁻¹ = conj (z : ℂ) := by
rw [coe_inv_circle, inv_def, normSq_eq_of_mem_circle, inv_one, ofReal_one, mul_one]
1
2.718282
0
0
3
129
import Mathlib.Algebra.Group.Units.Equiv import Mathlib.CategoryTheory.Endomorphism #align_import category_theory.conj from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" universe v u namespace CategoryTheory namespace Iso variable {C : Type u} [Category.{v} C] def homCongr {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) : (X ⟶ Y) ≃ (X₁ ⟶ Y₁) where toFun f := α.inv ≫ f ≫ β.hom invFun f := α.hom ≫ f ≫ β.inv left_inv f := show α.hom ≫ (α.inv ≫ f ≫ β.hom) ≫ β.inv = f by rw [Category.assoc, Category.assoc, β.hom_inv_id, α.hom_inv_id_assoc, Category.comp_id] right_inv f := show α.inv ≫ (α.hom ≫ f ≫ β.inv) ≫ β.hom = f by rw [Category.assoc, Category.assoc, β.inv_hom_id, α.inv_hom_id_assoc, Category.comp_id] #align category_theory.iso.hom_congr CategoryTheory.Iso.homCongr -- @[simp, nolint simpNF] Porting note (#10675): dsimp can not prove this @[simp]
Mathlib/CategoryTheory/Conj.lean
50
52
theorem homCongr_apply {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (f : X ⟶ Y) : α.homCongr β f = α.inv ≫ f ≫ β.hom := by
rfl
1
2.718282
0
0
6
130
import Mathlib.Algebra.Group.Units.Equiv import Mathlib.CategoryTheory.Endomorphism #align_import category_theory.conj from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" universe v u namespace CategoryTheory namespace Iso variable {C : Type u} [Category.{v} C] def homCongr {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) : (X ⟶ Y) ≃ (X₁ ⟶ Y₁) where toFun f := α.inv ≫ f ≫ β.hom invFun f := α.hom ≫ f ≫ β.inv left_inv f := show α.hom ≫ (α.inv ≫ f ≫ β.hom) ≫ β.inv = f by rw [Category.assoc, Category.assoc, β.hom_inv_id, α.hom_inv_id_assoc, Category.comp_id] right_inv f := show α.inv ≫ (α.hom ≫ f ≫ β.inv) ≫ β.hom = f by rw [Category.assoc, Category.assoc, β.inv_hom_id, α.inv_hom_id_assoc, Category.comp_id] #align category_theory.iso.hom_congr CategoryTheory.Iso.homCongr -- @[simp, nolint simpNF] Porting note (#10675): dsimp can not prove this @[simp] theorem homCongr_apply {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (f : X ⟶ Y) : α.homCongr β f = α.inv ≫ f ≫ β.hom := by rfl #align category_theory.iso.hom_congr_apply CategoryTheory.Iso.homCongr_apply
Mathlib/CategoryTheory/Conj.lean
55
56
theorem homCongr_comp {X Y Z X₁ Y₁ Z₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (γ : Z ≅ Z₁) (f : X ⟶ Y) (g : Y ⟶ Z) : α.homCongr γ (f ≫ g) = α.homCongr β f ≫ β.homCongr γ g := by
simp
1
2.718282
0
0
6
130
import Mathlib.Algebra.Group.Units.Equiv import Mathlib.CategoryTheory.Endomorphism #align_import category_theory.conj from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" universe v u namespace CategoryTheory namespace Iso variable {C : Type u} [Category.{v} C] def homCongr {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) : (X ⟶ Y) ≃ (X₁ ⟶ Y₁) where toFun f := α.inv ≫ f ≫ β.hom invFun f := α.hom ≫ f ≫ β.inv left_inv f := show α.hom ≫ (α.inv ≫ f ≫ β.hom) ≫ β.inv = f by rw [Category.assoc, Category.assoc, β.hom_inv_id, α.hom_inv_id_assoc, Category.comp_id] right_inv f := show α.inv ≫ (α.hom ≫ f ≫ β.inv) ≫ β.hom = f by rw [Category.assoc, Category.assoc, β.inv_hom_id, α.inv_hom_id_assoc, Category.comp_id] #align category_theory.iso.hom_congr CategoryTheory.Iso.homCongr -- @[simp, nolint simpNF] Porting note (#10675): dsimp can not prove this @[simp] theorem homCongr_apply {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (f : X ⟶ Y) : α.homCongr β f = α.inv ≫ f ≫ β.hom := by rfl #align category_theory.iso.hom_congr_apply CategoryTheory.Iso.homCongr_apply theorem homCongr_comp {X Y Z X₁ Y₁ Z₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (γ : Z ≅ Z₁) (f : X ⟶ Y) (g : Y ⟶ Z) : α.homCongr γ (f ≫ g) = α.homCongr β f ≫ β.homCongr γ g := by simp #align category_theory.iso.hom_congr_comp CategoryTheory.Iso.homCongr_comp
Mathlib/CategoryTheory/Conj.lean
60
60
theorem homCongr_refl {X Y : C} (f : X ⟶ Y) : (Iso.refl X).homCongr (Iso.refl Y) f = f := by
simp
1
2.718282
0
0
6
130
import Mathlib.Algebra.Group.Units.Equiv import Mathlib.CategoryTheory.Endomorphism #align_import category_theory.conj from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" universe v u namespace CategoryTheory namespace Iso variable {C : Type u} [Category.{v} C] def homCongr {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) : (X ⟶ Y) ≃ (X₁ ⟶ Y₁) where toFun f := α.inv ≫ f ≫ β.hom invFun f := α.hom ≫ f ≫ β.inv left_inv f := show α.hom ≫ (α.inv ≫ f ≫ β.hom) ≫ β.inv = f by rw [Category.assoc, Category.assoc, β.hom_inv_id, α.hom_inv_id_assoc, Category.comp_id] right_inv f := show α.inv ≫ (α.hom ≫ f ≫ β.inv) ≫ β.hom = f by rw [Category.assoc, Category.assoc, β.inv_hom_id, α.inv_hom_id_assoc, Category.comp_id] #align category_theory.iso.hom_congr CategoryTheory.Iso.homCongr -- @[simp, nolint simpNF] Porting note (#10675): dsimp can not prove this @[simp] theorem homCongr_apply {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (f : X ⟶ Y) : α.homCongr β f = α.inv ≫ f ≫ β.hom := by rfl #align category_theory.iso.hom_congr_apply CategoryTheory.Iso.homCongr_apply theorem homCongr_comp {X Y Z X₁ Y₁ Z₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (γ : Z ≅ Z₁) (f : X ⟶ Y) (g : Y ⟶ Z) : α.homCongr γ (f ≫ g) = α.homCongr β f ≫ β.homCongr γ g := by simp #align category_theory.iso.hom_congr_comp CategoryTheory.Iso.homCongr_comp theorem homCongr_refl {X Y : C} (f : X ⟶ Y) : (Iso.refl X).homCongr (Iso.refl Y) f = f := by simp #align category_theory.iso.hom_congr_refl CategoryTheory.Iso.homCongr_refl
Mathlib/CategoryTheory/Conj.lean
64
66
theorem homCongr_trans {X₁ Y₁ X₂ Y₂ X₃ Y₃ : C} (α₁ : X₁ ≅ X₂) (β₁ : Y₁ ≅ Y₂) (α₂ : X₂ ≅ X₃) (β₂ : Y₂ ≅ Y₃) (f : X₁ ⟶ Y₁) : (α₁ ≪≫ α₂).homCongr (β₁ ≪≫ β₂) f = (α₁.homCongr β₁).trans (α₂.homCongr β₂) f := by
simp
1
2.718282
0
0
6
130
import Mathlib.Algebra.Group.Units.Equiv import Mathlib.CategoryTheory.Endomorphism #align_import category_theory.conj from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" universe v u namespace CategoryTheory namespace Iso variable {C : Type u} [Category.{v} C] def homCongr {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) : (X ⟶ Y) ≃ (X₁ ⟶ Y₁) where toFun f := α.inv ≫ f ≫ β.hom invFun f := α.hom ≫ f ≫ β.inv left_inv f := show α.hom ≫ (α.inv ≫ f ≫ β.hom) ≫ β.inv = f by rw [Category.assoc, Category.assoc, β.hom_inv_id, α.hom_inv_id_assoc, Category.comp_id] right_inv f := show α.inv ≫ (α.hom ≫ f ≫ β.inv) ≫ β.hom = f by rw [Category.assoc, Category.assoc, β.inv_hom_id, α.inv_hom_id_assoc, Category.comp_id] #align category_theory.iso.hom_congr CategoryTheory.Iso.homCongr -- @[simp, nolint simpNF] Porting note (#10675): dsimp can not prove this @[simp] theorem homCongr_apply {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (f : X ⟶ Y) : α.homCongr β f = α.inv ≫ f ≫ β.hom := by rfl #align category_theory.iso.hom_congr_apply CategoryTheory.Iso.homCongr_apply theorem homCongr_comp {X Y Z X₁ Y₁ Z₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (γ : Z ≅ Z₁) (f : X ⟶ Y) (g : Y ⟶ Z) : α.homCongr γ (f ≫ g) = α.homCongr β f ≫ β.homCongr γ g := by simp #align category_theory.iso.hom_congr_comp CategoryTheory.Iso.homCongr_comp theorem homCongr_refl {X Y : C} (f : X ⟶ Y) : (Iso.refl X).homCongr (Iso.refl Y) f = f := by simp #align category_theory.iso.hom_congr_refl CategoryTheory.Iso.homCongr_refl theorem homCongr_trans {X₁ Y₁ X₂ Y₂ X₃ Y₃ : C} (α₁ : X₁ ≅ X₂) (β₁ : Y₁ ≅ Y₂) (α₂ : X₂ ≅ X₃) (β₂ : Y₂ ≅ Y₃) (f : X₁ ⟶ Y₁) : (α₁ ≪≫ α₂).homCongr (β₁ ≪≫ β₂) f = (α₁.homCongr β₁).trans (α₂.homCongr β₂) f := by simp #align category_theory.iso.hom_congr_trans CategoryTheory.Iso.homCongr_trans @[simp] theorem homCongr_symm {X₁ Y₁ X₂ Y₂ : C} (α : X₁ ≅ X₂) (β : Y₁ ≅ Y₂) : (α.homCongr β).symm = α.symm.homCongr β.symm := rfl #align category_theory.iso.hom_congr_symm CategoryTheory.Iso.homCongr_symm def isoCongr {X₁ Y₁ X₂ Y₂ : C} (f : X₁ ≅ X₂) (g : Y₁ ≅ Y₂) : (X₁ ≅ Y₁) ≃ (X₂ ≅ Y₂) where toFun h := f.symm.trans <| h.trans <| g invFun h := f.trans <| h.trans <| g.symm left_inv := by aesop_cat right_inv := by aesop_cat def isoCongrLeft {X₁ X₂ Y : C} (f : X₁ ≅ X₂) : (X₁ ≅ Y) ≃ (X₂ ≅ Y) := isoCongr f (Iso.refl _) def isoCongrRight {X Y₁ Y₂ : C} (g : Y₁ ≅ Y₂) : (X ≅ Y₁) ≃ (X ≅ Y₂) := isoCongr (Iso.refl _) g variable {X Y : C} (α : X ≅ Y) def conj : End X ≃* End Y := { homCongr α α with map_mul' := fun f g => homCongr_comp α α α g f } #align category_theory.iso.conj CategoryTheory.Iso.conj theorem conj_apply (f : End X) : α.conj f = α.inv ≫ f ≫ α.hom := rfl #align category_theory.iso.conj_apply CategoryTheory.Iso.conj_apply @[simp] theorem conj_comp (f g : End X) : α.conj (f ≫ g) = α.conj f ≫ α.conj g := α.conj.map_mul g f #align category_theory.iso.conj_comp CategoryTheory.Iso.conj_comp @[simp] theorem conj_id : α.conj (𝟙 X) = 𝟙 Y := α.conj.map_one #align category_theory.iso.conj_id CategoryTheory.Iso.conj_id @[simp]
Mathlib/CategoryTheory/Conj.lean
114
115
theorem refl_conj (f : End X) : (Iso.refl X).conj f = f := by
rw [conj_apply, Iso.refl_inv, Iso.refl_hom, Category.id_comp, Category.comp_id]
1
2.718282
0
0
6
130
import Mathlib.Algebra.Group.Units.Equiv import Mathlib.CategoryTheory.Endomorphism #align_import category_theory.conj from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" universe v u namespace CategoryTheory namespace Iso variable {C : Type u} [Category.{v} C] def homCongr {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) : (X ⟶ Y) ≃ (X₁ ⟶ Y₁) where toFun f := α.inv ≫ f ≫ β.hom invFun f := α.hom ≫ f ≫ β.inv left_inv f := show α.hom ≫ (α.inv ≫ f ≫ β.hom) ≫ β.inv = f by rw [Category.assoc, Category.assoc, β.hom_inv_id, α.hom_inv_id_assoc, Category.comp_id] right_inv f := show α.inv ≫ (α.hom ≫ f ≫ β.inv) ≫ β.hom = f by rw [Category.assoc, Category.assoc, β.inv_hom_id, α.inv_hom_id_assoc, Category.comp_id] #align category_theory.iso.hom_congr CategoryTheory.Iso.homCongr -- @[simp, nolint simpNF] Porting note (#10675): dsimp can not prove this @[simp] theorem homCongr_apply {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (f : X ⟶ Y) : α.homCongr β f = α.inv ≫ f ≫ β.hom := by rfl #align category_theory.iso.hom_congr_apply CategoryTheory.Iso.homCongr_apply theorem homCongr_comp {X Y Z X₁ Y₁ Z₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (γ : Z ≅ Z₁) (f : X ⟶ Y) (g : Y ⟶ Z) : α.homCongr γ (f ≫ g) = α.homCongr β f ≫ β.homCongr γ g := by simp #align category_theory.iso.hom_congr_comp CategoryTheory.Iso.homCongr_comp theorem homCongr_refl {X Y : C} (f : X ⟶ Y) : (Iso.refl X).homCongr (Iso.refl Y) f = f := by simp #align category_theory.iso.hom_congr_refl CategoryTheory.Iso.homCongr_refl theorem homCongr_trans {X₁ Y₁ X₂ Y₂ X₃ Y₃ : C} (α₁ : X₁ ≅ X₂) (β₁ : Y₁ ≅ Y₂) (α₂ : X₂ ≅ X₃) (β₂ : Y₂ ≅ Y₃) (f : X₁ ⟶ Y₁) : (α₁ ≪≫ α₂).homCongr (β₁ ≪≫ β₂) f = (α₁.homCongr β₁).trans (α₂.homCongr β₂) f := by simp #align category_theory.iso.hom_congr_trans CategoryTheory.Iso.homCongr_trans @[simp] theorem homCongr_symm {X₁ Y₁ X₂ Y₂ : C} (α : X₁ ≅ X₂) (β : Y₁ ≅ Y₂) : (α.homCongr β).symm = α.symm.homCongr β.symm := rfl #align category_theory.iso.hom_congr_symm CategoryTheory.Iso.homCongr_symm def isoCongr {X₁ Y₁ X₂ Y₂ : C} (f : X₁ ≅ X₂) (g : Y₁ ≅ Y₂) : (X₁ ≅ Y₁) ≃ (X₂ ≅ Y₂) where toFun h := f.symm.trans <| h.trans <| g invFun h := f.trans <| h.trans <| g.symm left_inv := by aesop_cat right_inv := by aesop_cat def isoCongrLeft {X₁ X₂ Y : C} (f : X₁ ≅ X₂) : (X₁ ≅ Y) ≃ (X₂ ≅ Y) := isoCongr f (Iso.refl _) def isoCongrRight {X Y₁ Y₂ : C} (g : Y₁ ≅ Y₂) : (X ≅ Y₁) ≃ (X ≅ Y₂) := isoCongr (Iso.refl _) g variable {X Y : C} (α : X ≅ Y) def conj : End X ≃* End Y := { homCongr α α with map_mul' := fun f g => homCongr_comp α α α g f } #align category_theory.iso.conj CategoryTheory.Iso.conj theorem conj_apply (f : End X) : α.conj f = α.inv ≫ f ≫ α.hom := rfl #align category_theory.iso.conj_apply CategoryTheory.Iso.conj_apply @[simp] theorem conj_comp (f g : End X) : α.conj (f ≫ g) = α.conj f ≫ α.conj g := α.conj.map_mul g f #align category_theory.iso.conj_comp CategoryTheory.Iso.conj_comp @[simp] theorem conj_id : α.conj (𝟙 X) = 𝟙 Y := α.conj.map_one #align category_theory.iso.conj_id CategoryTheory.Iso.conj_id @[simp] theorem refl_conj (f : End X) : (Iso.refl X).conj f = f := by rw [conj_apply, Iso.refl_inv, Iso.refl_hom, Category.id_comp, Category.comp_id] #align category_theory.iso.refl_conj CategoryTheory.Iso.refl_conj @[simp] theorem trans_conj {Z : C} (β : Y ≅ Z) (f : End X) : (α ≪≫ β).conj f = β.conj (α.conj f) := homCongr_trans α α β β f #align category_theory.iso.trans_conj CategoryTheory.Iso.trans_conj @[simp]
Mathlib/CategoryTheory/Conj.lean
124
125
theorem symm_self_conj (f : End X) : α.symm.conj (α.conj f) = f := by
rw [← trans_conj, α.self_symm_id, refl_conj]
1
2.718282
0
0
6
130
import Mathlib.Data.Part import Mathlib.Data.Rel #align_import data.pfun from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open Function def PFun (α β : Type*) := α → Part β #align pfun PFun infixr:25 " →. " => PFun namespace PFun variable {α β γ δ ε ι : Type*} instance inhabited : Inhabited (α →. β) := ⟨fun _ => Part.none⟩ #align pfun.inhabited PFun.inhabited def Dom (f : α →. β) : Set α := { a | (f a).Dom } #align pfun.dom PFun.Dom @[simp]
Mathlib/Data/PFun.lean
80
80
theorem mem_dom (f : α →. β) (x : α) : x ∈ Dom f ↔ ∃ y, y ∈ f x := by
simp [Dom, Part.dom_iff_mem]
1
2.718282
0
0
3
131
import Mathlib.Data.Part import Mathlib.Data.Rel #align_import data.pfun from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open Function def PFun (α β : Type*) := α → Part β #align pfun PFun infixr:25 " →. " => PFun namespace PFun variable {α β γ δ ε ι : Type*} instance inhabited : Inhabited (α →. β) := ⟨fun _ => Part.none⟩ #align pfun.inhabited PFun.inhabited def Dom (f : α →. β) : Set α := { a | (f a).Dom } #align pfun.dom PFun.Dom @[simp] theorem mem_dom (f : α →. β) (x : α) : x ∈ Dom f ↔ ∃ y, y ∈ f x := by simp [Dom, Part.dom_iff_mem] #align pfun.mem_dom PFun.mem_dom @[simp] theorem dom_mk (p : α → Prop) (f : ∀ a, p a → β) : (PFun.Dom fun x => ⟨p x, f x⟩) = { x | p x } := rfl #align pfun.dom_mk PFun.dom_mk theorem dom_eq (f : α →. β) : Dom f = { x | ∃ y, y ∈ f x } := Set.ext (mem_dom f) #align pfun.dom_eq PFun.dom_eq def fn (f : α →. β) (a : α) : Dom f a → β := (f a).get #align pfun.fn PFun.fn @[simp] theorem fn_apply (f : α →. β) (a : α) : f.fn a = (f a).get := rfl #align pfun.fn_apply PFun.fn_apply def evalOpt (f : α →. β) [D : DecidablePred (· ∈ Dom f)] (x : α) : Option β := @Part.toOption _ _ (D x) #align pfun.eval_opt PFun.evalOpt theorem ext' {f g : α →. β} (H1 : ∀ a, a ∈ Dom f ↔ a ∈ Dom g) (H2 : ∀ a p q, f.fn a p = g.fn a q) : f = g := funext fun a => Part.ext' (H1 a) (H2 a) #align pfun.ext' PFun.ext' theorem ext {f g : α →. β} (H : ∀ a b, b ∈ f a ↔ b ∈ g a) : f = g := funext fun a => Part.ext (H a) #align pfun.ext PFun.ext def asSubtype (f : α →. β) (s : f.Dom) : β := f.fn s s.2 #align pfun.as_subtype PFun.asSubtype def equivSubtype : (α →. β) ≃ Σp : α → Prop, Subtype p → β := ⟨fun f => ⟨fun a => (f a).Dom, asSubtype f⟩, fun f x => ⟨f.1 x, fun h => f.2 ⟨x, h⟩⟩, fun f => funext fun a => Part.eta _, fun ⟨p, f⟩ => by dsimp; congr⟩ #align pfun.equiv_subtype PFun.equivSubtype theorem asSubtype_eq_of_mem {f : α →. β} {x : α} {y : β} (fxy : y ∈ f x) (domx : x ∈ f.Dom) : f.asSubtype ⟨x, domx⟩ = y := Part.mem_unique (Part.get_mem _) fxy #align pfun.as_subtype_eq_of_mem PFun.asSubtype_eq_of_mem @[coe] protected def lift (f : α → β) : α →. β := fun a => Part.some (f a) #align pfun.lift PFun.lift instance coe : Coe (α → β) (α →. β) := ⟨PFun.lift⟩ #align pfun.has_coe PFun.coe @[simp] theorem coe_val (f : α → β) (a : α) : (f : α →. β) a = Part.some (f a) := rfl #align pfun.coe_val PFun.coe_val @[simp] theorem dom_coe (f : α → β) : (f : α →. β).Dom = Set.univ := rfl #align pfun.dom_coe PFun.dom_coe theorem lift_injective : Injective (PFun.lift : (α → β) → α →. β) := fun _ _ h => funext fun a => Part.some_injective <| congr_fun h a #align pfun.coe_injective PFun.lift_injective def graph (f : α →. β) : Set (α × β) := { p | p.2 ∈ f p.1 } #align pfun.graph PFun.graph def graph' (f : α →. β) : Rel α β := fun x y => y ∈ f x #align pfun.graph' PFun.graph' def ran (f : α →. β) : Set β := { b | ∃ a, b ∈ f a } #align pfun.ran PFun.ran def restrict (f : α →. β) {p : Set α} (H : p ⊆ f.Dom) : α →. β := fun x => (f x).restrict (x ∈ p) (@H x) #align pfun.restrict PFun.restrict @[simp]
Mathlib/Data/PFun.lean
180
181
theorem mem_restrict {f : α →. β} {s : Set α} (h : s ⊆ f.Dom) (a : α) (b : β) : b ∈ f.restrict h a ↔ a ∈ s ∧ b ∈ f a := by
simp [restrict]
1
2.718282
0
0
3
131
import Mathlib.Data.Part import Mathlib.Data.Rel #align_import data.pfun from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open Function def PFun (α β : Type*) := α → Part β #align pfun PFun infixr:25 " →. " => PFun namespace PFun variable {α β γ δ ε ι : Type*} instance inhabited : Inhabited (α →. β) := ⟨fun _ => Part.none⟩ #align pfun.inhabited PFun.inhabited def Dom (f : α →. β) : Set α := { a | (f a).Dom } #align pfun.dom PFun.Dom @[simp] theorem mem_dom (f : α →. β) (x : α) : x ∈ Dom f ↔ ∃ y, y ∈ f x := by simp [Dom, Part.dom_iff_mem] #align pfun.mem_dom PFun.mem_dom @[simp] theorem dom_mk (p : α → Prop) (f : ∀ a, p a → β) : (PFun.Dom fun x => ⟨p x, f x⟩) = { x | p x } := rfl #align pfun.dom_mk PFun.dom_mk theorem dom_eq (f : α →. β) : Dom f = { x | ∃ y, y ∈ f x } := Set.ext (mem_dom f) #align pfun.dom_eq PFun.dom_eq def fn (f : α →. β) (a : α) : Dom f a → β := (f a).get #align pfun.fn PFun.fn @[simp] theorem fn_apply (f : α →. β) (a : α) : f.fn a = (f a).get := rfl #align pfun.fn_apply PFun.fn_apply def evalOpt (f : α →. β) [D : DecidablePred (· ∈ Dom f)] (x : α) : Option β := @Part.toOption _ _ (D x) #align pfun.eval_opt PFun.evalOpt theorem ext' {f g : α →. β} (H1 : ∀ a, a ∈ Dom f ↔ a ∈ Dom g) (H2 : ∀ a p q, f.fn a p = g.fn a q) : f = g := funext fun a => Part.ext' (H1 a) (H2 a) #align pfun.ext' PFun.ext' theorem ext {f g : α →. β} (H : ∀ a b, b ∈ f a ↔ b ∈ g a) : f = g := funext fun a => Part.ext (H a) #align pfun.ext PFun.ext def asSubtype (f : α →. β) (s : f.Dom) : β := f.fn s s.2 #align pfun.as_subtype PFun.asSubtype def equivSubtype : (α →. β) ≃ Σp : α → Prop, Subtype p → β := ⟨fun f => ⟨fun a => (f a).Dom, asSubtype f⟩, fun f x => ⟨f.1 x, fun h => f.2 ⟨x, h⟩⟩, fun f => funext fun a => Part.eta _, fun ⟨p, f⟩ => by dsimp; congr⟩ #align pfun.equiv_subtype PFun.equivSubtype theorem asSubtype_eq_of_mem {f : α →. β} {x : α} {y : β} (fxy : y ∈ f x) (domx : x ∈ f.Dom) : f.asSubtype ⟨x, domx⟩ = y := Part.mem_unique (Part.get_mem _) fxy #align pfun.as_subtype_eq_of_mem PFun.asSubtype_eq_of_mem @[coe] protected def lift (f : α → β) : α →. β := fun a => Part.some (f a) #align pfun.lift PFun.lift instance coe : Coe (α → β) (α →. β) := ⟨PFun.lift⟩ #align pfun.has_coe PFun.coe @[simp] theorem coe_val (f : α → β) (a : α) : (f : α →. β) a = Part.some (f a) := rfl #align pfun.coe_val PFun.coe_val @[simp] theorem dom_coe (f : α → β) : (f : α →. β).Dom = Set.univ := rfl #align pfun.dom_coe PFun.dom_coe theorem lift_injective : Injective (PFun.lift : (α → β) → α →. β) := fun _ _ h => funext fun a => Part.some_injective <| congr_fun h a #align pfun.coe_injective PFun.lift_injective def graph (f : α →. β) : Set (α × β) := { p | p.2 ∈ f p.1 } #align pfun.graph PFun.graph def graph' (f : α →. β) : Rel α β := fun x y => y ∈ f x #align pfun.graph' PFun.graph' def ran (f : α →. β) : Set β := { b | ∃ a, b ∈ f a } #align pfun.ran PFun.ran def restrict (f : α →. β) {p : Set α} (H : p ⊆ f.Dom) : α →. β := fun x => (f x).restrict (x ∈ p) (@H x) #align pfun.restrict PFun.restrict @[simp] theorem mem_restrict {f : α →. β} {s : Set α} (h : s ⊆ f.Dom) (a : α) (b : β) : b ∈ f.restrict h a ↔ a ∈ s ∧ b ∈ f a := by simp [restrict] #align pfun.mem_restrict PFun.mem_restrict def res (f : α → β) (s : Set α) : α →. β := (PFun.lift f).restrict s.subset_univ #align pfun.res PFun.res
Mathlib/Data/PFun.lean
189
190
theorem mem_res (f : α → β) (s : Set α) (a : α) (b : β) : b ∈ res f s a ↔ a ∈ s ∧ f a = b := by
simp [res, @eq_comm _ b]
1
2.718282
0
0
3
131
import Mathlib.Logic.Basic import Mathlib.Tactic.Convert import Mathlib.Tactic.SplitIfs #align_import logic.lemmas from "leanprover-community/mathlib"@"2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c" protected alias ⟨HEq.eq, Eq.heq⟩ := heq_iff_eq #align heq.eq HEq.eq #align eq.heq Eq.heq variable {α : Sort*} {p q r : Prop} [Decidable p] [Decidable q] {a b c : α}
Mathlib/Logic/Lemmas.lean
28
31
theorem dite_dite_distrib_left {a : p → α} {b : ¬p → q → α} {c : ¬p → ¬q → α} : (dite p a fun hp ↦ dite q (b hp) (c hp)) = dite q (fun hq ↦ (dite p a) fun hp ↦ b hp hq) fun hq ↦ (dite p a) fun hp ↦ c hp hq := by
split_ifs <;> rfl
1
2.718282
0
0
2
132
import Mathlib.Logic.Basic import Mathlib.Tactic.Convert import Mathlib.Tactic.SplitIfs #align_import logic.lemmas from "leanprover-community/mathlib"@"2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c" protected alias ⟨HEq.eq, Eq.heq⟩ := heq_iff_eq #align heq.eq HEq.eq #align eq.heq Eq.heq variable {α : Sort*} {p q r : Prop} [Decidable p] [Decidable q] {a b c : α} theorem dite_dite_distrib_left {a : p → α} {b : ¬p → q → α} {c : ¬p → ¬q → α} : (dite p a fun hp ↦ dite q (b hp) (c hp)) = dite q (fun hq ↦ (dite p a) fun hp ↦ b hp hq) fun hq ↦ (dite p a) fun hp ↦ c hp hq := by split_ifs <;> rfl #align dite_dite_distrib_left dite_dite_distrib_left
Mathlib/Logic/Lemmas.lean
34
37
theorem dite_dite_distrib_right {a : p → q → α} {b : p → ¬q → α} {c : ¬p → α} : dite p (fun hp ↦ dite q (a hp) (b hp)) c = dite q (fun hq ↦ dite p (fun hp ↦ a hp hq) c) fun hq ↦ dite p (fun hp ↦ b hp hq) c := by
split_ifs <;> rfl
1
2.718282
0
0
2
132
import Mathlib.CategoryTheory.Abelian.Basic import Mathlib.CategoryTheory.Preadditive.Opposite import Mathlib.CategoryTheory.Limits.Opposites #align_import category_theory.abelian.opposite from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80" noncomputable section namespace CategoryTheory open CategoryTheory.Limits variable (C : Type*) [Category C] [Abelian C] -- Porting note: these local instances do not seem to be necessary --attribute [local instance] -- hasFiniteLimits_of_hasEqualizers_and_finite_products -- hasFiniteColimits_of_hasCoequalizers_and_finite_coproducts -- Abelian.hasFiniteBiproducts instance : Abelian Cᵒᵖ := by -- Porting note: priorities of `Abelian.has_kernels` and `Abelian.has_cokernels` have -- been set to 90 in `Abelian.Basic` in order to prevent a timeout here exact { normalMonoOfMono := fun f => normalMonoOfNormalEpiUnop _ (normalEpiOfEpi f.unop) normalEpiOfEpi := fun f => normalEpiOfNormalMonoUnop _ (normalMonoOfMono f.unop) } section variable {C} variable {X Y : C} (f : X ⟶ Y) {A B : Cᵒᵖ} (g : A ⟶ B) -- TODO: Generalize (this will work whenever f has a cokernel) -- (The abelian case is probably sufficient for most applications.) @[simps] def kernelOpUnop : (kernel f.op).unop ≅ cokernel f where hom := (kernel.lift f.op (cokernel.π f).op <| by simp [← op_comp]).unop inv := cokernel.desc f (kernel.ι f.op).unop <| by rw [← f.unop_op, ← unop_comp, f.unop_op] simp hom_inv_id := by rw [← unop_id, ← (cokernel.desc f _ _).unop_op, ← unop_comp] congr 1 ext simp [← op_comp] inv_hom_id := by ext simp [← unop_comp] #align category_theory.kernel_op_unop CategoryTheory.kernelOpUnop -- TODO: Generalize (this will work whenever f has a kernel) -- (The abelian case is probably sufficient for most applications.) @[simps] def cokernelOpUnop : (cokernel f.op).unop ≅ kernel f where hom := kernel.lift f (cokernel.π f.op).unop <| by rw [← f.unop_op, ← unop_comp, f.unop_op] simp inv := (cokernel.desc f.op (kernel.ι f).op <| by simp [← op_comp]).unop hom_inv_id := by rw [← unop_id, ← (kernel.lift f _ _).unop_op, ← unop_comp] congr 1 ext simp [← op_comp] inv_hom_id := by ext simp [← unop_comp] #align category_theory.cokernel_op_unop CategoryTheory.cokernelOpUnop @[simps!] def kernelUnopOp : Opposite.op (kernel g.unop) ≅ cokernel g := (cokernelOpUnop g.unop).op #align category_theory.kernel_unop_op CategoryTheory.kernelUnopOp @[simps!] def cokernelUnopOp : Opposite.op (cokernel g.unop) ≅ kernel g := (kernelOpUnop g.unop).op #align category_theory.cokernel_unop_op CategoryTheory.cokernelUnopOp
Mathlib/CategoryTheory/Abelian/Opposite.lean
95
98
theorem cokernel.π_op : (cokernel.π f.op).unop = (cokernelOpUnop f).hom ≫ kernel.ι f ≫ eqToHom (Opposite.unop_op _).symm := by
simp [cokernelOpUnop]
1
2.718282
0
0
4
133
import Mathlib.CategoryTheory.Abelian.Basic import Mathlib.CategoryTheory.Preadditive.Opposite import Mathlib.CategoryTheory.Limits.Opposites #align_import category_theory.abelian.opposite from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80" noncomputable section namespace CategoryTheory open CategoryTheory.Limits variable (C : Type*) [Category C] [Abelian C] -- Porting note: these local instances do not seem to be necessary --attribute [local instance] -- hasFiniteLimits_of_hasEqualizers_and_finite_products -- hasFiniteColimits_of_hasCoequalizers_and_finite_coproducts -- Abelian.hasFiniteBiproducts instance : Abelian Cᵒᵖ := by -- Porting note: priorities of `Abelian.has_kernels` and `Abelian.has_cokernels` have -- been set to 90 in `Abelian.Basic` in order to prevent a timeout here exact { normalMonoOfMono := fun f => normalMonoOfNormalEpiUnop _ (normalEpiOfEpi f.unop) normalEpiOfEpi := fun f => normalEpiOfNormalMonoUnop _ (normalMonoOfMono f.unop) } section variable {C} variable {X Y : C} (f : X ⟶ Y) {A B : Cᵒᵖ} (g : A ⟶ B) -- TODO: Generalize (this will work whenever f has a cokernel) -- (The abelian case is probably sufficient for most applications.) @[simps] def kernelOpUnop : (kernel f.op).unop ≅ cokernel f where hom := (kernel.lift f.op (cokernel.π f).op <| by simp [← op_comp]).unop inv := cokernel.desc f (kernel.ι f.op).unop <| by rw [← f.unop_op, ← unop_comp, f.unop_op] simp hom_inv_id := by rw [← unop_id, ← (cokernel.desc f _ _).unop_op, ← unop_comp] congr 1 ext simp [← op_comp] inv_hom_id := by ext simp [← unop_comp] #align category_theory.kernel_op_unop CategoryTheory.kernelOpUnop -- TODO: Generalize (this will work whenever f has a kernel) -- (The abelian case is probably sufficient for most applications.) @[simps] def cokernelOpUnop : (cokernel f.op).unop ≅ kernel f where hom := kernel.lift f (cokernel.π f.op).unop <| by rw [← f.unop_op, ← unop_comp, f.unop_op] simp inv := (cokernel.desc f.op (kernel.ι f).op <| by simp [← op_comp]).unop hom_inv_id := by rw [← unop_id, ← (kernel.lift f _ _).unop_op, ← unop_comp] congr 1 ext simp [← op_comp] inv_hom_id := by ext simp [← unop_comp] #align category_theory.cokernel_op_unop CategoryTheory.cokernelOpUnop @[simps!] def kernelUnopOp : Opposite.op (kernel g.unop) ≅ cokernel g := (cokernelOpUnop g.unop).op #align category_theory.kernel_unop_op CategoryTheory.kernelUnopOp @[simps!] def cokernelUnopOp : Opposite.op (cokernel g.unop) ≅ kernel g := (kernelOpUnop g.unop).op #align category_theory.cokernel_unop_op CategoryTheory.cokernelUnopOp theorem cokernel.π_op : (cokernel.π f.op).unop = (cokernelOpUnop f).hom ≫ kernel.ι f ≫ eqToHom (Opposite.unop_op _).symm := by simp [cokernelOpUnop] #align category_theory.cokernel.π_op CategoryTheory.cokernel.π_op
Mathlib/CategoryTheory/Abelian/Opposite.lean
101
103
theorem kernel.ι_op : (kernel.ι f.op).unop = eqToHom (Opposite.unop_op _) ≫ cokernel.π f ≫ (kernelOpUnop f).inv := by
simp [kernelOpUnop]
1
2.718282
0
0
4
133
import Mathlib.CategoryTheory.Abelian.Basic import Mathlib.CategoryTheory.Preadditive.Opposite import Mathlib.CategoryTheory.Limits.Opposites #align_import category_theory.abelian.opposite from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80" noncomputable section namespace CategoryTheory open CategoryTheory.Limits variable (C : Type*) [Category C] [Abelian C] -- Porting note: these local instances do not seem to be necessary --attribute [local instance] -- hasFiniteLimits_of_hasEqualizers_and_finite_products -- hasFiniteColimits_of_hasCoequalizers_and_finite_coproducts -- Abelian.hasFiniteBiproducts instance : Abelian Cᵒᵖ := by -- Porting note: priorities of `Abelian.has_kernels` and `Abelian.has_cokernels` have -- been set to 90 in `Abelian.Basic` in order to prevent a timeout here exact { normalMonoOfMono := fun f => normalMonoOfNormalEpiUnop _ (normalEpiOfEpi f.unop) normalEpiOfEpi := fun f => normalEpiOfNormalMonoUnop _ (normalMonoOfMono f.unop) } section variable {C} variable {X Y : C} (f : X ⟶ Y) {A B : Cᵒᵖ} (g : A ⟶ B) -- TODO: Generalize (this will work whenever f has a cokernel) -- (The abelian case is probably sufficient for most applications.) @[simps] def kernelOpUnop : (kernel f.op).unop ≅ cokernel f where hom := (kernel.lift f.op (cokernel.π f).op <| by simp [← op_comp]).unop inv := cokernel.desc f (kernel.ι f.op).unop <| by rw [← f.unop_op, ← unop_comp, f.unop_op] simp hom_inv_id := by rw [← unop_id, ← (cokernel.desc f _ _).unop_op, ← unop_comp] congr 1 ext simp [← op_comp] inv_hom_id := by ext simp [← unop_comp] #align category_theory.kernel_op_unop CategoryTheory.kernelOpUnop -- TODO: Generalize (this will work whenever f has a kernel) -- (The abelian case is probably sufficient for most applications.) @[simps] def cokernelOpUnop : (cokernel f.op).unop ≅ kernel f where hom := kernel.lift f (cokernel.π f.op).unop <| by rw [← f.unop_op, ← unop_comp, f.unop_op] simp inv := (cokernel.desc f.op (kernel.ι f).op <| by simp [← op_comp]).unop hom_inv_id := by rw [← unop_id, ← (kernel.lift f _ _).unop_op, ← unop_comp] congr 1 ext simp [← op_comp] inv_hom_id := by ext simp [← unop_comp] #align category_theory.cokernel_op_unop CategoryTheory.cokernelOpUnop @[simps!] def kernelUnopOp : Opposite.op (kernel g.unop) ≅ cokernel g := (cokernelOpUnop g.unop).op #align category_theory.kernel_unop_op CategoryTheory.kernelUnopOp @[simps!] def cokernelUnopOp : Opposite.op (cokernel g.unop) ≅ kernel g := (kernelOpUnop g.unop).op #align category_theory.cokernel_unop_op CategoryTheory.cokernelUnopOp theorem cokernel.π_op : (cokernel.π f.op).unop = (cokernelOpUnop f).hom ≫ kernel.ι f ≫ eqToHom (Opposite.unop_op _).symm := by simp [cokernelOpUnop] #align category_theory.cokernel.π_op CategoryTheory.cokernel.π_op theorem kernel.ι_op : (kernel.ι f.op).unop = eqToHom (Opposite.unop_op _) ≫ cokernel.π f ≫ (kernelOpUnop f).inv := by simp [kernelOpUnop] #align category_theory.kernel.ι_op CategoryTheory.kernel.ι_op @[simps!] def kernelOpOp : kernel f.op ≅ Opposite.op (cokernel f) := (kernelOpUnop f).op.symm #align category_theory.kernel_op_op CategoryTheory.kernelOpOp @[simps!] def cokernelOpOp : cokernel f.op ≅ Opposite.op (kernel f) := (cokernelOpUnop f).op.symm #align category_theory.cokernel_op_op CategoryTheory.cokernelOpOp @[simps!] def kernelUnopUnop : kernel g.unop ≅ (cokernel g).unop := (kernelUnopOp g).unop.symm #align category_theory.kernel_unop_unop CategoryTheory.kernelUnopUnop
Mathlib/CategoryTheory/Abelian/Opposite.lean
124
126
theorem kernel.ι_unop : (kernel.ι g.unop).op = eqToHom (Opposite.op_unop _) ≫ cokernel.π g ≫ (kernelUnopOp g).inv := by
simp
1
2.718282
0
0
4
133
import Mathlib.CategoryTheory.Abelian.Basic import Mathlib.CategoryTheory.Preadditive.Opposite import Mathlib.CategoryTheory.Limits.Opposites #align_import category_theory.abelian.opposite from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80" noncomputable section namespace CategoryTheory open CategoryTheory.Limits variable (C : Type*) [Category C] [Abelian C] -- Porting note: these local instances do not seem to be necessary --attribute [local instance] -- hasFiniteLimits_of_hasEqualizers_and_finite_products -- hasFiniteColimits_of_hasCoequalizers_and_finite_coproducts -- Abelian.hasFiniteBiproducts instance : Abelian Cᵒᵖ := by -- Porting note: priorities of `Abelian.has_kernels` and `Abelian.has_cokernels` have -- been set to 90 in `Abelian.Basic` in order to prevent a timeout here exact { normalMonoOfMono := fun f => normalMonoOfNormalEpiUnop _ (normalEpiOfEpi f.unop) normalEpiOfEpi := fun f => normalEpiOfNormalMonoUnop _ (normalMonoOfMono f.unop) } section variable {C} variable {X Y : C} (f : X ⟶ Y) {A B : Cᵒᵖ} (g : A ⟶ B) -- TODO: Generalize (this will work whenever f has a cokernel) -- (The abelian case is probably sufficient for most applications.) @[simps] def kernelOpUnop : (kernel f.op).unop ≅ cokernel f where hom := (kernel.lift f.op (cokernel.π f).op <| by simp [← op_comp]).unop inv := cokernel.desc f (kernel.ι f.op).unop <| by rw [← f.unop_op, ← unop_comp, f.unop_op] simp hom_inv_id := by rw [← unop_id, ← (cokernel.desc f _ _).unop_op, ← unop_comp] congr 1 ext simp [← op_comp] inv_hom_id := by ext simp [← unop_comp] #align category_theory.kernel_op_unop CategoryTheory.kernelOpUnop -- TODO: Generalize (this will work whenever f has a kernel) -- (The abelian case is probably sufficient for most applications.) @[simps] def cokernelOpUnop : (cokernel f.op).unop ≅ kernel f where hom := kernel.lift f (cokernel.π f.op).unop <| by rw [← f.unop_op, ← unop_comp, f.unop_op] simp inv := (cokernel.desc f.op (kernel.ι f).op <| by simp [← op_comp]).unop hom_inv_id := by rw [← unop_id, ← (kernel.lift f _ _).unop_op, ← unop_comp] congr 1 ext simp [← op_comp] inv_hom_id := by ext simp [← unop_comp] #align category_theory.cokernel_op_unop CategoryTheory.cokernelOpUnop @[simps!] def kernelUnopOp : Opposite.op (kernel g.unop) ≅ cokernel g := (cokernelOpUnop g.unop).op #align category_theory.kernel_unop_op CategoryTheory.kernelUnopOp @[simps!] def cokernelUnopOp : Opposite.op (cokernel g.unop) ≅ kernel g := (kernelOpUnop g.unop).op #align category_theory.cokernel_unop_op CategoryTheory.cokernelUnopOp theorem cokernel.π_op : (cokernel.π f.op).unop = (cokernelOpUnop f).hom ≫ kernel.ι f ≫ eqToHom (Opposite.unop_op _).symm := by simp [cokernelOpUnop] #align category_theory.cokernel.π_op CategoryTheory.cokernel.π_op theorem kernel.ι_op : (kernel.ι f.op).unop = eqToHom (Opposite.unop_op _) ≫ cokernel.π f ≫ (kernelOpUnop f).inv := by simp [kernelOpUnop] #align category_theory.kernel.ι_op CategoryTheory.kernel.ι_op @[simps!] def kernelOpOp : kernel f.op ≅ Opposite.op (cokernel f) := (kernelOpUnop f).op.symm #align category_theory.kernel_op_op CategoryTheory.kernelOpOp @[simps!] def cokernelOpOp : cokernel f.op ≅ Opposite.op (kernel f) := (cokernelOpUnop f).op.symm #align category_theory.cokernel_op_op CategoryTheory.cokernelOpOp @[simps!] def kernelUnopUnop : kernel g.unop ≅ (cokernel g).unop := (kernelUnopOp g).unop.symm #align category_theory.kernel_unop_unop CategoryTheory.kernelUnopUnop theorem kernel.ι_unop : (kernel.ι g.unop).op = eqToHom (Opposite.op_unop _) ≫ cokernel.π g ≫ (kernelUnopOp g).inv := by simp #align category_theory.kernel.ι_unop CategoryTheory.kernel.ι_unop
Mathlib/CategoryTheory/Abelian/Opposite.lean
129
132
theorem cokernel.π_unop : (cokernel.π g.unop).op = (cokernelUnopOp g).hom ≫ kernel.ι g ≫ eqToHom (Opposite.op_unop _).symm := by
simp
1
2.718282
0
0
4
133
import Mathlib.CategoryTheory.Monoidal.Mon_ import Mathlib.CategoryTheory.Monoidal.Braided.Opposite import Mathlib.CategoryTheory.Monoidal.Transport import Mathlib.CategoryTheory.Monoidal.CoherenceLemmas import Mathlib.CategoryTheory.Limits.Shapes.Terminal universe v₁ v₂ u₁ u₂ u open CategoryTheory MonoidalCategory variable (C : Type u₁) [Category.{v₁} C] [MonoidalCategory.{v₁} C] structure Comon_ where X : C counit : X ⟶ 𝟙_ C comul : X ⟶ X ⊗ X counit_comul : comul ≫ (counit ▷ X) = (λ_ X).inv := by aesop_cat comul_counit : comul ≫ (X ◁ counit) = (ρ_ X).inv := by aesop_cat comul_assoc : comul ≫ (X ◁ comul) ≫ (α_ X X X).inv = comul ≫ (comul ▷ X) := by aesop_cat attribute [reassoc (attr := simp)] Comon_.counit_comul Comon_.comul_counit attribute [reassoc (attr := simp)] Comon_.comul_assoc namespace Comon_ @[simps] def trivial : Comon_ C where X := 𝟙_ C counit := 𝟙 _ comul := (λ_ _).inv comul_assoc := by coherence counit_comul := by coherence comul_counit := by coherence instance : Inhabited (Comon_ C) := ⟨trivial C⟩ variable {C} variable {M : Comon_ C} @[reassoc (attr := simp)]
Mathlib/CategoryTheory/Monoidal/Comon_.lean
73
74
theorem counit_comul_hom {Z : C} (f : M.X ⟶ Z) : M.comul ≫ (M.counit ⊗ f) = f ≫ (λ_ Z).inv := by
rw [leftUnitor_inv_naturality, tensorHom_def, counit_comul_assoc]
1
2.718282
0
0
2
134
import Mathlib.CategoryTheory.Monoidal.Mon_ import Mathlib.CategoryTheory.Monoidal.Braided.Opposite import Mathlib.CategoryTheory.Monoidal.Transport import Mathlib.CategoryTheory.Monoidal.CoherenceLemmas import Mathlib.CategoryTheory.Limits.Shapes.Terminal universe v₁ v₂ u₁ u₂ u open CategoryTheory MonoidalCategory variable (C : Type u₁) [Category.{v₁} C] [MonoidalCategory.{v₁} C] structure Comon_ where X : C counit : X ⟶ 𝟙_ C comul : X ⟶ X ⊗ X counit_comul : comul ≫ (counit ▷ X) = (λ_ X).inv := by aesop_cat comul_counit : comul ≫ (X ◁ counit) = (ρ_ X).inv := by aesop_cat comul_assoc : comul ≫ (X ◁ comul) ≫ (α_ X X X).inv = comul ≫ (comul ▷ X) := by aesop_cat attribute [reassoc (attr := simp)] Comon_.counit_comul Comon_.comul_counit attribute [reassoc (attr := simp)] Comon_.comul_assoc namespace Comon_ @[simps] def trivial : Comon_ C where X := 𝟙_ C counit := 𝟙 _ comul := (λ_ _).inv comul_assoc := by coherence counit_comul := by coherence comul_counit := by coherence instance : Inhabited (Comon_ C) := ⟨trivial C⟩ variable {C} variable {M : Comon_ C} @[reassoc (attr := simp)] theorem counit_comul_hom {Z : C} (f : M.X ⟶ Z) : M.comul ≫ (M.counit ⊗ f) = f ≫ (λ_ Z).inv := by rw [leftUnitor_inv_naturality, tensorHom_def, counit_comul_assoc] @[reassoc (attr := simp)]
Mathlib/CategoryTheory/Monoidal/Comon_.lean
77
78
theorem comul_counit_hom {Z : C} (f : M.X ⟶ Z) : M.comul ≫ (f ⊗ M.counit) = f ≫ (ρ_ Z).inv := by
rw [rightUnitor_inv_naturality, tensorHom_def', comul_counit_assoc]
1
2.718282
0
0
2
134
import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle #align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" open Set noncomputable section namespace Complex theorem isHomeomorphicTrivialFiberBundle_re : IsHomeomorphicTrivialFiberBundle ℝ re := ⟨equivRealProdCLM.toHomeomorph, fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_re Complex.isHomeomorphicTrivialFiberBundle_re theorem isHomeomorphicTrivialFiberBundle_im : IsHomeomorphicTrivialFiberBundle ℝ im := ⟨equivRealProdCLM.toHomeomorph.trans (Homeomorph.prodComm ℝ ℝ), fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_im Complex.isHomeomorphicTrivialFiberBundle_im theorem isOpenMap_re : IsOpenMap re := isHomeomorphicTrivialFiberBundle_re.isOpenMap_proj #align complex.is_open_map_re Complex.isOpenMap_re theorem isOpenMap_im : IsOpenMap im := isHomeomorphicTrivialFiberBundle_im.isOpenMap_proj #align complex.is_open_map_im Complex.isOpenMap_im theorem quotientMap_re : QuotientMap re := isHomeomorphicTrivialFiberBundle_re.quotientMap_proj #align complex.quotient_map_re Complex.quotientMap_re theorem quotientMap_im : QuotientMap im := isHomeomorphicTrivialFiberBundle_im.quotientMap_proj #align complex.quotient_map_im Complex.quotientMap_im theorem interior_preimage_re (s : Set ℝ) : interior (re ⁻¹' s) = re ⁻¹' interior s := (isOpenMap_re.preimage_interior_eq_interior_preimage continuous_re _).symm #align complex.interior_preimage_re Complex.interior_preimage_re theorem interior_preimage_im (s : Set ℝ) : interior (im ⁻¹' s) = im ⁻¹' interior s := (isOpenMap_im.preimage_interior_eq_interior_preimage continuous_im _).symm #align complex.interior_preimage_im Complex.interior_preimage_im theorem closure_preimage_re (s : Set ℝ) : closure (re ⁻¹' s) = re ⁻¹' closure s := (isOpenMap_re.preimage_closure_eq_closure_preimage continuous_re _).symm #align complex.closure_preimage_re Complex.closure_preimage_re theorem closure_preimage_im (s : Set ℝ) : closure (im ⁻¹' s) = im ⁻¹' closure s := (isOpenMap_im.preimage_closure_eq_closure_preimage continuous_im _).symm #align complex.closure_preimage_im Complex.closure_preimage_im theorem frontier_preimage_re (s : Set ℝ) : frontier (re ⁻¹' s) = re ⁻¹' frontier s := (isOpenMap_re.preimage_frontier_eq_frontier_preimage continuous_re _).symm #align complex.frontier_preimage_re Complex.frontier_preimage_re theorem frontier_preimage_im (s : Set ℝ) : frontier (im ⁻¹' s) = im ⁻¹' frontier s := (isOpenMap_im.preimage_frontier_eq_frontier_preimage continuous_im _).symm #align complex.frontier_preimage_im Complex.frontier_preimage_im @[simp]
Mathlib/Analysis/Complex/ReImTopology.lean
94
95
theorem interior_setOf_re_le (a : ℝ) : interior { z : ℂ | z.re ≤ a } = { z | z.re < a } := by
simpa only [interior_Iic] using interior_preimage_re (Iic a)
1
2.718282
0
0
10
135
import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle #align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" open Set noncomputable section namespace Complex theorem isHomeomorphicTrivialFiberBundle_re : IsHomeomorphicTrivialFiberBundle ℝ re := ⟨equivRealProdCLM.toHomeomorph, fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_re Complex.isHomeomorphicTrivialFiberBundle_re theorem isHomeomorphicTrivialFiberBundle_im : IsHomeomorphicTrivialFiberBundle ℝ im := ⟨equivRealProdCLM.toHomeomorph.trans (Homeomorph.prodComm ℝ ℝ), fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_im Complex.isHomeomorphicTrivialFiberBundle_im theorem isOpenMap_re : IsOpenMap re := isHomeomorphicTrivialFiberBundle_re.isOpenMap_proj #align complex.is_open_map_re Complex.isOpenMap_re theorem isOpenMap_im : IsOpenMap im := isHomeomorphicTrivialFiberBundle_im.isOpenMap_proj #align complex.is_open_map_im Complex.isOpenMap_im theorem quotientMap_re : QuotientMap re := isHomeomorphicTrivialFiberBundle_re.quotientMap_proj #align complex.quotient_map_re Complex.quotientMap_re theorem quotientMap_im : QuotientMap im := isHomeomorphicTrivialFiberBundle_im.quotientMap_proj #align complex.quotient_map_im Complex.quotientMap_im theorem interior_preimage_re (s : Set ℝ) : interior (re ⁻¹' s) = re ⁻¹' interior s := (isOpenMap_re.preimage_interior_eq_interior_preimage continuous_re _).symm #align complex.interior_preimage_re Complex.interior_preimage_re theorem interior_preimage_im (s : Set ℝ) : interior (im ⁻¹' s) = im ⁻¹' interior s := (isOpenMap_im.preimage_interior_eq_interior_preimage continuous_im _).symm #align complex.interior_preimage_im Complex.interior_preimage_im theorem closure_preimage_re (s : Set ℝ) : closure (re ⁻¹' s) = re ⁻¹' closure s := (isOpenMap_re.preimage_closure_eq_closure_preimage continuous_re _).symm #align complex.closure_preimage_re Complex.closure_preimage_re theorem closure_preimage_im (s : Set ℝ) : closure (im ⁻¹' s) = im ⁻¹' closure s := (isOpenMap_im.preimage_closure_eq_closure_preimage continuous_im _).symm #align complex.closure_preimage_im Complex.closure_preimage_im theorem frontier_preimage_re (s : Set ℝ) : frontier (re ⁻¹' s) = re ⁻¹' frontier s := (isOpenMap_re.preimage_frontier_eq_frontier_preimage continuous_re _).symm #align complex.frontier_preimage_re Complex.frontier_preimage_re theorem frontier_preimage_im (s : Set ℝ) : frontier (im ⁻¹' s) = im ⁻¹' frontier s := (isOpenMap_im.preimage_frontier_eq_frontier_preimage continuous_im _).symm #align complex.frontier_preimage_im Complex.frontier_preimage_im @[simp] theorem interior_setOf_re_le (a : ℝ) : interior { z : ℂ | z.re ≤ a } = { z | z.re < a } := by simpa only [interior_Iic] using interior_preimage_re (Iic a) #align complex.interior_set_of_re_le Complex.interior_setOf_re_le @[simp]
Mathlib/Analysis/Complex/ReImTopology.lean
99
100
theorem interior_setOf_im_le (a : ℝ) : interior { z : ℂ | z.im ≤ a } = { z | z.im < a } := by
simpa only [interior_Iic] using interior_preimage_im (Iic a)
1
2.718282
0
0
10
135
import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle #align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" open Set noncomputable section namespace Complex theorem isHomeomorphicTrivialFiberBundle_re : IsHomeomorphicTrivialFiberBundle ℝ re := ⟨equivRealProdCLM.toHomeomorph, fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_re Complex.isHomeomorphicTrivialFiberBundle_re theorem isHomeomorphicTrivialFiberBundle_im : IsHomeomorphicTrivialFiberBundle ℝ im := ⟨equivRealProdCLM.toHomeomorph.trans (Homeomorph.prodComm ℝ ℝ), fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_im Complex.isHomeomorphicTrivialFiberBundle_im theorem isOpenMap_re : IsOpenMap re := isHomeomorphicTrivialFiberBundle_re.isOpenMap_proj #align complex.is_open_map_re Complex.isOpenMap_re theorem isOpenMap_im : IsOpenMap im := isHomeomorphicTrivialFiberBundle_im.isOpenMap_proj #align complex.is_open_map_im Complex.isOpenMap_im theorem quotientMap_re : QuotientMap re := isHomeomorphicTrivialFiberBundle_re.quotientMap_proj #align complex.quotient_map_re Complex.quotientMap_re theorem quotientMap_im : QuotientMap im := isHomeomorphicTrivialFiberBundle_im.quotientMap_proj #align complex.quotient_map_im Complex.quotientMap_im theorem interior_preimage_re (s : Set ℝ) : interior (re ⁻¹' s) = re ⁻¹' interior s := (isOpenMap_re.preimage_interior_eq_interior_preimage continuous_re _).symm #align complex.interior_preimage_re Complex.interior_preimage_re theorem interior_preimage_im (s : Set ℝ) : interior (im ⁻¹' s) = im ⁻¹' interior s := (isOpenMap_im.preimage_interior_eq_interior_preimage continuous_im _).symm #align complex.interior_preimage_im Complex.interior_preimage_im theorem closure_preimage_re (s : Set ℝ) : closure (re ⁻¹' s) = re ⁻¹' closure s := (isOpenMap_re.preimage_closure_eq_closure_preimage continuous_re _).symm #align complex.closure_preimage_re Complex.closure_preimage_re theorem closure_preimage_im (s : Set ℝ) : closure (im ⁻¹' s) = im ⁻¹' closure s := (isOpenMap_im.preimage_closure_eq_closure_preimage continuous_im _).symm #align complex.closure_preimage_im Complex.closure_preimage_im theorem frontier_preimage_re (s : Set ℝ) : frontier (re ⁻¹' s) = re ⁻¹' frontier s := (isOpenMap_re.preimage_frontier_eq_frontier_preimage continuous_re _).symm #align complex.frontier_preimage_re Complex.frontier_preimage_re theorem frontier_preimage_im (s : Set ℝ) : frontier (im ⁻¹' s) = im ⁻¹' frontier s := (isOpenMap_im.preimage_frontier_eq_frontier_preimage continuous_im _).symm #align complex.frontier_preimage_im Complex.frontier_preimage_im @[simp] theorem interior_setOf_re_le (a : ℝ) : interior { z : ℂ | z.re ≤ a } = { z | z.re < a } := by simpa only [interior_Iic] using interior_preimage_re (Iic a) #align complex.interior_set_of_re_le Complex.interior_setOf_re_le @[simp] theorem interior_setOf_im_le (a : ℝ) : interior { z : ℂ | z.im ≤ a } = { z | z.im < a } := by simpa only [interior_Iic] using interior_preimage_im (Iic a) #align complex.interior_set_of_im_le Complex.interior_setOf_im_le @[simp]
Mathlib/Analysis/Complex/ReImTopology.lean
104
105
theorem interior_setOf_le_re (a : ℝ) : interior { z : ℂ | a ≤ z.re } = { z | a < z.re } := by
simpa only [interior_Ici] using interior_preimage_re (Ici a)
1
2.718282
0
0
10
135
import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle #align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" open Set noncomputable section namespace Complex theorem isHomeomorphicTrivialFiberBundle_re : IsHomeomorphicTrivialFiberBundle ℝ re := ⟨equivRealProdCLM.toHomeomorph, fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_re Complex.isHomeomorphicTrivialFiberBundle_re theorem isHomeomorphicTrivialFiberBundle_im : IsHomeomorphicTrivialFiberBundle ℝ im := ⟨equivRealProdCLM.toHomeomorph.trans (Homeomorph.prodComm ℝ ℝ), fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_im Complex.isHomeomorphicTrivialFiberBundle_im theorem isOpenMap_re : IsOpenMap re := isHomeomorphicTrivialFiberBundle_re.isOpenMap_proj #align complex.is_open_map_re Complex.isOpenMap_re theorem isOpenMap_im : IsOpenMap im := isHomeomorphicTrivialFiberBundle_im.isOpenMap_proj #align complex.is_open_map_im Complex.isOpenMap_im theorem quotientMap_re : QuotientMap re := isHomeomorphicTrivialFiberBundle_re.quotientMap_proj #align complex.quotient_map_re Complex.quotientMap_re theorem quotientMap_im : QuotientMap im := isHomeomorphicTrivialFiberBundle_im.quotientMap_proj #align complex.quotient_map_im Complex.quotientMap_im theorem interior_preimage_re (s : Set ℝ) : interior (re ⁻¹' s) = re ⁻¹' interior s := (isOpenMap_re.preimage_interior_eq_interior_preimage continuous_re _).symm #align complex.interior_preimage_re Complex.interior_preimage_re theorem interior_preimage_im (s : Set ℝ) : interior (im ⁻¹' s) = im ⁻¹' interior s := (isOpenMap_im.preimage_interior_eq_interior_preimage continuous_im _).symm #align complex.interior_preimage_im Complex.interior_preimage_im theorem closure_preimage_re (s : Set ℝ) : closure (re ⁻¹' s) = re ⁻¹' closure s := (isOpenMap_re.preimage_closure_eq_closure_preimage continuous_re _).symm #align complex.closure_preimage_re Complex.closure_preimage_re theorem closure_preimage_im (s : Set ℝ) : closure (im ⁻¹' s) = im ⁻¹' closure s := (isOpenMap_im.preimage_closure_eq_closure_preimage continuous_im _).symm #align complex.closure_preimage_im Complex.closure_preimage_im theorem frontier_preimage_re (s : Set ℝ) : frontier (re ⁻¹' s) = re ⁻¹' frontier s := (isOpenMap_re.preimage_frontier_eq_frontier_preimage continuous_re _).symm #align complex.frontier_preimage_re Complex.frontier_preimage_re theorem frontier_preimage_im (s : Set ℝ) : frontier (im ⁻¹' s) = im ⁻¹' frontier s := (isOpenMap_im.preimage_frontier_eq_frontier_preimage continuous_im _).symm #align complex.frontier_preimage_im Complex.frontier_preimage_im @[simp] theorem interior_setOf_re_le (a : ℝ) : interior { z : ℂ | z.re ≤ a } = { z | z.re < a } := by simpa only [interior_Iic] using interior_preimage_re (Iic a) #align complex.interior_set_of_re_le Complex.interior_setOf_re_le @[simp] theorem interior_setOf_im_le (a : ℝ) : interior { z : ℂ | z.im ≤ a } = { z | z.im < a } := by simpa only [interior_Iic] using interior_preimage_im (Iic a) #align complex.interior_set_of_im_le Complex.interior_setOf_im_le @[simp] theorem interior_setOf_le_re (a : ℝ) : interior { z : ℂ | a ≤ z.re } = { z | a < z.re } := by simpa only [interior_Ici] using interior_preimage_re (Ici a) #align complex.interior_set_of_le_re Complex.interior_setOf_le_re @[simp]
Mathlib/Analysis/Complex/ReImTopology.lean
109
110
theorem interior_setOf_le_im (a : ℝ) : interior { z : ℂ | a ≤ z.im } = { z | a < z.im } := by
simpa only [interior_Ici] using interior_preimage_im (Ici a)
1
2.718282
0
0
10
135
import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle #align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" open Set noncomputable section namespace Complex theorem isHomeomorphicTrivialFiberBundle_re : IsHomeomorphicTrivialFiberBundle ℝ re := ⟨equivRealProdCLM.toHomeomorph, fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_re Complex.isHomeomorphicTrivialFiberBundle_re theorem isHomeomorphicTrivialFiberBundle_im : IsHomeomorphicTrivialFiberBundle ℝ im := ⟨equivRealProdCLM.toHomeomorph.trans (Homeomorph.prodComm ℝ ℝ), fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_im Complex.isHomeomorphicTrivialFiberBundle_im theorem isOpenMap_re : IsOpenMap re := isHomeomorphicTrivialFiberBundle_re.isOpenMap_proj #align complex.is_open_map_re Complex.isOpenMap_re theorem isOpenMap_im : IsOpenMap im := isHomeomorphicTrivialFiberBundle_im.isOpenMap_proj #align complex.is_open_map_im Complex.isOpenMap_im theorem quotientMap_re : QuotientMap re := isHomeomorphicTrivialFiberBundle_re.quotientMap_proj #align complex.quotient_map_re Complex.quotientMap_re theorem quotientMap_im : QuotientMap im := isHomeomorphicTrivialFiberBundle_im.quotientMap_proj #align complex.quotient_map_im Complex.quotientMap_im theorem interior_preimage_re (s : Set ℝ) : interior (re ⁻¹' s) = re ⁻¹' interior s := (isOpenMap_re.preimage_interior_eq_interior_preimage continuous_re _).symm #align complex.interior_preimage_re Complex.interior_preimage_re theorem interior_preimage_im (s : Set ℝ) : interior (im ⁻¹' s) = im ⁻¹' interior s := (isOpenMap_im.preimage_interior_eq_interior_preimage continuous_im _).symm #align complex.interior_preimage_im Complex.interior_preimage_im theorem closure_preimage_re (s : Set ℝ) : closure (re ⁻¹' s) = re ⁻¹' closure s := (isOpenMap_re.preimage_closure_eq_closure_preimage continuous_re _).symm #align complex.closure_preimage_re Complex.closure_preimage_re theorem closure_preimage_im (s : Set ℝ) : closure (im ⁻¹' s) = im ⁻¹' closure s := (isOpenMap_im.preimage_closure_eq_closure_preimage continuous_im _).symm #align complex.closure_preimage_im Complex.closure_preimage_im theorem frontier_preimage_re (s : Set ℝ) : frontier (re ⁻¹' s) = re ⁻¹' frontier s := (isOpenMap_re.preimage_frontier_eq_frontier_preimage continuous_re _).symm #align complex.frontier_preimage_re Complex.frontier_preimage_re theorem frontier_preimage_im (s : Set ℝ) : frontier (im ⁻¹' s) = im ⁻¹' frontier s := (isOpenMap_im.preimage_frontier_eq_frontier_preimage continuous_im _).symm #align complex.frontier_preimage_im Complex.frontier_preimage_im @[simp] theorem interior_setOf_re_le (a : ℝ) : interior { z : ℂ | z.re ≤ a } = { z | z.re < a } := by simpa only [interior_Iic] using interior_preimage_re (Iic a) #align complex.interior_set_of_re_le Complex.interior_setOf_re_le @[simp] theorem interior_setOf_im_le (a : ℝ) : interior { z : ℂ | z.im ≤ a } = { z | z.im < a } := by simpa only [interior_Iic] using interior_preimage_im (Iic a) #align complex.interior_set_of_im_le Complex.interior_setOf_im_le @[simp] theorem interior_setOf_le_re (a : ℝ) : interior { z : ℂ | a ≤ z.re } = { z | a < z.re } := by simpa only [interior_Ici] using interior_preimage_re (Ici a) #align complex.interior_set_of_le_re Complex.interior_setOf_le_re @[simp] theorem interior_setOf_le_im (a : ℝ) : interior { z : ℂ | a ≤ z.im } = { z | a < z.im } := by simpa only [interior_Ici] using interior_preimage_im (Ici a) #align complex.interior_set_of_le_im Complex.interior_setOf_le_im @[simp]
Mathlib/Analysis/Complex/ReImTopology.lean
114
115
theorem closure_setOf_re_lt (a : ℝ) : closure { z : ℂ | z.re < a } = { z | z.re ≤ a } := by
simpa only [closure_Iio] using closure_preimage_re (Iio a)
1
2.718282
0
0
10
135
import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle #align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" open Set noncomputable section namespace Complex theorem isHomeomorphicTrivialFiberBundle_re : IsHomeomorphicTrivialFiberBundle ℝ re := ⟨equivRealProdCLM.toHomeomorph, fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_re Complex.isHomeomorphicTrivialFiberBundle_re theorem isHomeomorphicTrivialFiberBundle_im : IsHomeomorphicTrivialFiberBundle ℝ im := ⟨equivRealProdCLM.toHomeomorph.trans (Homeomorph.prodComm ℝ ℝ), fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_im Complex.isHomeomorphicTrivialFiberBundle_im theorem isOpenMap_re : IsOpenMap re := isHomeomorphicTrivialFiberBundle_re.isOpenMap_proj #align complex.is_open_map_re Complex.isOpenMap_re theorem isOpenMap_im : IsOpenMap im := isHomeomorphicTrivialFiberBundle_im.isOpenMap_proj #align complex.is_open_map_im Complex.isOpenMap_im theorem quotientMap_re : QuotientMap re := isHomeomorphicTrivialFiberBundle_re.quotientMap_proj #align complex.quotient_map_re Complex.quotientMap_re theorem quotientMap_im : QuotientMap im := isHomeomorphicTrivialFiberBundle_im.quotientMap_proj #align complex.quotient_map_im Complex.quotientMap_im theorem interior_preimage_re (s : Set ℝ) : interior (re ⁻¹' s) = re ⁻¹' interior s := (isOpenMap_re.preimage_interior_eq_interior_preimage continuous_re _).symm #align complex.interior_preimage_re Complex.interior_preimage_re theorem interior_preimage_im (s : Set ℝ) : interior (im ⁻¹' s) = im ⁻¹' interior s := (isOpenMap_im.preimage_interior_eq_interior_preimage continuous_im _).symm #align complex.interior_preimage_im Complex.interior_preimage_im theorem closure_preimage_re (s : Set ℝ) : closure (re ⁻¹' s) = re ⁻¹' closure s := (isOpenMap_re.preimage_closure_eq_closure_preimage continuous_re _).symm #align complex.closure_preimage_re Complex.closure_preimage_re theorem closure_preimage_im (s : Set ℝ) : closure (im ⁻¹' s) = im ⁻¹' closure s := (isOpenMap_im.preimage_closure_eq_closure_preimage continuous_im _).symm #align complex.closure_preimage_im Complex.closure_preimage_im theorem frontier_preimage_re (s : Set ℝ) : frontier (re ⁻¹' s) = re ⁻¹' frontier s := (isOpenMap_re.preimage_frontier_eq_frontier_preimage continuous_re _).symm #align complex.frontier_preimage_re Complex.frontier_preimage_re theorem frontier_preimage_im (s : Set ℝ) : frontier (im ⁻¹' s) = im ⁻¹' frontier s := (isOpenMap_im.preimage_frontier_eq_frontier_preimage continuous_im _).symm #align complex.frontier_preimage_im Complex.frontier_preimage_im @[simp] theorem interior_setOf_re_le (a : ℝ) : interior { z : ℂ | z.re ≤ a } = { z | z.re < a } := by simpa only [interior_Iic] using interior_preimage_re (Iic a) #align complex.interior_set_of_re_le Complex.interior_setOf_re_le @[simp] theorem interior_setOf_im_le (a : ℝ) : interior { z : ℂ | z.im ≤ a } = { z | z.im < a } := by simpa only [interior_Iic] using interior_preimage_im (Iic a) #align complex.interior_set_of_im_le Complex.interior_setOf_im_le @[simp] theorem interior_setOf_le_re (a : ℝ) : interior { z : ℂ | a ≤ z.re } = { z | a < z.re } := by simpa only [interior_Ici] using interior_preimage_re (Ici a) #align complex.interior_set_of_le_re Complex.interior_setOf_le_re @[simp] theorem interior_setOf_le_im (a : ℝ) : interior { z : ℂ | a ≤ z.im } = { z | a < z.im } := by simpa only [interior_Ici] using interior_preimage_im (Ici a) #align complex.interior_set_of_le_im Complex.interior_setOf_le_im @[simp] theorem closure_setOf_re_lt (a : ℝ) : closure { z : ℂ | z.re < a } = { z | z.re ≤ a } := by simpa only [closure_Iio] using closure_preimage_re (Iio a) #align complex.closure_set_of_re_lt Complex.closure_setOf_re_lt @[simp]
Mathlib/Analysis/Complex/ReImTopology.lean
119
120
theorem closure_setOf_im_lt (a : ℝ) : closure { z : ℂ | z.im < a } = { z | z.im ≤ a } := by
simpa only [closure_Iio] using closure_preimage_im (Iio a)
1
2.718282
0
0
10
135
import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle #align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" open Set noncomputable section namespace Complex theorem isHomeomorphicTrivialFiberBundle_re : IsHomeomorphicTrivialFiberBundle ℝ re := ⟨equivRealProdCLM.toHomeomorph, fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_re Complex.isHomeomorphicTrivialFiberBundle_re theorem isHomeomorphicTrivialFiberBundle_im : IsHomeomorphicTrivialFiberBundle ℝ im := ⟨equivRealProdCLM.toHomeomorph.trans (Homeomorph.prodComm ℝ ℝ), fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_im Complex.isHomeomorphicTrivialFiberBundle_im theorem isOpenMap_re : IsOpenMap re := isHomeomorphicTrivialFiberBundle_re.isOpenMap_proj #align complex.is_open_map_re Complex.isOpenMap_re theorem isOpenMap_im : IsOpenMap im := isHomeomorphicTrivialFiberBundle_im.isOpenMap_proj #align complex.is_open_map_im Complex.isOpenMap_im theorem quotientMap_re : QuotientMap re := isHomeomorphicTrivialFiberBundle_re.quotientMap_proj #align complex.quotient_map_re Complex.quotientMap_re theorem quotientMap_im : QuotientMap im := isHomeomorphicTrivialFiberBundle_im.quotientMap_proj #align complex.quotient_map_im Complex.quotientMap_im theorem interior_preimage_re (s : Set ℝ) : interior (re ⁻¹' s) = re ⁻¹' interior s := (isOpenMap_re.preimage_interior_eq_interior_preimage continuous_re _).symm #align complex.interior_preimage_re Complex.interior_preimage_re theorem interior_preimage_im (s : Set ℝ) : interior (im ⁻¹' s) = im ⁻¹' interior s := (isOpenMap_im.preimage_interior_eq_interior_preimage continuous_im _).symm #align complex.interior_preimage_im Complex.interior_preimage_im theorem closure_preimage_re (s : Set ℝ) : closure (re ⁻¹' s) = re ⁻¹' closure s := (isOpenMap_re.preimage_closure_eq_closure_preimage continuous_re _).symm #align complex.closure_preimage_re Complex.closure_preimage_re theorem closure_preimage_im (s : Set ℝ) : closure (im ⁻¹' s) = im ⁻¹' closure s := (isOpenMap_im.preimage_closure_eq_closure_preimage continuous_im _).symm #align complex.closure_preimage_im Complex.closure_preimage_im theorem frontier_preimage_re (s : Set ℝ) : frontier (re ⁻¹' s) = re ⁻¹' frontier s := (isOpenMap_re.preimage_frontier_eq_frontier_preimage continuous_re _).symm #align complex.frontier_preimage_re Complex.frontier_preimage_re theorem frontier_preimage_im (s : Set ℝ) : frontier (im ⁻¹' s) = im ⁻¹' frontier s := (isOpenMap_im.preimage_frontier_eq_frontier_preimage continuous_im _).symm #align complex.frontier_preimage_im Complex.frontier_preimage_im @[simp] theorem interior_setOf_re_le (a : ℝ) : interior { z : ℂ | z.re ≤ a } = { z | z.re < a } := by simpa only [interior_Iic] using interior_preimage_re (Iic a) #align complex.interior_set_of_re_le Complex.interior_setOf_re_le @[simp] theorem interior_setOf_im_le (a : ℝ) : interior { z : ℂ | z.im ≤ a } = { z | z.im < a } := by simpa only [interior_Iic] using interior_preimage_im (Iic a) #align complex.interior_set_of_im_le Complex.interior_setOf_im_le @[simp] theorem interior_setOf_le_re (a : ℝ) : interior { z : ℂ | a ≤ z.re } = { z | a < z.re } := by simpa only [interior_Ici] using interior_preimage_re (Ici a) #align complex.interior_set_of_le_re Complex.interior_setOf_le_re @[simp] theorem interior_setOf_le_im (a : ℝ) : interior { z : ℂ | a ≤ z.im } = { z | a < z.im } := by simpa only [interior_Ici] using interior_preimage_im (Ici a) #align complex.interior_set_of_le_im Complex.interior_setOf_le_im @[simp] theorem closure_setOf_re_lt (a : ℝ) : closure { z : ℂ | z.re < a } = { z | z.re ≤ a } := by simpa only [closure_Iio] using closure_preimage_re (Iio a) #align complex.closure_set_of_re_lt Complex.closure_setOf_re_lt @[simp] theorem closure_setOf_im_lt (a : ℝ) : closure { z : ℂ | z.im < a } = { z | z.im ≤ a } := by simpa only [closure_Iio] using closure_preimage_im (Iio a) #align complex.closure_set_of_im_lt Complex.closure_setOf_im_lt @[simp]
Mathlib/Analysis/Complex/ReImTopology.lean
124
125
theorem closure_setOf_lt_re (a : ℝ) : closure { z : ℂ | a < z.re } = { z | a ≤ z.re } := by
simpa only [closure_Ioi] using closure_preimage_re (Ioi a)
1
2.718282
0
0
10
135
import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle #align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" open Set noncomputable section namespace Complex theorem isHomeomorphicTrivialFiberBundle_re : IsHomeomorphicTrivialFiberBundle ℝ re := ⟨equivRealProdCLM.toHomeomorph, fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_re Complex.isHomeomorphicTrivialFiberBundle_re theorem isHomeomorphicTrivialFiberBundle_im : IsHomeomorphicTrivialFiberBundle ℝ im := ⟨equivRealProdCLM.toHomeomorph.trans (Homeomorph.prodComm ℝ ℝ), fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_im Complex.isHomeomorphicTrivialFiberBundle_im theorem isOpenMap_re : IsOpenMap re := isHomeomorphicTrivialFiberBundle_re.isOpenMap_proj #align complex.is_open_map_re Complex.isOpenMap_re theorem isOpenMap_im : IsOpenMap im := isHomeomorphicTrivialFiberBundle_im.isOpenMap_proj #align complex.is_open_map_im Complex.isOpenMap_im theorem quotientMap_re : QuotientMap re := isHomeomorphicTrivialFiberBundle_re.quotientMap_proj #align complex.quotient_map_re Complex.quotientMap_re theorem quotientMap_im : QuotientMap im := isHomeomorphicTrivialFiberBundle_im.quotientMap_proj #align complex.quotient_map_im Complex.quotientMap_im theorem interior_preimage_re (s : Set ℝ) : interior (re ⁻¹' s) = re ⁻¹' interior s := (isOpenMap_re.preimage_interior_eq_interior_preimage continuous_re _).symm #align complex.interior_preimage_re Complex.interior_preimage_re theorem interior_preimage_im (s : Set ℝ) : interior (im ⁻¹' s) = im ⁻¹' interior s := (isOpenMap_im.preimage_interior_eq_interior_preimage continuous_im _).symm #align complex.interior_preimage_im Complex.interior_preimage_im theorem closure_preimage_re (s : Set ℝ) : closure (re ⁻¹' s) = re ⁻¹' closure s := (isOpenMap_re.preimage_closure_eq_closure_preimage continuous_re _).symm #align complex.closure_preimage_re Complex.closure_preimage_re theorem closure_preimage_im (s : Set ℝ) : closure (im ⁻¹' s) = im ⁻¹' closure s := (isOpenMap_im.preimage_closure_eq_closure_preimage continuous_im _).symm #align complex.closure_preimage_im Complex.closure_preimage_im theorem frontier_preimage_re (s : Set ℝ) : frontier (re ⁻¹' s) = re ⁻¹' frontier s := (isOpenMap_re.preimage_frontier_eq_frontier_preimage continuous_re _).symm #align complex.frontier_preimage_re Complex.frontier_preimage_re theorem frontier_preimage_im (s : Set ℝ) : frontier (im ⁻¹' s) = im ⁻¹' frontier s := (isOpenMap_im.preimage_frontier_eq_frontier_preimage continuous_im _).symm #align complex.frontier_preimage_im Complex.frontier_preimage_im @[simp] theorem interior_setOf_re_le (a : ℝ) : interior { z : ℂ | z.re ≤ a } = { z | z.re < a } := by simpa only [interior_Iic] using interior_preimage_re (Iic a) #align complex.interior_set_of_re_le Complex.interior_setOf_re_le @[simp] theorem interior_setOf_im_le (a : ℝ) : interior { z : ℂ | z.im ≤ a } = { z | z.im < a } := by simpa only [interior_Iic] using interior_preimage_im (Iic a) #align complex.interior_set_of_im_le Complex.interior_setOf_im_le @[simp] theorem interior_setOf_le_re (a : ℝ) : interior { z : ℂ | a ≤ z.re } = { z | a < z.re } := by simpa only [interior_Ici] using interior_preimage_re (Ici a) #align complex.interior_set_of_le_re Complex.interior_setOf_le_re @[simp] theorem interior_setOf_le_im (a : ℝ) : interior { z : ℂ | a ≤ z.im } = { z | a < z.im } := by simpa only [interior_Ici] using interior_preimage_im (Ici a) #align complex.interior_set_of_le_im Complex.interior_setOf_le_im @[simp] theorem closure_setOf_re_lt (a : ℝ) : closure { z : ℂ | z.re < a } = { z | z.re ≤ a } := by simpa only [closure_Iio] using closure_preimage_re (Iio a) #align complex.closure_set_of_re_lt Complex.closure_setOf_re_lt @[simp] theorem closure_setOf_im_lt (a : ℝ) : closure { z : ℂ | z.im < a } = { z | z.im ≤ a } := by simpa only [closure_Iio] using closure_preimage_im (Iio a) #align complex.closure_set_of_im_lt Complex.closure_setOf_im_lt @[simp] theorem closure_setOf_lt_re (a : ℝ) : closure { z : ℂ | a < z.re } = { z | a ≤ z.re } := by simpa only [closure_Ioi] using closure_preimage_re (Ioi a) #align complex.closure_set_of_lt_re Complex.closure_setOf_lt_re @[simp]
Mathlib/Analysis/Complex/ReImTopology.lean
129
130
theorem closure_setOf_lt_im (a : ℝ) : closure { z : ℂ | a < z.im } = { z | a ≤ z.im } := by
simpa only [closure_Ioi] using closure_preimage_im (Ioi a)
1
2.718282
0
0
10
135
import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle #align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" open Set noncomputable section namespace Complex theorem isHomeomorphicTrivialFiberBundle_re : IsHomeomorphicTrivialFiberBundle ℝ re := ⟨equivRealProdCLM.toHomeomorph, fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_re Complex.isHomeomorphicTrivialFiberBundle_re theorem isHomeomorphicTrivialFiberBundle_im : IsHomeomorphicTrivialFiberBundle ℝ im := ⟨equivRealProdCLM.toHomeomorph.trans (Homeomorph.prodComm ℝ ℝ), fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_im Complex.isHomeomorphicTrivialFiberBundle_im theorem isOpenMap_re : IsOpenMap re := isHomeomorphicTrivialFiberBundle_re.isOpenMap_proj #align complex.is_open_map_re Complex.isOpenMap_re theorem isOpenMap_im : IsOpenMap im := isHomeomorphicTrivialFiberBundle_im.isOpenMap_proj #align complex.is_open_map_im Complex.isOpenMap_im theorem quotientMap_re : QuotientMap re := isHomeomorphicTrivialFiberBundle_re.quotientMap_proj #align complex.quotient_map_re Complex.quotientMap_re theorem quotientMap_im : QuotientMap im := isHomeomorphicTrivialFiberBundle_im.quotientMap_proj #align complex.quotient_map_im Complex.quotientMap_im theorem interior_preimage_re (s : Set ℝ) : interior (re ⁻¹' s) = re ⁻¹' interior s := (isOpenMap_re.preimage_interior_eq_interior_preimage continuous_re _).symm #align complex.interior_preimage_re Complex.interior_preimage_re theorem interior_preimage_im (s : Set ℝ) : interior (im ⁻¹' s) = im ⁻¹' interior s := (isOpenMap_im.preimage_interior_eq_interior_preimage continuous_im _).symm #align complex.interior_preimage_im Complex.interior_preimage_im theorem closure_preimage_re (s : Set ℝ) : closure (re ⁻¹' s) = re ⁻¹' closure s := (isOpenMap_re.preimage_closure_eq_closure_preimage continuous_re _).symm #align complex.closure_preimage_re Complex.closure_preimage_re theorem closure_preimage_im (s : Set ℝ) : closure (im ⁻¹' s) = im ⁻¹' closure s := (isOpenMap_im.preimage_closure_eq_closure_preimage continuous_im _).symm #align complex.closure_preimage_im Complex.closure_preimage_im theorem frontier_preimage_re (s : Set ℝ) : frontier (re ⁻¹' s) = re ⁻¹' frontier s := (isOpenMap_re.preimage_frontier_eq_frontier_preimage continuous_re _).symm #align complex.frontier_preimage_re Complex.frontier_preimage_re theorem frontier_preimage_im (s : Set ℝ) : frontier (im ⁻¹' s) = im ⁻¹' frontier s := (isOpenMap_im.preimage_frontier_eq_frontier_preimage continuous_im _).symm #align complex.frontier_preimage_im Complex.frontier_preimage_im @[simp] theorem interior_setOf_re_le (a : ℝ) : interior { z : ℂ | z.re ≤ a } = { z | z.re < a } := by simpa only [interior_Iic] using interior_preimage_re (Iic a) #align complex.interior_set_of_re_le Complex.interior_setOf_re_le @[simp] theorem interior_setOf_im_le (a : ℝ) : interior { z : ℂ | z.im ≤ a } = { z | z.im < a } := by simpa only [interior_Iic] using interior_preimage_im (Iic a) #align complex.interior_set_of_im_le Complex.interior_setOf_im_le @[simp] theorem interior_setOf_le_re (a : ℝ) : interior { z : ℂ | a ≤ z.re } = { z | a < z.re } := by simpa only [interior_Ici] using interior_preimage_re (Ici a) #align complex.interior_set_of_le_re Complex.interior_setOf_le_re @[simp] theorem interior_setOf_le_im (a : ℝ) : interior { z : ℂ | a ≤ z.im } = { z | a < z.im } := by simpa only [interior_Ici] using interior_preimage_im (Ici a) #align complex.interior_set_of_le_im Complex.interior_setOf_le_im @[simp] theorem closure_setOf_re_lt (a : ℝ) : closure { z : ℂ | z.re < a } = { z | z.re ≤ a } := by simpa only [closure_Iio] using closure_preimage_re (Iio a) #align complex.closure_set_of_re_lt Complex.closure_setOf_re_lt @[simp] theorem closure_setOf_im_lt (a : ℝ) : closure { z : ℂ | z.im < a } = { z | z.im ≤ a } := by simpa only [closure_Iio] using closure_preimage_im (Iio a) #align complex.closure_set_of_im_lt Complex.closure_setOf_im_lt @[simp] theorem closure_setOf_lt_re (a : ℝ) : closure { z : ℂ | a < z.re } = { z | a ≤ z.re } := by simpa only [closure_Ioi] using closure_preimage_re (Ioi a) #align complex.closure_set_of_lt_re Complex.closure_setOf_lt_re @[simp] theorem closure_setOf_lt_im (a : ℝ) : closure { z : ℂ | a < z.im } = { z | a ≤ z.im } := by simpa only [closure_Ioi] using closure_preimage_im (Ioi a) #align complex.closure_set_of_lt_im Complex.closure_setOf_lt_im @[simp]
Mathlib/Analysis/Complex/ReImTopology.lean
134
135
theorem frontier_setOf_re_le (a : ℝ) : frontier { z : ℂ | z.re ≤ a } = { z | z.re = a } := by
simpa only [frontier_Iic] using frontier_preimage_re (Iic a)
1
2.718282
0
0
10
135
import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle #align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" open Set noncomputable section namespace Complex theorem isHomeomorphicTrivialFiberBundle_re : IsHomeomorphicTrivialFiberBundle ℝ re := ⟨equivRealProdCLM.toHomeomorph, fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_re Complex.isHomeomorphicTrivialFiberBundle_re theorem isHomeomorphicTrivialFiberBundle_im : IsHomeomorphicTrivialFiberBundle ℝ im := ⟨equivRealProdCLM.toHomeomorph.trans (Homeomorph.prodComm ℝ ℝ), fun _ => rfl⟩ #align complex.is_homeomorphic_trivial_fiber_bundle_im Complex.isHomeomorphicTrivialFiberBundle_im theorem isOpenMap_re : IsOpenMap re := isHomeomorphicTrivialFiberBundle_re.isOpenMap_proj #align complex.is_open_map_re Complex.isOpenMap_re theorem isOpenMap_im : IsOpenMap im := isHomeomorphicTrivialFiberBundle_im.isOpenMap_proj #align complex.is_open_map_im Complex.isOpenMap_im theorem quotientMap_re : QuotientMap re := isHomeomorphicTrivialFiberBundle_re.quotientMap_proj #align complex.quotient_map_re Complex.quotientMap_re theorem quotientMap_im : QuotientMap im := isHomeomorphicTrivialFiberBundle_im.quotientMap_proj #align complex.quotient_map_im Complex.quotientMap_im theorem interior_preimage_re (s : Set ℝ) : interior (re ⁻¹' s) = re ⁻¹' interior s := (isOpenMap_re.preimage_interior_eq_interior_preimage continuous_re _).symm #align complex.interior_preimage_re Complex.interior_preimage_re theorem interior_preimage_im (s : Set ℝ) : interior (im ⁻¹' s) = im ⁻¹' interior s := (isOpenMap_im.preimage_interior_eq_interior_preimage continuous_im _).symm #align complex.interior_preimage_im Complex.interior_preimage_im theorem closure_preimage_re (s : Set ℝ) : closure (re ⁻¹' s) = re ⁻¹' closure s := (isOpenMap_re.preimage_closure_eq_closure_preimage continuous_re _).symm #align complex.closure_preimage_re Complex.closure_preimage_re theorem closure_preimage_im (s : Set ℝ) : closure (im ⁻¹' s) = im ⁻¹' closure s := (isOpenMap_im.preimage_closure_eq_closure_preimage continuous_im _).symm #align complex.closure_preimage_im Complex.closure_preimage_im theorem frontier_preimage_re (s : Set ℝ) : frontier (re ⁻¹' s) = re ⁻¹' frontier s := (isOpenMap_re.preimage_frontier_eq_frontier_preimage continuous_re _).symm #align complex.frontier_preimage_re Complex.frontier_preimage_re theorem frontier_preimage_im (s : Set ℝ) : frontier (im ⁻¹' s) = im ⁻¹' frontier s := (isOpenMap_im.preimage_frontier_eq_frontier_preimage continuous_im _).symm #align complex.frontier_preimage_im Complex.frontier_preimage_im @[simp] theorem interior_setOf_re_le (a : ℝ) : interior { z : ℂ | z.re ≤ a } = { z | z.re < a } := by simpa only [interior_Iic] using interior_preimage_re (Iic a) #align complex.interior_set_of_re_le Complex.interior_setOf_re_le @[simp] theorem interior_setOf_im_le (a : ℝ) : interior { z : ℂ | z.im ≤ a } = { z | z.im < a } := by simpa only [interior_Iic] using interior_preimage_im (Iic a) #align complex.interior_set_of_im_le Complex.interior_setOf_im_le @[simp] theorem interior_setOf_le_re (a : ℝ) : interior { z : ℂ | a ≤ z.re } = { z | a < z.re } := by simpa only [interior_Ici] using interior_preimage_re (Ici a) #align complex.interior_set_of_le_re Complex.interior_setOf_le_re @[simp] theorem interior_setOf_le_im (a : ℝ) : interior { z : ℂ | a ≤ z.im } = { z | a < z.im } := by simpa only [interior_Ici] using interior_preimage_im (Ici a) #align complex.interior_set_of_le_im Complex.interior_setOf_le_im @[simp] theorem closure_setOf_re_lt (a : ℝ) : closure { z : ℂ | z.re < a } = { z | z.re ≤ a } := by simpa only [closure_Iio] using closure_preimage_re (Iio a) #align complex.closure_set_of_re_lt Complex.closure_setOf_re_lt @[simp] theorem closure_setOf_im_lt (a : ℝ) : closure { z : ℂ | z.im < a } = { z | z.im ≤ a } := by simpa only [closure_Iio] using closure_preimage_im (Iio a) #align complex.closure_set_of_im_lt Complex.closure_setOf_im_lt @[simp] theorem closure_setOf_lt_re (a : ℝ) : closure { z : ℂ | a < z.re } = { z | a ≤ z.re } := by simpa only [closure_Ioi] using closure_preimage_re (Ioi a) #align complex.closure_set_of_lt_re Complex.closure_setOf_lt_re @[simp] theorem closure_setOf_lt_im (a : ℝ) : closure { z : ℂ | a < z.im } = { z | a ≤ z.im } := by simpa only [closure_Ioi] using closure_preimage_im (Ioi a) #align complex.closure_set_of_lt_im Complex.closure_setOf_lt_im @[simp] theorem frontier_setOf_re_le (a : ℝ) : frontier { z : ℂ | z.re ≤ a } = { z | z.re = a } := by simpa only [frontier_Iic] using frontier_preimage_re (Iic a) #align complex.frontier_set_of_re_le Complex.frontier_setOf_re_le @[simp]
Mathlib/Analysis/Complex/ReImTopology.lean
139
140
theorem frontier_setOf_im_le (a : ℝ) : frontier { z : ℂ | z.im ≤ a } = { z | z.im = a } := by
simpa only [frontier_Iic] using frontier_preimage_im (Iic a)
1
2.718282
0
0
10
135
import Batteries.Data.UInt @[ext] theorem Char.ext : {a b : Char} → a.val = b.val → a = b | ⟨_,_⟩, ⟨_,_⟩, rfl => rfl theorem Char.ext_iff {x y : Char} : x = y ↔ x.val = y.val := ⟨congrArg _, Char.ext⟩ theorem Char.le_antisymm_iff {x y : Char} : x = y ↔ x ≤ y ∧ y ≤ x := Char.ext_iff.trans UInt32.le_antisymm_iff theorem Char.le_antisymm {x y : Char} (h1 : x ≤ y) (h2 : y ≤ x) : x = y := Char.le_antisymm_iff.2 ⟨h1, h2⟩ instance : Batteries.LawfulOrd Char := .compareOfLessAndEq (fun _ => Nat.lt_irrefl _) Nat.lt_trans Nat.not_lt Char.le_antisymm namespace String private theorem csize_eq (c) : csize c = 1 ∨ csize c = 2 ∨ csize c = 3 ∨ csize c = 4 := by simp only [csize, Char.utf8Size] repeat (first | split | (solve | simp (config := {decide := true})))
.lake/packages/batteries/Batteries/Data/Char.lean
30
31
theorem csize_pos (c) : 0 < csize c := by
rcases csize_eq c with _|_|_|_ <;> simp_all (config := {decide := true})
1
2.718282
0
0
2
136
import Batteries.Data.UInt @[ext] theorem Char.ext : {a b : Char} → a.val = b.val → a = b | ⟨_,_⟩, ⟨_,_⟩, rfl => rfl theorem Char.ext_iff {x y : Char} : x = y ↔ x.val = y.val := ⟨congrArg _, Char.ext⟩ theorem Char.le_antisymm_iff {x y : Char} : x = y ↔ x ≤ y ∧ y ≤ x := Char.ext_iff.trans UInt32.le_antisymm_iff theorem Char.le_antisymm {x y : Char} (h1 : x ≤ y) (h2 : y ≤ x) : x = y := Char.le_antisymm_iff.2 ⟨h1, h2⟩ instance : Batteries.LawfulOrd Char := .compareOfLessAndEq (fun _ => Nat.lt_irrefl _) Nat.lt_trans Nat.not_lt Char.le_antisymm namespace String private theorem csize_eq (c) : csize c = 1 ∨ csize c = 2 ∨ csize c = 3 ∨ csize c = 4 := by simp only [csize, Char.utf8Size] repeat (first | split | (solve | simp (config := {decide := true}))) theorem csize_pos (c) : 0 < csize c := by rcases csize_eq c with _|_|_|_ <;> simp_all (config := {decide := true})
.lake/packages/batteries/Batteries/Data/Char.lean
33
34
theorem csize_le_4 (c) : csize c ≤ 4 := by
rcases csize_eq c with _|_|_|_ <;> simp_all (config := {decide := true})
1
2.718282
0
0
2
136
import Mathlib.Analysis.Convex.Cone.InnerDual import Mathlib.Algebra.Order.Nonneg.Module import Mathlib.Algebra.Module.Submodule.Basic variable {𝕜 E F G : Type*} local notation3 "𝕜≥0" => {c : 𝕜 // 0 ≤ c} abbrev PointedCone (𝕜 E) [OrderedSemiring 𝕜] [AddCommMonoid E] [Module 𝕜 E] := Submodule {c : 𝕜 // 0 ≤ c} E namespace PointedCone open Function section Definitions variable [OrderedSemiring 𝕜] variable [AddCommMonoid E] [Module 𝕜 E] @[coe] def toConvexCone (S : PointedCone 𝕜 E) : ConvexCone 𝕜 E where carrier := S smul_mem' c hc _ hx := S.smul_mem ⟨c, le_of_lt hc⟩ hx add_mem' _ hx _ hy := S.add_mem hx hy instance : Coe (PointedCone 𝕜 E) (ConvexCone 𝕜 E) where coe := toConvexCone theorem toConvexCone_injective : Injective ((↑) : PointedCone 𝕜 E → ConvexCone 𝕜 E) := fun _ _ => by simp [toConvexCone] @[simp]
Mathlib/Analysis/Convex/Cone/Pointed.lean
51
52
theorem toConvexCone_pointed (S : PointedCone 𝕜 E) : (S : ConvexCone 𝕜 E).Pointed := by
simp [toConvexCone, ConvexCone.Pointed]
1
2.718282
0
0
1
137
import Mathlib.MeasureTheory.Integral.Bochner import Mathlib.MeasureTheory.Measure.GiryMonad #align_import probability.kernel.basic from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" open MeasureTheory open scoped MeasureTheory ENNReal NNReal namespace ProbabilityTheory noncomputable def kernel (α β : Type*) [MeasurableSpace α] [MeasurableSpace β] : AddSubmonoid (α → Measure β) where carrier := Measurable zero_mem' := measurable_zero add_mem' hf hg := Measurable.add hf hg #align probability_theory.kernel ProbabilityTheory.kernel -- Porting note: using `FunLike` instead of `CoeFun` to use `DFunLike.coe` instance {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] : FunLike (kernel α β) α (Measure β) where coe := Subtype.val coe_injective' := Subtype.val_injective instance kernel.instCovariantAddLE {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] : CovariantClass (kernel α β) (kernel α β) (· + ·) (· ≤ ·) := ⟨fun _ _ _ hμ a ↦ add_le_add_left (hμ a) _⟩ noncomputable instance kernel.instOrderBot {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] : OrderBot (kernel α β) where bot := 0 bot_le κ a := by simp only [ZeroMemClass.coe_zero, Pi.zero_apply, Measure.zero_le] variable {α β ι : Type*} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} namespace kernel @[simp] theorem coeFn_zero : ⇑(0 : kernel α β) = 0 := rfl #align probability_theory.kernel.coe_fn_zero ProbabilityTheory.kernel.coeFn_zero @[simp] theorem coeFn_add (κ η : kernel α β) : ⇑(κ + η) = κ + η := rfl #align probability_theory.kernel.coe_fn_add ProbabilityTheory.kernel.coeFn_add def coeAddHom (α β : Type*) [MeasurableSpace α] [MeasurableSpace β] : kernel α β →+ α → Measure β := AddSubmonoid.subtype _ #align probability_theory.kernel.coe_add_hom ProbabilityTheory.kernel.coeAddHom @[simp] theorem zero_apply (a : α) : (0 : kernel α β) a = 0 := rfl #align probability_theory.kernel.zero_apply ProbabilityTheory.kernel.zero_apply @[simp] theorem coe_finset_sum (I : Finset ι) (κ : ι → kernel α β) : ⇑(∑ i ∈ I, κ i) = ∑ i ∈ I, ⇑(κ i) := map_sum (coeAddHom α β) _ _ #align probability_theory.kernel.coe_finset_sum ProbabilityTheory.kernel.coe_finset_sum
Mathlib/Probability/Kernel/Basic.lean
113
114
theorem finset_sum_apply (I : Finset ι) (κ : ι → kernel α β) (a : α) : (∑ i ∈ I, κ i) a = ∑ i ∈ I, κ i a := by
rw [coe_finset_sum, Finset.sum_apply]
1
2.718282
0
0
2
138
import Mathlib.MeasureTheory.Integral.Bochner import Mathlib.MeasureTheory.Measure.GiryMonad #align_import probability.kernel.basic from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" open MeasureTheory open scoped MeasureTheory ENNReal NNReal namespace ProbabilityTheory noncomputable def kernel (α β : Type*) [MeasurableSpace α] [MeasurableSpace β] : AddSubmonoid (α → Measure β) where carrier := Measurable zero_mem' := measurable_zero add_mem' hf hg := Measurable.add hf hg #align probability_theory.kernel ProbabilityTheory.kernel -- Porting note: using `FunLike` instead of `CoeFun` to use `DFunLike.coe` instance {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] : FunLike (kernel α β) α (Measure β) where coe := Subtype.val coe_injective' := Subtype.val_injective instance kernel.instCovariantAddLE {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] : CovariantClass (kernel α β) (kernel α β) (· + ·) (· ≤ ·) := ⟨fun _ _ _ hμ a ↦ add_le_add_left (hμ a) _⟩ noncomputable instance kernel.instOrderBot {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] : OrderBot (kernel α β) where bot := 0 bot_le κ a := by simp only [ZeroMemClass.coe_zero, Pi.zero_apply, Measure.zero_le] variable {α β ι : Type*} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} namespace kernel @[simp] theorem coeFn_zero : ⇑(0 : kernel α β) = 0 := rfl #align probability_theory.kernel.coe_fn_zero ProbabilityTheory.kernel.coeFn_zero @[simp] theorem coeFn_add (κ η : kernel α β) : ⇑(κ + η) = κ + η := rfl #align probability_theory.kernel.coe_fn_add ProbabilityTheory.kernel.coeFn_add def coeAddHom (α β : Type*) [MeasurableSpace α] [MeasurableSpace β] : kernel α β →+ α → Measure β := AddSubmonoid.subtype _ #align probability_theory.kernel.coe_add_hom ProbabilityTheory.kernel.coeAddHom @[simp] theorem zero_apply (a : α) : (0 : kernel α β) a = 0 := rfl #align probability_theory.kernel.zero_apply ProbabilityTheory.kernel.zero_apply @[simp] theorem coe_finset_sum (I : Finset ι) (κ : ι → kernel α β) : ⇑(∑ i ∈ I, κ i) = ∑ i ∈ I, ⇑(κ i) := map_sum (coeAddHom α β) _ _ #align probability_theory.kernel.coe_finset_sum ProbabilityTheory.kernel.coe_finset_sum theorem finset_sum_apply (I : Finset ι) (κ : ι → kernel α β) (a : α) : (∑ i ∈ I, κ i) a = ∑ i ∈ I, κ i a := by rw [coe_finset_sum, Finset.sum_apply] #align probability_theory.kernel.finset_sum_apply ProbabilityTheory.kernel.finset_sum_apply
Mathlib/Probability/Kernel/Basic.lean
117
118
theorem finset_sum_apply' (I : Finset ι) (κ : ι → kernel α β) (a : α) (s : Set β) : (∑ i ∈ I, κ i) a s = ∑ i ∈ I, κ i a s := by
rw [finset_sum_apply, Measure.finset_sum_apply]
1
2.718282
0
0
2
138
import Mathlib.Algebra.Order.Group.Defs import Mathlib.Algebra.Order.Monoid.WithTop #align_import algebra.order.group.with_top from "leanprover-community/mathlib"@"f178c0e25af359f6cbc72a96a243efd3b12423a3" namespace WithTop variable {α : Type*} namespace LinearOrderedAddCommGroup variable [LinearOrderedAddCommGroup α] {a b c d : α} instance instNeg : Neg (WithTop α) where neg := Option.map fun a : α => -a protected def sub : ∀ _ _ : WithTop α, WithTop α | _, ⊤ => ⊤ | ⊤, (x : α) => ⊤ | (x : α), (y : α) => (x - y : α) instance instSub : Sub (WithTop α) where sub := WithTop.LinearOrderedAddCommGroup.sub @[simp, norm_cast] theorem coe_neg (a : α) : ((-a : α) : WithTop α) = -a := rfl #align with_top.coe_neg WithTop.LinearOrderedAddCommGroup.coe_neg @[simp] theorem neg_top : -(⊤ : WithTop α) = ⊤ := rfl @[simp, norm_cast] theorem coe_sub {a b : α} : (↑(a - b) : WithTop α) = ↑a - ↑b := rfl @[simp]
Mathlib/Algebra/Order/Group/WithTop.lean
61
62
theorem top_sub {a : WithTop α} : (⊤ : WithTop α) - a = ⊤ := by
cases a <;> rfl
1
2.718282
0
0
2
139
import Mathlib.Algebra.Order.Group.Defs import Mathlib.Algebra.Order.Monoid.WithTop #align_import algebra.order.group.with_top from "leanprover-community/mathlib"@"f178c0e25af359f6cbc72a96a243efd3b12423a3" namespace WithTop variable {α : Type*} namespace LinearOrderedAddCommGroup variable [LinearOrderedAddCommGroup α] {a b c d : α} instance instNeg : Neg (WithTop α) where neg := Option.map fun a : α => -a protected def sub : ∀ _ _ : WithTop α, WithTop α | _, ⊤ => ⊤ | ⊤, (x : α) => ⊤ | (x : α), (y : α) => (x - y : α) instance instSub : Sub (WithTop α) where sub := WithTop.LinearOrderedAddCommGroup.sub @[simp, norm_cast] theorem coe_neg (a : α) : ((-a : α) : WithTop α) = -a := rfl #align with_top.coe_neg WithTop.LinearOrderedAddCommGroup.coe_neg @[simp] theorem neg_top : -(⊤ : WithTop α) = ⊤ := rfl @[simp, norm_cast] theorem coe_sub {a b : α} : (↑(a - b) : WithTop α) = ↑a - ↑b := rfl @[simp] theorem top_sub {a : WithTop α} : (⊤ : WithTop α) - a = ⊤ := by cases a <;> rfl @[simp]
Mathlib/Algebra/Order/Group/WithTop.lean
65
65
theorem sub_top {a : WithTop α} : a - ⊤ = ⊤ := by
cases a <;> rfl
1
2.718282
0
0
2
139
import Mathlib.Topology.MetricSpace.ProperSpace import Mathlib.Topology.MetricSpace.Cauchy open Set Filter Bornology open scoped ENNReal Uniformity Topology Pointwise universe u v w variable {α : Type u} {β : Type v} {X ι : Type*} variable [PseudoMetricSpace α] namespace Metric #align metric.bounded Bornology.IsBounded section Bounded variable {x : α} {s t : Set α} {r : ℝ} #noalign metric.bounded_iff_is_bounded #align metric.bounded_empty Bornology.isBounded_empty #align metric.bounded_iff_mem_bounded Bornology.isBounded_iff_forall_mem #align metric.bounded.mono Bornology.IsBounded.subset theorem isBounded_closedBall : IsBounded (closedBall x r) := isBounded_iff.2 ⟨r + r, fun y hy z hz => calc dist y z ≤ dist y x + dist z x := dist_triangle_right _ _ _ _ ≤ r + r := add_le_add hy hz⟩ #align metric.bounded_closed_ball Metric.isBounded_closedBall theorem isBounded_ball : IsBounded (ball x r) := isBounded_closedBall.subset ball_subset_closedBall #align metric.bounded_ball Metric.isBounded_ball theorem isBounded_sphere : IsBounded (sphere x r) := isBounded_closedBall.subset sphere_subset_closedBall #align metric.bounded_sphere Metric.isBounded_sphere theorem isBounded_iff_subset_closedBall (c : α) : IsBounded s ↔ ∃ r, s ⊆ closedBall c r := ⟨fun h ↦ (isBounded_iff.1 (h.insert c)).imp fun _r hr _x hx ↦ hr (.inr hx) (mem_insert _ _), fun ⟨_r, hr⟩ ↦ isBounded_closedBall.subset hr⟩ #align metric.bounded_iff_subset_ball Metric.isBounded_iff_subset_closedBall theorem _root_.Bornology.IsBounded.subset_closedBall (h : IsBounded s) (c : α) : ∃ r, s ⊆ closedBall c r := (isBounded_iff_subset_closedBall c).1 h #align metric.bounded.subset_ball Bornology.IsBounded.subset_closedBall theorem _root_.Bornology.IsBounded.subset_ball_lt (h : IsBounded s) (a : ℝ) (c : α) : ∃ r, a < r ∧ s ⊆ ball c r := let ⟨r, hr⟩ := h.subset_closedBall c ⟨max r a + 1, (le_max_right _ _).trans_lt (lt_add_one _), hr.trans <| closedBall_subset_ball <| (le_max_left _ _).trans_lt (lt_add_one _)⟩ theorem _root_.Bornology.IsBounded.subset_ball (h : IsBounded s) (c : α) : ∃ r, s ⊆ ball c r := (h.subset_ball_lt 0 c).imp fun _ ↦ And.right theorem isBounded_iff_subset_ball (c : α) : IsBounded s ↔ ∃ r, s ⊆ ball c r := ⟨(IsBounded.subset_ball · c), fun ⟨_r, hr⟩ ↦ isBounded_ball.subset hr⟩ theorem _root_.Bornology.IsBounded.subset_closedBall_lt (h : IsBounded s) (a : ℝ) (c : α) : ∃ r, a < r ∧ s ⊆ closedBall c r := let ⟨r, har, hr⟩ := h.subset_ball_lt a c ⟨r, har, hr.trans ball_subset_closedBall⟩ #align metric.bounded.subset_ball_lt Bornology.IsBounded.subset_closedBall_lt theorem isBounded_closure_of_isBounded (h : IsBounded s) : IsBounded (closure s) := let ⟨C, h⟩ := isBounded_iff.1 h isBounded_iff.2 ⟨C, fun _a ha _b hb => isClosed_Iic.closure_subset <| map_mem_closure₂ continuous_dist ha hb h⟩ #align metric.bounded_closure_of_bounded Metric.isBounded_closure_of_isBounded protected theorem _root_.Bornology.IsBounded.closure (h : IsBounded s) : IsBounded (closure s) := isBounded_closure_of_isBounded h #align metric.bounded.closure Bornology.IsBounded.closure @[simp] theorem isBounded_closure_iff : IsBounded (closure s) ↔ IsBounded s := ⟨fun h => h.subset subset_closure, fun h => h.closure⟩ #align metric.bounded_closure_iff Metric.isBounded_closure_iff #align metric.bounded_union Bornology.isBounded_union #align metric.bounded.union Bornology.IsBounded.union #align metric.bounded_bUnion Bornology.isBounded_biUnion #align metric.bounded.prod Bornology.IsBounded.prod theorem hasBasis_cobounded_compl_closedBall (c : α) : (cobounded α).HasBasis (fun _ ↦ True) (fun r ↦ (closedBall c r)ᶜ) := ⟨compl_surjective.forall.2 fun _ ↦ (isBounded_iff_subset_closedBall c).trans <| by simp⟩ theorem hasBasis_cobounded_compl_ball (c : α) : (cobounded α).HasBasis (fun _ ↦ True) (fun r ↦ (ball c r)ᶜ) := ⟨compl_surjective.forall.2 fun _ ↦ (isBounded_iff_subset_ball c).trans <| by simp⟩ @[simp] theorem comap_dist_right_atTop (c : α) : comap (dist · c) atTop = cobounded α := (atTop_basis.comap _).eq_of_same_basis <| by simpa only [compl_def, mem_ball, not_lt] using hasBasis_cobounded_compl_ball c @[simp]
Mathlib/Topology/MetricSpace/Bounded.lean
133
134
theorem comap_dist_left_atTop (c : α) : comap (dist c) atTop = cobounded α := by
simpa only [dist_comm _ c] using comap_dist_right_atTop c
1
2.718282
0
0
3
140
import Mathlib.Topology.MetricSpace.ProperSpace import Mathlib.Topology.MetricSpace.Cauchy open Set Filter Bornology open scoped ENNReal Uniformity Topology Pointwise universe u v w variable {α : Type u} {β : Type v} {X ι : Type*} variable [PseudoMetricSpace α] namespace Metric #align metric.bounded Bornology.IsBounded section Bounded variable {x : α} {s t : Set α} {r : ℝ} #noalign metric.bounded_iff_is_bounded #align metric.bounded_empty Bornology.isBounded_empty #align metric.bounded_iff_mem_bounded Bornology.isBounded_iff_forall_mem #align metric.bounded.mono Bornology.IsBounded.subset theorem isBounded_closedBall : IsBounded (closedBall x r) := isBounded_iff.2 ⟨r + r, fun y hy z hz => calc dist y z ≤ dist y x + dist z x := dist_triangle_right _ _ _ _ ≤ r + r := add_le_add hy hz⟩ #align metric.bounded_closed_ball Metric.isBounded_closedBall theorem isBounded_ball : IsBounded (ball x r) := isBounded_closedBall.subset ball_subset_closedBall #align metric.bounded_ball Metric.isBounded_ball theorem isBounded_sphere : IsBounded (sphere x r) := isBounded_closedBall.subset sphere_subset_closedBall #align metric.bounded_sphere Metric.isBounded_sphere theorem isBounded_iff_subset_closedBall (c : α) : IsBounded s ↔ ∃ r, s ⊆ closedBall c r := ⟨fun h ↦ (isBounded_iff.1 (h.insert c)).imp fun _r hr _x hx ↦ hr (.inr hx) (mem_insert _ _), fun ⟨_r, hr⟩ ↦ isBounded_closedBall.subset hr⟩ #align metric.bounded_iff_subset_ball Metric.isBounded_iff_subset_closedBall theorem _root_.Bornology.IsBounded.subset_closedBall (h : IsBounded s) (c : α) : ∃ r, s ⊆ closedBall c r := (isBounded_iff_subset_closedBall c).1 h #align metric.bounded.subset_ball Bornology.IsBounded.subset_closedBall theorem _root_.Bornology.IsBounded.subset_ball_lt (h : IsBounded s) (a : ℝ) (c : α) : ∃ r, a < r ∧ s ⊆ ball c r := let ⟨r, hr⟩ := h.subset_closedBall c ⟨max r a + 1, (le_max_right _ _).trans_lt (lt_add_one _), hr.trans <| closedBall_subset_ball <| (le_max_left _ _).trans_lt (lt_add_one _)⟩ theorem _root_.Bornology.IsBounded.subset_ball (h : IsBounded s) (c : α) : ∃ r, s ⊆ ball c r := (h.subset_ball_lt 0 c).imp fun _ ↦ And.right theorem isBounded_iff_subset_ball (c : α) : IsBounded s ↔ ∃ r, s ⊆ ball c r := ⟨(IsBounded.subset_ball · c), fun ⟨_r, hr⟩ ↦ isBounded_ball.subset hr⟩ theorem _root_.Bornology.IsBounded.subset_closedBall_lt (h : IsBounded s) (a : ℝ) (c : α) : ∃ r, a < r ∧ s ⊆ closedBall c r := let ⟨r, har, hr⟩ := h.subset_ball_lt a c ⟨r, har, hr.trans ball_subset_closedBall⟩ #align metric.bounded.subset_ball_lt Bornology.IsBounded.subset_closedBall_lt theorem isBounded_closure_of_isBounded (h : IsBounded s) : IsBounded (closure s) := let ⟨C, h⟩ := isBounded_iff.1 h isBounded_iff.2 ⟨C, fun _a ha _b hb => isClosed_Iic.closure_subset <| map_mem_closure₂ continuous_dist ha hb h⟩ #align metric.bounded_closure_of_bounded Metric.isBounded_closure_of_isBounded protected theorem _root_.Bornology.IsBounded.closure (h : IsBounded s) : IsBounded (closure s) := isBounded_closure_of_isBounded h #align metric.bounded.closure Bornology.IsBounded.closure @[simp] theorem isBounded_closure_iff : IsBounded (closure s) ↔ IsBounded s := ⟨fun h => h.subset subset_closure, fun h => h.closure⟩ #align metric.bounded_closure_iff Metric.isBounded_closure_iff #align metric.bounded_union Bornology.isBounded_union #align metric.bounded.union Bornology.IsBounded.union #align metric.bounded_bUnion Bornology.isBounded_biUnion #align metric.bounded.prod Bornology.IsBounded.prod theorem hasBasis_cobounded_compl_closedBall (c : α) : (cobounded α).HasBasis (fun _ ↦ True) (fun r ↦ (closedBall c r)ᶜ) := ⟨compl_surjective.forall.2 fun _ ↦ (isBounded_iff_subset_closedBall c).trans <| by simp⟩ theorem hasBasis_cobounded_compl_ball (c : α) : (cobounded α).HasBasis (fun _ ↦ True) (fun r ↦ (ball c r)ᶜ) := ⟨compl_surjective.forall.2 fun _ ↦ (isBounded_iff_subset_ball c).trans <| by simp⟩ @[simp] theorem comap_dist_right_atTop (c : α) : comap (dist · c) atTop = cobounded α := (atTop_basis.comap _).eq_of_same_basis <| by simpa only [compl_def, mem_ball, not_lt] using hasBasis_cobounded_compl_ball c @[simp] theorem comap_dist_left_atTop (c : α) : comap (dist c) atTop = cobounded α := by simpa only [dist_comm _ c] using comap_dist_right_atTop c @[simp]
Mathlib/Topology/MetricSpace/Bounded.lean
137
139
theorem tendsto_dist_right_atTop_iff (c : α) {f : β → α} {l : Filter β} : Tendsto (fun x ↦ dist (f x) c) l atTop ↔ Tendsto f l (cobounded α) := by
rw [← comap_dist_right_atTop c, tendsto_comap_iff, Function.comp_def]
1
2.718282
0
0
3
140
import Mathlib.Topology.MetricSpace.ProperSpace import Mathlib.Topology.MetricSpace.Cauchy open Set Filter Bornology open scoped ENNReal Uniformity Topology Pointwise universe u v w variable {α : Type u} {β : Type v} {X ι : Type*} variable [PseudoMetricSpace α] namespace Metric #align metric.bounded Bornology.IsBounded section Bounded variable {x : α} {s t : Set α} {r : ℝ} #noalign metric.bounded_iff_is_bounded #align metric.bounded_empty Bornology.isBounded_empty #align metric.bounded_iff_mem_bounded Bornology.isBounded_iff_forall_mem #align metric.bounded.mono Bornology.IsBounded.subset theorem isBounded_closedBall : IsBounded (closedBall x r) := isBounded_iff.2 ⟨r + r, fun y hy z hz => calc dist y z ≤ dist y x + dist z x := dist_triangle_right _ _ _ _ ≤ r + r := add_le_add hy hz⟩ #align metric.bounded_closed_ball Metric.isBounded_closedBall theorem isBounded_ball : IsBounded (ball x r) := isBounded_closedBall.subset ball_subset_closedBall #align metric.bounded_ball Metric.isBounded_ball theorem isBounded_sphere : IsBounded (sphere x r) := isBounded_closedBall.subset sphere_subset_closedBall #align metric.bounded_sphere Metric.isBounded_sphere theorem isBounded_iff_subset_closedBall (c : α) : IsBounded s ↔ ∃ r, s ⊆ closedBall c r := ⟨fun h ↦ (isBounded_iff.1 (h.insert c)).imp fun _r hr _x hx ↦ hr (.inr hx) (mem_insert _ _), fun ⟨_r, hr⟩ ↦ isBounded_closedBall.subset hr⟩ #align metric.bounded_iff_subset_ball Metric.isBounded_iff_subset_closedBall theorem _root_.Bornology.IsBounded.subset_closedBall (h : IsBounded s) (c : α) : ∃ r, s ⊆ closedBall c r := (isBounded_iff_subset_closedBall c).1 h #align metric.bounded.subset_ball Bornology.IsBounded.subset_closedBall theorem _root_.Bornology.IsBounded.subset_ball_lt (h : IsBounded s) (a : ℝ) (c : α) : ∃ r, a < r ∧ s ⊆ ball c r := let ⟨r, hr⟩ := h.subset_closedBall c ⟨max r a + 1, (le_max_right _ _).trans_lt (lt_add_one _), hr.trans <| closedBall_subset_ball <| (le_max_left _ _).trans_lt (lt_add_one _)⟩ theorem _root_.Bornology.IsBounded.subset_ball (h : IsBounded s) (c : α) : ∃ r, s ⊆ ball c r := (h.subset_ball_lt 0 c).imp fun _ ↦ And.right theorem isBounded_iff_subset_ball (c : α) : IsBounded s ↔ ∃ r, s ⊆ ball c r := ⟨(IsBounded.subset_ball · c), fun ⟨_r, hr⟩ ↦ isBounded_ball.subset hr⟩ theorem _root_.Bornology.IsBounded.subset_closedBall_lt (h : IsBounded s) (a : ℝ) (c : α) : ∃ r, a < r ∧ s ⊆ closedBall c r := let ⟨r, har, hr⟩ := h.subset_ball_lt a c ⟨r, har, hr.trans ball_subset_closedBall⟩ #align metric.bounded.subset_ball_lt Bornology.IsBounded.subset_closedBall_lt theorem isBounded_closure_of_isBounded (h : IsBounded s) : IsBounded (closure s) := let ⟨C, h⟩ := isBounded_iff.1 h isBounded_iff.2 ⟨C, fun _a ha _b hb => isClosed_Iic.closure_subset <| map_mem_closure₂ continuous_dist ha hb h⟩ #align metric.bounded_closure_of_bounded Metric.isBounded_closure_of_isBounded protected theorem _root_.Bornology.IsBounded.closure (h : IsBounded s) : IsBounded (closure s) := isBounded_closure_of_isBounded h #align metric.bounded.closure Bornology.IsBounded.closure @[simp] theorem isBounded_closure_iff : IsBounded (closure s) ↔ IsBounded s := ⟨fun h => h.subset subset_closure, fun h => h.closure⟩ #align metric.bounded_closure_iff Metric.isBounded_closure_iff #align metric.bounded_union Bornology.isBounded_union #align metric.bounded.union Bornology.IsBounded.union #align metric.bounded_bUnion Bornology.isBounded_biUnion #align metric.bounded.prod Bornology.IsBounded.prod theorem hasBasis_cobounded_compl_closedBall (c : α) : (cobounded α).HasBasis (fun _ ↦ True) (fun r ↦ (closedBall c r)ᶜ) := ⟨compl_surjective.forall.2 fun _ ↦ (isBounded_iff_subset_closedBall c).trans <| by simp⟩ theorem hasBasis_cobounded_compl_ball (c : α) : (cobounded α).HasBasis (fun _ ↦ True) (fun r ↦ (ball c r)ᶜ) := ⟨compl_surjective.forall.2 fun _ ↦ (isBounded_iff_subset_ball c).trans <| by simp⟩ @[simp] theorem comap_dist_right_atTop (c : α) : comap (dist · c) atTop = cobounded α := (atTop_basis.comap _).eq_of_same_basis <| by simpa only [compl_def, mem_ball, not_lt] using hasBasis_cobounded_compl_ball c @[simp] theorem comap_dist_left_atTop (c : α) : comap (dist c) atTop = cobounded α := by simpa only [dist_comm _ c] using comap_dist_right_atTop c @[simp] theorem tendsto_dist_right_atTop_iff (c : α) {f : β → α} {l : Filter β} : Tendsto (fun x ↦ dist (f x) c) l atTop ↔ Tendsto f l (cobounded α) := by rw [← comap_dist_right_atTop c, tendsto_comap_iff, Function.comp_def] @[simp]
Mathlib/Topology/MetricSpace/Bounded.lean
142
144
theorem tendsto_dist_left_atTop_iff (c : α) {f : β → α} {l : Filter β} : Tendsto (fun x ↦ dist c (f x)) l atTop ↔ Tendsto f l (cobounded α) := by
simp only [dist_comm c, tendsto_dist_right_atTop_iff]
1
2.718282
0
0
3
140
import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Algebra.Order.Ring.Int import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Data.Nat.Cast.Order #align_import algebra.order.ring.abs from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1" #align_import data.nat.parity from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" variable {α : Type*} lemma odd_abs [LinearOrder α] [Ring α] {a : α} : Odd (abs a) ↔ Odd a := by cases' abs_choice a with h h <;> simp only [h, odd_neg] section variable [Ring α] [LinearOrder α] {a b : α} @[simp]
Mathlib/Algebra/Order/Ring/Abs.lean
192
193
theorem abs_dvd (a b : α) : |a| ∣ b ↔ a ∣ b := by
cases' abs_choice a with h h <;> simp only [h, neg_dvd]
1
2.718282
0
0
2
141
import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Algebra.Order.Ring.Int import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Data.Nat.Cast.Order #align_import algebra.order.ring.abs from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1" #align_import data.nat.parity from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" variable {α : Type*} lemma odd_abs [LinearOrder α] [Ring α] {a : α} : Odd (abs a) ↔ Odd a := by cases' abs_choice a with h h <;> simp only [h, odd_neg] section variable [Ring α] [LinearOrder α] {a b : α} @[simp] theorem abs_dvd (a b : α) : |a| ∣ b ↔ a ∣ b := by cases' abs_choice a with h h <;> simp only [h, neg_dvd] #align abs_dvd abs_dvd theorem abs_dvd_self (a : α) : |a| ∣ a := (abs_dvd a a).mpr (dvd_refl a) #align abs_dvd_self abs_dvd_self @[simp]
Mathlib/Algebra/Order/Ring/Abs.lean
201
202
theorem dvd_abs (a b : α) : a ∣ |b| ↔ a ∣ b := by
cases' abs_choice b with h h <;> simp only [h, dvd_neg]
1
2.718282
0
0
2
141
import Mathlib.Analysis.BoxIntegral.Partition.Split import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul #align_import analysis.box_integral.partition.additive from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section open scoped Classical open Function Set namespace BoxIntegral variable {ι M : Type*} {n : ℕ} structure BoxAdditiveMap (ι M : Type*) [AddCommMonoid M] (I : WithTop (Box ι)) where toFun : Box ι → M sum_partition_boxes' : ∀ J : Box ι, ↑J ≤ I → ∀ π : Prepartition J, π.IsPartition → ∑ Ji ∈ π.boxes, toFun Ji = toFun J #align box_integral.box_additive_map BoxIntegral.BoxAdditiveMap scoped notation:25 ι " →ᵇᵃ " M => BoxIntegral.BoxAdditiveMap ι M ⊤ @[inherit_doc] scoped notation:25 ι " →ᵇᵃ[" I "] " M => BoxIntegral.BoxAdditiveMap ι M I namespace BoxAdditiveMap open Box Prepartition Finset variable {N : Type*} [AddCommMonoid M] [AddCommMonoid N] {I₀ : WithTop (Box ι)} {I J : Box ι} {i : ι} instance : FunLike (ι →ᵇᵃ[I₀] M) (Box ι) M where coe := toFun coe_injective' f g h := by cases f; cases g; congr initialize_simps_projections BoxIntegral.BoxAdditiveMap (toFun → apply) #noalign box_integral.box_additive_map.to_fun_eq_coe @[simp] theorem coe_mk (f h) : ⇑(mk f h : ι →ᵇᵃ[I₀] M) = f := rfl #align box_integral.box_additive_map.coe_mk BoxIntegral.BoxAdditiveMap.coe_mk theorem coe_injective : Injective fun (f : ι →ᵇᵃ[I₀] M) x => f x := DFunLike.coe_injective #align box_integral.box_additive_map.coe_injective BoxIntegral.BoxAdditiveMap.coe_injective -- Porting note (#10618): was @[simp], now can be proved by `simp` theorem coe_inj {f g : ι →ᵇᵃ[I₀] M} : (f : Box ι → M) = g ↔ f = g := DFunLike.coe_fn_eq #align box_integral.box_additive_map.coe_inj BoxIntegral.BoxAdditiveMap.coe_inj theorem sum_partition_boxes (f : ι →ᵇᵃ[I₀] M) (hI : ↑I ≤ I₀) {π : Prepartition I} (h : π.IsPartition) : ∑ J ∈ π.boxes, f J = f I := f.sum_partition_boxes' I hI π h #align box_integral.box_additive_map.sum_partition_boxes BoxIntegral.BoxAdditiveMap.sum_partition_boxes @[simps (config := .asFn)] instance : Zero (ι →ᵇᵃ[I₀] M) := ⟨⟨0, fun _ _ _ _ => sum_const_zero⟩⟩ instance : Inhabited (ι →ᵇᵃ[I₀] M) := ⟨0⟩ instance : Add (ι →ᵇᵃ[I₀] M) := ⟨fun f g => ⟨f + g, fun I hI π hπ => by simp only [Pi.add_apply, sum_add_distrib, sum_partition_boxes _ hI hπ]⟩⟩ instance {R} [Monoid R] [DistribMulAction R M] : SMul R (ι →ᵇᵃ[I₀] M) := ⟨fun r f => ⟨r • (f : Box ι → M), fun I hI π hπ => by simp only [Pi.smul_apply, ← smul_sum, sum_partition_boxes _ hI hπ]⟩⟩ instance : AddCommMonoid (ι →ᵇᵃ[I₀] M) := Function.Injective.addCommMonoid _ coe_injective rfl (fun _ _ => rfl) fun _ _ => rfl @[simp]
Mathlib/Analysis/BoxIntegral/Partition/Additive.lean
113
115
theorem map_split_add (f : ι →ᵇᵃ[I₀] M) (hI : ↑I ≤ I₀) (i : ι) (x : ℝ) : (I.splitLower i x).elim' 0 f + (I.splitUpper i x).elim' 0 f = f I := by
rw [← f.sum_partition_boxes hI (isPartitionSplit I i x), sum_split_boxes]
1
2.718282
0
0
1
142
import Mathlib.Algebra.Algebra.Defs import Mathlib.Algebra.Polynomial.FieldDivision import Mathlib.FieldTheory.Minpoly.Basic import Mathlib.RingTheory.Adjoin.Basic import Mathlib.RingTheory.FinitePresentation import Mathlib.RingTheory.FiniteType import Mathlib.RingTheory.PowerBasis import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.RingTheory.QuotientNoetherian #align_import ring_theory.adjoin_root from "leanprover-community/mathlib"@"5c4b3d41a84bd2a1d79c7d9265e58a891e71be89" noncomputable section open scoped Classical open Polynomial universe u v w variable {R : Type u} {S : Type v} {K : Type w} open Polynomial Ideal def AdjoinRoot [CommRing R] (f : R[X]) : Type u := Polynomial R ⧸ (span {f} : Ideal R[X]) #align adjoin_root AdjoinRoot namespace AdjoinRoot section CommRing variable [CommRing R] (f : R[X]) instance instCommRing : CommRing (AdjoinRoot f) := Ideal.Quotient.commRing _ #align adjoin_root.comm_ring AdjoinRoot.instCommRing instance : Inhabited (AdjoinRoot f) := ⟨0⟩ instance : DecidableEq (AdjoinRoot f) := Classical.decEq _ protected theorem nontrivial [IsDomain R] (h : degree f ≠ 0) : Nontrivial (AdjoinRoot f) := Ideal.Quotient.nontrivial (by simp_rw [Ne, span_singleton_eq_top, Polynomial.isUnit_iff, not_exists, not_and] rintro x hx rfl exact h (degree_C hx.ne_zero)) #align adjoin_root.nontrivial AdjoinRoot.nontrivial def mk : R[X] →+* AdjoinRoot f := Ideal.Quotient.mk _ #align adjoin_root.mk AdjoinRoot.mk @[elab_as_elim] theorem induction_on {C : AdjoinRoot f → Prop} (x : AdjoinRoot f) (ih : ∀ p : R[X], C (mk f p)) : C x := Quotient.inductionOn' x ih #align adjoin_root.induction_on AdjoinRoot.induction_on def of : R →+* AdjoinRoot f := (mk f).comp C #align adjoin_root.of AdjoinRoot.of instance instSMulAdjoinRoot [DistribSMul S R] [IsScalarTower S R R] : SMul S (AdjoinRoot f) := Submodule.Quotient.instSMul' _ instance [DistribSMul S R] [IsScalarTower S R R] : DistribSMul S (AdjoinRoot f) := Submodule.Quotient.distribSMul' _ @[simp] theorem smul_mk [DistribSMul S R] [IsScalarTower S R R] (a : S) (x : R[X]) : a • mk f x = mk f (a • x) := rfl #align adjoin_root.smul_mk AdjoinRoot.smul_mk
Mathlib/RingTheory/AdjoinRoot.lean
120
121
theorem smul_of [DistribSMul S R] [IsScalarTower S R R] (a : S) (x : R) : a • of f x = of f (a • x) := by
rw [of, RingHom.comp_apply, RingHom.comp_apply, smul_mk, smul_C]
1
2.718282
0
0
1
143
import Mathlib.Tactic.Ring import Mathlib.Tactic.FailIfNoProgress import Mathlib.Algebra.Group.Commutator #align_import tactic.group from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" namespace Mathlib.Tactic.Group open Lean open Lean.Meta open Lean.Parser.Tactic open Lean.Elab.Tactic -- The next three lemmas are not general purpose lemmas, they are intended for use only by -- the `group` tactic. @[to_additive]
Mathlib/Tactic/Group.lean
37
38
theorem zpow_trick {G : Type*} [Group G] (a b : G) (n m : ℤ) : a * b ^ n * b ^ m = a * b ^ (n + m) := by
rw [mul_assoc, ← zpow_add]
1
2.718282
0
0
3
144
import Mathlib.Tactic.Ring import Mathlib.Tactic.FailIfNoProgress import Mathlib.Algebra.Group.Commutator #align_import tactic.group from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" namespace Mathlib.Tactic.Group open Lean open Lean.Meta open Lean.Parser.Tactic open Lean.Elab.Tactic -- The next three lemmas are not general purpose lemmas, they are intended for use only by -- the `group` tactic. @[to_additive] theorem zpow_trick {G : Type*} [Group G] (a b : G) (n m : ℤ) : a * b ^ n * b ^ m = a * b ^ (n + m) := by rw [mul_assoc, ← zpow_add] #align tactic.group.zpow_trick Mathlib.Tactic.Group.zpow_trick #align tactic.group.zsmul_trick Mathlib.Tactic.Group.zsmul_trick @[to_additive]
Mathlib/Tactic/Group.lean
43
44
theorem zpow_trick_one {G : Type*} [Group G] (a b : G) (m : ℤ) : a * b * b ^ m = a * b ^ (m + 1) := by
rw [mul_assoc, mul_self_zpow]
1
2.718282
0
0
3
144
import Mathlib.Tactic.Ring import Mathlib.Tactic.FailIfNoProgress import Mathlib.Algebra.Group.Commutator #align_import tactic.group from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" namespace Mathlib.Tactic.Group open Lean open Lean.Meta open Lean.Parser.Tactic open Lean.Elab.Tactic -- The next three lemmas are not general purpose lemmas, they are intended for use only by -- the `group` tactic. @[to_additive] theorem zpow_trick {G : Type*} [Group G] (a b : G) (n m : ℤ) : a * b ^ n * b ^ m = a * b ^ (n + m) := by rw [mul_assoc, ← zpow_add] #align tactic.group.zpow_trick Mathlib.Tactic.Group.zpow_trick #align tactic.group.zsmul_trick Mathlib.Tactic.Group.zsmul_trick @[to_additive] theorem zpow_trick_one {G : Type*} [Group G] (a b : G) (m : ℤ) : a * b * b ^ m = a * b ^ (m + 1) := by rw [mul_assoc, mul_self_zpow] #align tactic.group.zpow_trick_one Mathlib.Tactic.Group.zpow_trick_one #align tactic.group.zsmul_trick_zero Mathlib.Tactic.Group.zsmul_trick_zero @[to_additive]
Mathlib/Tactic/Group.lean
49
50
theorem zpow_trick_one' {G : Type*} [Group G] (a b : G) (n : ℤ) : a * b ^ n * b = a * b ^ (n + 1) := by
rw [mul_assoc, mul_zpow_self]
1
2.718282
0
0
3
144
import Mathlib.CategoryTheory.EpiMono import Mathlib.CategoryTheory.Limits.HasLimits #align_import category_theory.limits.shapes.equalizers from "leanprover-community/mathlib"@"4698e35ca56a0d4fa53aa5639c3364e0a77f4eba" section open CategoryTheory Opposite namespace CategoryTheory.Limits -- attribute [local tidy] tactic.case_bash -- Porting note: no tidy nor cases_bash universe v v₂ u u₂ inductive WalkingParallelPair : Type | zero | one deriving DecidableEq, Inhabited #align category_theory.limits.walking_parallel_pair CategoryTheory.Limits.WalkingParallelPair open WalkingParallelPair inductive WalkingParallelPairHom : WalkingParallelPair → WalkingParallelPair → Type | left : WalkingParallelPairHom zero one | right : WalkingParallelPairHom zero one | id (X : WalkingParallelPair) : WalkingParallelPairHom X X deriving DecidableEq #align category_theory.limits.walking_parallel_pair_hom CategoryTheory.Limits.WalkingParallelPairHom attribute [-simp, nolint simpNF] WalkingParallelPairHom.id.sizeOf_spec instance : Inhabited (WalkingParallelPairHom zero one) where default := WalkingParallelPairHom.left open WalkingParallelPairHom def WalkingParallelPairHom.comp : -- Porting note: changed X Y Z to implicit to match comp fields in precategory ∀ { X Y Z : WalkingParallelPair } (_ : WalkingParallelPairHom X Y) (_ : WalkingParallelPairHom Y Z), WalkingParallelPairHom X Z | _, _, _, id _, h => h | _, _, _, left, id one => left | _, _, _, right, id one => right #align category_theory.limits.walking_parallel_pair_hom.comp CategoryTheory.Limits.WalkingParallelPairHom.comp -- Porting note: adding these since they are simple and aesop couldn't directly prove them theorem WalkingParallelPairHom.id_comp {X Y : WalkingParallelPair} (g : WalkingParallelPairHom X Y) : comp (id X) g = g := rfl
Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
101
103
theorem WalkingParallelPairHom.comp_id {X Y : WalkingParallelPair} (f : WalkingParallelPairHom X Y) : comp f (id Y) = f := by
cases f <;> rfl
1
2.718282
0
0
3
145
import Mathlib.CategoryTheory.EpiMono import Mathlib.CategoryTheory.Limits.HasLimits #align_import category_theory.limits.shapes.equalizers from "leanprover-community/mathlib"@"4698e35ca56a0d4fa53aa5639c3364e0a77f4eba" section open CategoryTheory Opposite namespace CategoryTheory.Limits -- attribute [local tidy] tactic.case_bash -- Porting note: no tidy nor cases_bash universe v v₂ u u₂ inductive WalkingParallelPair : Type | zero | one deriving DecidableEq, Inhabited #align category_theory.limits.walking_parallel_pair CategoryTheory.Limits.WalkingParallelPair open WalkingParallelPair inductive WalkingParallelPairHom : WalkingParallelPair → WalkingParallelPair → Type | left : WalkingParallelPairHom zero one | right : WalkingParallelPairHom zero one | id (X : WalkingParallelPair) : WalkingParallelPairHom X X deriving DecidableEq #align category_theory.limits.walking_parallel_pair_hom CategoryTheory.Limits.WalkingParallelPairHom attribute [-simp, nolint simpNF] WalkingParallelPairHom.id.sizeOf_spec instance : Inhabited (WalkingParallelPairHom zero one) where default := WalkingParallelPairHom.left open WalkingParallelPairHom def WalkingParallelPairHom.comp : -- Porting note: changed X Y Z to implicit to match comp fields in precategory ∀ { X Y Z : WalkingParallelPair } (_ : WalkingParallelPairHom X Y) (_ : WalkingParallelPairHom Y Z), WalkingParallelPairHom X Z | _, _, _, id _, h => h | _, _, _, left, id one => left | _, _, _, right, id one => right #align category_theory.limits.walking_parallel_pair_hom.comp CategoryTheory.Limits.WalkingParallelPairHom.comp -- Porting note: adding these since they are simple and aesop couldn't directly prove them theorem WalkingParallelPairHom.id_comp {X Y : WalkingParallelPair} (g : WalkingParallelPairHom X Y) : comp (id X) g = g := rfl theorem WalkingParallelPairHom.comp_id {X Y : WalkingParallelPair} (f : WalkingParallelPairHom X Y) : comp f (id Y) = f := by cases f <;> rfl
Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
105
108
theorem WalkingParallelPairHom.assoc {X Y Z W : WalkingParallelPair} (f : WalkingParallelPairHom X Y) (g: WalkingParallelPairHom Y Z) (h : WalkingParallelPairHom Z W) : comp (comp f g) h = comp f (comp g h) := by
cases f <;> cases g <;> cases h <;> rfl
1
2.718282
0
0
3
145
import Mathlib.CategoryTheory.EpiMono import Mathlib.CategoryTheory.Limits.HasLimits #align_import category_theory.limits.shapes.equalizers from "leanprover-community/mathlib"@"4698e35ca56a0d4fa53aa5639c3364e0a77f4eba" section open CategoryTheory Opposite namespace CategoryTheory.Limits -- attribute [local tidy] tactic.case_bash -- Porting note: no tidy nor cases_bash universe v v₂ u u₂ inductive WalkingParallelPair : Type | zero | one deriving DecidableEq, Inhabited #align category_theory.limits.walking_parallel_pair CategoryTheory.Limits.WalkingParallelPair open WalkingParallelPair inductive WalkingParallelPairHom : WalkingParallelPair → WalkingParallelPair → Type | left : WalkingParallelPairHom zero one | right : WalkingParallelPairHom zero one | id (X : WalkingParallelPair) : WalkingParallelPairHom X X deriving DecidableEq #align category_theory.limits.walking_parallel_pair_hom CategoryTheory.Limits.WalkingParallelPairHom attribute [-simp, nolint simpNF] WalkingParallelPairHom.id.sizeOf_spec instance : Inhabited (WalkingParallelPairHom zero one) where default := WalkingParallelPairHom.left open WalkingParallelPairHom def WalkingParallelPairHom.comp : -- Porting note: changed X Y Z to implicit to match comp fields in precategory ∀ { X Y Z : WalkingParallelPair } (_ : WalkingParallelPairHom X Y) (_ : WalkingParallelPairHom Y Z), WalkingParallelPairHom X Z | _, _, _, id _, h => h | _, _, _, left, id one => left | _, _, _, right, id one => right #align category_theory.limits.walking_parallel_pair_hom.comp CategoryTheory.Limits.WalkingParallelPairHom.comp -- Porting note: adding these since they are simple and aesop couldn't directly prove them theorem WalkingParallelPairHom.id_comp {X Y : WalkingParallelPair} (g : WalkingParallelPairHom X Y) : comp (id X) g = g := rfl theorem WalkingParallelPairHom.comp_id {X Y : WalkingParallelPair} (f : WalkingParallelPairHom X Y) : comp f (id Y) = f := by cases f <;> rfl theorem WalkingParallelPairHom.assoc {X Y Z W : WalkingParallelPair} (f : WalkingParallelPairHom X Y) (g: WalkingParallelPairHom Y Z) (h : WalkingParallelPairHom Z W) : comp (comp f g) h = comp f (comp g h) := by cases f <;> cases g <;> cases h <;> rfl instance walkingParallelPairHomCategory : SmallCategory WalkingParallelPair where Hom := WalkingParallelPairHom id := id comp := comp comp_id := comp_id id_comp := id_comp assoc := assoc #align category_theory.limits.walking_parallel_pair_hom_category CategoryTheory.Limits.walkingParallelPairHomCategory @[simp] theorem walkingParallelPairHom_id (X : WalkingParallelPair) : WalkingParallelPairHom.id X = 𝟙 X := rfl #align category_theory.limits.walking_parallel_pair_hom_id CategoryTheory.Limits.walkingParallelPairHom_id -- Porting note: simpNF asked me to do this because the LHS of the non-primed version reduced @[simp]
Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
126
127
theorem WalkingParallelPairHom.id.sizeOf_spec' (X : WalkingParallelPair) : (WalkingParallelPairHom._sizeOf_inst X X).sizeOf (𝟙 X) = 1 + sizeOf X := by
cases X <;> rfl
1
2.718282
0
0
3
145
import Mathlib.Algebra.Order.Field.Canonical.Defs #align_import algebra.order.field.canonical.basic from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865" variable {α : Type*} section CanonicallyLinearOrderedSemifield variable [CanonicallyLinearOrderedSemifield α] [Sub α] [OrderedSub α]
Mathlib/Algebra/Order/Field/Canonical/Basic.lean
22
22
theorem tsub_div (a b c : α) : (a - b) / c = a / c - b / c := by
simp_rw [div_eq_mul_inv, tsub_mul]
1
2.718282
0
0
1
146
import Mathlib.Algebra.Group.Action.Defs #align_import group_theory.group_action.sum from "leanprover-community/mathlib"@"f1a2caaf51ef593799107fe9a8d5e411599f3996" variable {M N P α β γ : Type*} namespace Sum section SMul variable [SMul M α] [SMul M β] [SMul N α] [SMul N β] (a : M) (b : α) (c : β) (x : Sum α β) @[to_additive Sum.hasVAdd] instance : SMul M (Sum α β) := ⟨fun a => Sum.map (a • ·) (a • ·)⟩ @[to_additive] theorem smul_def : a • x = x.map (a • ·) (a • ·) := rfl #align sum.smul_def Sum.smul_def #align sum.vadd_def Sum.vadd_def @[to_additive (attr := simp)] theorem smul_inl : a • (inl b : Sum α β) = inl (a • b) := rfl #align sum.smul_inl Sum.smul_inl #align sum.vadd_inl Sum.vadd_inl @[to_additive (attr := simp)] theorem smul_inr : a • (inr c : Sum α β) = inr (a • c) := rfl #align sum.smul_inr Sum.smul_inr #align sum.vadd_inr Sum.vadd_inr @[to_additive (attr := simp)]
Mathlib/GroupTheory/GroupAction/Sum.lean
56
56
theorem smul_swap : (a • x).swap = a • x.swap := by
cases x <;> rfl
1
2.718282
0
0
1
147
import Mathlib.RepresentationTheory.FdRep import Mathlib.LinearAlgebra.Trace import Mathlib.RepresentationTheory.Invariants #align_import representation_theory.character from "leanprover-community/mathlib"@"55b3f8206b8596db8bb1804d8a92814a0b6670c9" noncomputable section universe u open CategoryTheory LinearMap CategoryTheory.MonoidalCategory Representation FiniteDimensional variable {k : Type u} [Field k] namespace FdRep set_option linter.uppercaseLean3 false -- `FdRep` section Monoid variable {G : Type u} [Monoid G] def character (V : FdRep k G) (g : G) := LinearMap.trace k V (V.ρ g) #align fdRep.character FdRep.character
Mathlib/RepresentationTheory/Character.lean
54
55
theorem char_mul_comm (V : FdRep k G) (g : G) (h : G) : V.character (h * g) = V.character (g * h) := by
simp only [trace_mul_comm, character, map_mul]
1
2.718282
0
0
5
148
import Mathlib.RepresentationTheory.FdRep import Mathlib.LinearAlgebra.Trace import Mathlib.RepresentationTheory.Invariants #align_import representation_theory.character from "leanprover-community/mathlib"@"55b3f8206b8596db8bb1804d8a92814a0b6670c9" noncomputable section universe u open CategoryTheory LinearMap CategoryTheory.MonoidalCategory Representation FiniteDimensional variable {k : Type u} [Field k] namespace FdRep set_option linter.uppercaseLean3 false -- `FdRep` section Monoid variable {G : Type u} [Monoid G] def character (V : FdRep k G) (g : G) := LinearMap.trace k V (V.ρ g) #align fdRep.character FdRep.character theorem char_mul_comm (V : FdRep k G) (g : G) (h : G) : V.character (h * g) = V.character (g * h) := by simp only [trace_mul_comm, character, map_mul] #align fdRep.char_mul_comm FdRep.char_mul_comm @[simp]
Mathlib/RepresentationTheory/Character.lean
59
60
theorem char_one (V : FdRep k G) : V.character 1 = FiniteDimensional.finrank k V := by
simp only [character, map_one, trace_one]
1
2.718282
0
0
5
148
import Mathlib.RepresentationTheory.FdRep import Mathlib.LinearAlgebra.Trace import Mathlib.RepresentationTheory.Invariants #align_import representation_theory.character from "leanprover-community/mathlib"@"55b3f8206b8596db8bb1804d8a92814a0b6670c9" noncomputable section universe u open CategoryTheory LinearMap CategoryTheory.MonoidalCategory Representation FiniteDimensional variable {k : Type u} [Field k] namespace FdRep set_option linter.uppercaseLean3 false -- `FdRep` section Monoid variable {G : Type u} [Monoid G] def character (V : FdRep k G) (g : G) := LinearMap.trace k V (V.ρ g) #align fdRep.character FdRep.character theorem char_mul_comm (V : FdRep k G) (g : G) (h : G) : V.character (h * g) = V.character (g * h) := by simp only [trace_mul_comm, character, map_mul] #align fdRep.char_mul_comm FdRep.char_mul_comm @[simp] theorem char_one (V : FdRep k G) : V.character 1 = FiniteDimensional.finrank k V := by simp only [character, map_one, trace_one] #align fdRep.char_one FdRep.char_one
Mathlib/RepresentationTheory/Character.lean
64
65
theorem char_tensor (V W : FdRep k G) : (V ⊗ W).character = V.character * W.character := by
ext g; convert trace_tensorProduct' (V.ρ g) (W.ρ g)
1
2.718282
0
0
5
148
import Mathlib.RepresentationTheory.FdRep import Mathlib.LinearAlgebra.Trace import Mathlib.RepresentationTheory.Invariants #align_import representation_theory.character from "leanprover-community/mathlib"@"55b3f8206b8596db8bb1804d8a92814a0b6670c9" noncomputable section universe u open CategoryTheory LinearMap CategoryTheory.MonoidalCategory Representation FiniteDimensional variable {k : Type u} [Field k] namespace FdRep set_option linter.uppercaseLean3 false -- `FdRep` section Monoid variable {G : Type u} [Monoid G] def character (V : FdRep k G) (g : G) := LinearMap.trace k V (V.ρ g) #align fdRep.character FdRep.character theorem char_mul_comm (V : FdRep k G) (g : G) (h : G) : V.character (h * g) = V.character (g * h) := by simp only [trace_mul_comm, character, map_mul] #align fdRep.char_mul_comm FdRep.char_mul_comm @[simp] theorem char_one (V : FdRep k G) : V.character 1 = FiniteDimensional.finrank k V := by simp only [character, map_one, trace_one] #align fdRep.char_one FdRep.char_one theorem char_tensor (V W : FdRep k G) : (V ⊗ W).character = V.character * W.character := by ext g; convert trace_tensorProduct' (V.ρ g) (W.ρ g) #align fdRep.char_tensor FdRep.char_tensor -- Porting note: adding variant of `char_tensor` to make the simp-set confluent @[simp]
Mathlib/RepresentationTheory/Character.lean
70
74
theorem char_tensor' (V W : FdRep k G) : character (Action.FunctorCategoryEquivalence.inverse.obj (Action.FunctorCategoryEquivalence.functor.obj V ⊗ Action.FunctorCategoryEquivalence.functor.obj W)) = V.character * W.character := by
simp [← char_tensor]
1
2.718282
0
0
5
148
import Mathlib.RepresentationTheory.FdRep import Mathlib.LinearAlgebra.Trace import Mathlib.RepresentationTheory.Invariants #align_import representation_theory.character from "leanprover-community/mathlib"@"55b3f8206b8596db8bb1804d8a92814a0b6670c9" noncomputable section universe u open CategoryTheory LinearMap CategoryTheory.MonoidalCategory Representation FiniteDimensional variable {k : Type u} [Field k] namespace FdRep set_option linter.uppercaseLean3 false -- `FdRep` section Monoid variable {G : Type u} [Monoid G] def character (V : FdRep k G) (g : G) := LinearMap.trace k V (V.ρ g) #align fdRep.character FdRep.character theorem char_mul_comm (V : FdRep k G) (g : G) (h : G) : V.character (h * g) = V.character (g * h) := by simp only [trace_mul_comm, character, map_mul] #align fdRep.char_mul_comm FdRep.char_mul_comm @[simp] theorem char_one (V : FdRep k G) : V.character 1 = FiniteDimensional.finrank k V := by simp only [character, map_one, trace_one] #align fdRep.char_one FdRep.char_one theorem char_tensor (V W : FdRep k G) : (V ⊗ W).character = V.character * W.character := by ext g; convert trace_tensorProduct' (V.ρ g) (W.ρ g) #align fdRep.char_tensor FdRep.char_tensor -- Porting note: adding variant of `char_tensor` to make the simp-set confluent @[simp] theorem char_tensor' (V W : FdRep k G) : character (Action.FunctorCategoryEquivalence.inverse.obj (Action.FunctorCategoryEquivalence.functor.obj V ⊗ Action.FunctorCategoryEquivalence.functor.obj W)) = V.character * W.character := by simp [← char_tensor]
Mathlib/RepresentationTheory/Character.lean
77
78
theorem char_iso {V W : FdRep k G} (i : V ≅ W) : V.character = W.character := by
ext g; simp only [character, FdRep.Iso.conj_ρ i]; exact (trace_conj' (V.ρ g) _).symm
1
2.718282
0
0
5
148
import Mathlib.Algebra.Order.Ring.WithTop import Mathlib.Algebra.Order.Sub.WithTop import Mathlib.Data.Real.NNReal import Mathlib.Order.Interval.Set.WithBotTop #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Function Set NNReal variable {α : Type*} def ENNReal := WithTop ℝ≥0 deriving Zero, AddCommMonoidWithOne, SemilatticeSup, DistribLattice, Nontrivial #align ennreal ENNReal @[inherit_doc] scoped[ENNReal] notation "ℝ≥0∞" => ENNReal scoped[ENNReal] notation "∞" => (⊤ : ENNReal) namespace ENNReal instance : OrderBot ℝ≥0∞ := inferInstanceAs (OrderBot (WithTop ℝ≥0)) instance : BoundedOrder ℝ≥0∞ := inferInstanceAs (BoundedOrder (WithTop ℝ≥0)) instance : CharZero ℝ≥0∞ := inferInstanceAs (CharZero (WithTop ℝ≥0)) noncomputable instance : CanonicallyOrderedCommSemiring ℝ≥0∞ := inferInstanceAs (CanonicallyOrderedCommSemiring (WithTop ℝ≥0)) noncomputable instance : CompleteLinearOrder ℝ≥0∞ := inferInstanceAs (CompleteLinearOrder (WithTop ℝ≥0)) instance : DenselyOrdered ℝ≥0∞ := inferInstanceAs (DenselyOrdered (WithTop ℝ≥0)) noncomputable instance : CanonicallyLinearOrderedAddCommMonoid ℝ≥0∞ := inferInstanceAs (CanonicallyLinearOrderedAddCommMonoid (WithTop ℝ≥0)) noncomputable instance instSub : Sub ℝ≥0∞ := inferInstanceAs (Sub (WithTop ℝ≥0)) noncomputable instance : OrderedSub ℝ≥0∞ := inferInstanceAs (OrderedSub (WithTop ℝ≥0)) noncomputable instance : LinearOrderedAddCommMonoidWithTop ℝ≥0∞ := inferInstanceAs (LinearOrderedAddCommMonoidWithTop (WithTop ℝ≥0)) -- Porting note: rfc: redefine using pattern matching? noncomputable instance : Inv ℝ≥0∞ := ⟨fun a => sInf { b | 1 ≤ a * b }⟩ noncomputable instance : DivInvMonoid ℝ≥0∞ where variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0} -- Porting note: are these 2 instances still required in Lean 4? instance covariantClass_mul_le : CovariantClass ℝ≥0∞ ℝ≥0∞ (· * ·) (· ≤ ·) := inferInstance #align ennreal.covariant_class_mul_le ENNReal.covariantClass_mul_le instance covariantClass_add_le : CovariantClass ℝ≥0∞ ℝ≥0∞ (· + ·) (· ≤ ·) := inferInstance #align ennreal.covariant_class_add_le ENNReal.covariantClass_add_le -- Porting note (#11215): TODO: add a `WithTop` instance and use it here noncomputable instance : LinearOrderedCommMonoidWithZero ℝ≥0∞ := { inferInstanceAs (LinearOrderedAddCommMonoidWithTop ℝ≥0∞), inferInstanceAs (CommSemiring ℝ≥0∞) with mul_le_mul_left := fun _ _ => mul_le_mul_left' zero_le_one := zero_le 1 } noncomputable instance : Unique (AddUnits ℝ≥0∞) where default := 0 uniq a := AddUnits.ext <| le_zero_iff.1 <| by rw [← a.add_neg]; exact le_self_add instance : Inhabited ℝ≥0∞ := ⟨0⟩ @[coe, match_pattern] def ofNNReal : ℝ≥0 → ℝ≥0∞ := WithTop.some instance : Coe ℝ≥0 ℝ≥0∞ := ⟨ofNNReal⟩ @[elab_as_elim, induction_eliminator, cases_eliminator] def recTopCoe {C : ℝ≥0∞ → Sort*} (top : C ∞) (coe : ∀ x : ℝ≥0, C x) (x : ℝ≥0∞) : C x := WithTop.recTopCoe top coe x instance canLift : CanLift ℝ≥0∞ ℝ≥0 ofNNReal (· ≠ ∞) := WithTop.canLift #align ennreal.can_lift ENNReal.canLift @[simp] theorem none_eq_top : (none : ℝ≥0∞) = ∞ := rfl #align ennreal.none_eq_top ENNReal.none_eq_top @[simp] theorem some_eq_coe (a : ℝ≥0) : (Option.some a : ℝ≥0∞) = (↑a : ℝ≥0∞) := rfl #align ennreal.some_eq_coe ENNReal.some_eq_coe @[simp] theorem some_eq_coe' (a : ℝ≥0) : (WithTop.some a : ℝ≥0∞) = (↑a : ℝ≥0∞) := rfl lemma coe_injective : Injective ((↑) : ℝ≥0 → ℝ≥0∞) := WithTop.coe_injective @[simp, norm_cast] lemma coe_inj : (p : ℝ≥0∞) = q ↔ p = q := coe_injective.eq_iff #align ennreal.coe_eq_coe ENNReal.coe_inj lemma coe_ne_coe : (p : ℝ≥0∞) ≠ q ↔ p ≠ q := coe_inj.not theorem range_coe' : range ofNNReal = Iio ∞ := WithTop.range_coe theorem range_coe : range ofNNReal = {∞}ᶜ := (isCompl_range_some_none ℝ≥0).symm.compl_eq.symm protected def toNNReal : ℝ≥0∞ → ℝ≥0 := WithTop.untop' 0 #align ennreal.to_nnreal ENNReal.toNNReal protected def toReal (a : ℝ≥0∞) : Real := a.toNNReal #align ennreal.to_real ENNReal.toReal protected noncomputable def ofReal (r : Real) : ℝ≥0∞ := r.toNNReal #align ennreal.of_real ENNReal.ofReal @[simp, norm_cast] theorem toNNReal_coe : (r : ℝ≥0∞).toNNReal = r := rfl #align ennreal.to_nnreal_coe ENNReal.toNNReal_coe @[simp] theorem coe_toNNReal : ∀ {a : ℝ≥0∞}, a ≠ ∞ → ↑a.toNNReal = a | ofNNReal _, _ => rfl | ⊤, h => (h rfl).elim #align ennreal.coe_to_nnreal ENNReal.coe_toNNReal @[simp]
Mathlib/Data/ENNReal/Basic.lean
212
213
theorem ofReal_toReal {a : ℝ≥0∞} (h : a ≠ ∞) : ENNReal.ofReal a.toReal = a := by
simp [ENNReal.toReal, ENNReal.ofReal, h]
1
2.718282
0
0
1
149
import Mathlib.MeasureTheory.Function.AEEqFun.DomAct import Mathlib.MeasureTheory.Function.LpSpace set_option autoImplicit true open MeasureTheory Filter open scoped ENNReal namespace DomMulAct variable {M N α E : Type*} [MeasurableSpace M] [MeasurableSpace N] [MeasurableSpace α] [NormedAddCommGroup E] {μ : MeasureTheory.Measure α} {p : ℝ≥0∞} section SMul variable [SMul M α] [SMulInvariantMeasure M α μ] [MeasurableSMul M α] @[to_additive] instance : SMul Mᵈᵐᵃ (Lp E p μ) where smul c f := Lp.compMeasurePreserving (mk.symm c • ·) (measurePreserving_smul _ _) f @[to_additive (attr := simp)] theorem smul_Lp_val (c : Mᵈᵐᵃ) (f : Lp E p μ) : (c • f).1 = c • f.1 := rfl @[to_additive] theorem smul_Lp_ae_eq (c : Mᵈᵐᵃ) (f : Lp E p μ) : c • f =ᵐ[μ] (f <| mk.symm c • ·) := Lp.coeFn_compMeasurePreserving _ _ @[to_additive] theorem mk_smul_toLp (c : M) {f : α → E} (hf : Memℒp f p μ) : mk c • hf.toLp f = (hf.comp_measurePreserving <| measurePreserving_smul c μ).toLp (f <| c • ·) := rfl @[to_additive (attr := simp)] theorem smul_Lp_const [IsFiniteMeasure μ] (c : Mᵈᵐᵃ) (a : E) : c • Lp.const p μ a = Lp.const p μ a := rfl instance [SMul N α] [SMulCommClass M N α] [SMulInvariantMeasure N α μ] [MeasurableSMul N α] : SMulCommClass Mᵈᵐᵃ Nᵈᵐᵃ (Lp E p μ) := Subtype.val_injective.smulCommClass (fun _ _ ↦ rfl) fun _ _ ↦ rfl instance [NormedRing 𝕜] [Module 𝕜 E] [BoundedSMul 𝕜 E] : SMulCommClass Mᵈᵐᵃ 𝕜 (Lp E p μ) := Subtype.val_injective.smulCommClass (fun _ _ ↦ rfl) fun _ _ ↦ rfl instance [NormedRing 𝕜] [Module 𝕜 E] [BoundedSMul 𝕜 E] : SMulCommClass 𝕜 Mᵈᵐᵃ (Lp E p μ) := .symm _ _ _ -- We don't have a typeclass for additive versions of the next few lemmas -- Should we add `AddDistribAddAction` with `to_additive` both from `MulDistribMulAction` -- and `DistribMulAction`? @[to_additive]
Mathlib/MeasureTheory/Function/LpSpace/DomAct/Basic.lean
70
71
theorem smul_Lp_add (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f + g) = c • f + c • g := by
rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl
1
2.718282
0
0
5
150
import Mathlib.MeasureTheory.Function.AEEqFun.DomAct import Mathlib.MeasureTheory.Function.LpSpace set_option autoImplicit true open MeasureTheory Filter open scoped ENNReal namespace DomMulAct variable {M N α E : Type*} [MeasurableSpace M] [MeasurableSpace N] [MeasurableSpace α] [NormedAddCommGroup E] {μ : MeasureTheory.Measure α} {p : ℝ≥0∞} section SMul variable [SMul M α] [SMulInvariantMeasure M α μ] [MeasurableSMul M α] @[to_additive] instance : SMul Mᵈᵐᵃ (Lp E p μ) where smul c f := Lp.compMeasurePreserving (mk.symm c • ·) (measurePreserving_smul _ _) f @[to_additive (attr := simp)] theorem smul_Lp_val (c : Mᵈᵐᵃ) (f : Lp E p μ) : (c • f).1 = c • f.1 := rfl @[to_additive] theorem smul_Lp_ae_eq (c : Mᵈᵐᵃ) (f : Lp E p μ) : c • f =ᵐ[μ] (f <| mk.symm c • ·) := Lp.coeFn_compMeasurePreserving _ _ @[to_additive] theorem mk_smul_toLp (c : M) {f : α → E} (hf : Memℒp f p μ) : mk c • hf.toLp f = (hf.comp_measurePreserving <| measurePreserving_smul c μ).toLp (f <| c • ·) := rfl @[to_additive (attr := simp)] theorem smul_Lp_const [IsFiniteMeasure μ] (c : Mᵈᵐᵃ) (a : E) : c • Lp.const p μ a = Lp.const p μ a := rfl instance [SMul N α] [SMulCommClass M N α] [SMulInvariantMeasure N α μ] [MeasurableSMul N α] : SMulCommClass Mᵈᵐᵃ Nᵈᵐᵃ (Lp E p μ) := Subtype.val_injective.smulCommClass (fun _ _ ↦ rfl) fun _ _ ↦ rfl instance [NormedRing 𝕜] [Module 𝕜 E] [BoundedSMul 𝕜 E] : SMulCommClass Mᵈᵐᵃ 𝕜 (Lp E p μ) := Subtype.val_injective.smulCommClass (fun _ _ ↦ rfl) fun _ _ ↦ rfl instance [NormedRing 𝕜] [Module 𝕜 E] [BoundedSMul 𝕜 E] : SMulCommClass 𝕜 Mᵈᵐᵃ (Lp E p μ) := .symm _ _ _ -- We don't have a typeclass for additive versions of the next few lemmas -- Should we add `AddDistribAddAction` with `to_additive` both from `MulDistribMulAction` -- and `DistribMulAction`? @[to_additive] theorem smul_Lp_add (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f + g) = c • f + c • g := by rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl attribute [simp] DomAddAct.vadd_Lp_add @[to_additive (attr := simp 1001)] theorem smul_Lp_zero (c : Mᵈᵐᵃ) : c • (0 : Lp E p μ) = 0 := rfl @[to_additive]
Mathlib/MeasureTheory/Function/LpSpace/DomAct/Basic.lean
78
79
theorem smul_Lp_neg (c : Mᵈᵐᵃ) (f : Lp E p μ) : c • (-f) = -(c • f) := by
rcases f with ⟨⟨_⟩, _⟩; rfl
1
2.718282
0
0
5
150
import Mathlib.MeasureTheory.Function.AEEqFun.DomAct import Mathlib.MeasureTheory.Function.LpSpace set_option autoImplicit true open MeasureTheory Filter open scoped ENNReal namespace DomMulAct variable {M N α E : Type*} [MeasurableSpace M] [MeasurableSpace N] [MeasurableSpace α] [NormedAddCommGroup E] {μ : MeasureTheory.Measure α} {p : ℝ≥0∞} section SMul variable [SMul M α] [SMulInvariantMeasure M α μ] [MeasurableSMul M α] @[to_additive] instance : SMul Mᵈᵐᵃ (Lp E p μ) where smul c f := Lp.compMeasurePreserving (mk.symm c • ·) (measurePreserving_smul _ _) f @[to_additive (attr := simp)] theorem smul_Lp_val (c : Mᵈᵐᵃ) (f : Lp E p μ) : (c • f).1 = c • f.1 := rfl @[to_additive] theorem smul_Lp_ae_eq (c : Mᵈᵐᵃ) (f : Lp E p μ) : c • f =ᵐ[μ] (f <| mk.symm c • ·) := Lp.coeFn_compMeasurePreserving _ _ @[to_additive] theorem mk_smul_toLp (c : M) {f : α → E} (hf : Memℒp f p μ) : mk c • hf.toLp f = (hf.comp_measurePreserving <| measurePreserving_smul c μ).toLp (f <| c • ·) := rfl @[to_additive (attr := simp)] theorem smul_Lp_const [IsFiniteMeasure μ] (c : Mᵈᵐᵃ) (a : E) : c • Lp.const p μ a = Lp.const p μ a := rfl instance [SMul N α] [SMulCommClass M N α] [SMulInvariantMeasure N α μ] [MeasurableSMul N α] : SMulCommClass Mᵈᵐᵃ Nᵈᵐᵃ (Lp E p μ) := Subtype.val_injective.smulCommClass (fun _ _ ↦ rfl) fun _ _ ↦ rfl instance [NormedRing 𝕜] [Module 𝕜 E] [BoundedSMul 𝕜 E] : SMulCommClass Mᵈᵐᵃ 𝕜 (Lp E p μ) := Subtype.val_injective.smulCommClass (fun _ _ ↦ rfl) fun _ _ ↦ rfl instance [NormedRing 𝕜] [Module 𝕜 E] [BoundedSMul 𝕜 E] : SMulCommClass 𝕜 Mᵈᵐᵃ (Lp E p μ) := .symm _ _ _ -- We don't have a typeclass for additive versions of the next few lemmas -- Should we add `AddDistribAddAction` with `to_additive` both from `MulDistribMulAction` -- and `DistribMulAction`? @[to_additive] theorem smul_Lp_add (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f + g) = c • f + c • g := by rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl attribute [simp] DomAddAct.vadd_Lp_add @[to_additive (attr := simp 1001)] theorem smul_Lp_zero (c : Mᵈᵐᵃ) : c • (0 : Lp E p μ) = 0 := rfl @[to_additive] theorem smul_Lp_neg (c : Mᵈᵐᵃ) (f : Lp E p μ) : c • (-f) = -(c • f) := by rcases f with ⟨⟨_⟩, _⟩; rfl @[to_additive]
Mathlib/MeasureTheory/Function/LpSpace/DomAct/Basic.lean
82
83
theorem smul_Lp_sub (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f - g) = c • f - c • g := by
rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl
1
2.718282
0
0
5
150
import Mathlib.MeasureTheory.Function.AEEqFun.DomAct import Mathlib.MeasureTheory.Function.LpSpace set_option autoImplicit true open MeasureTheory Filter open scoped ENNReal namespace DomMulAct variable {M N α E : Type*} [MeasurableSpace M] [MeasurableSpace N] [MeasurableSpace α] [NormedAddCommGroup E] {μ : MeasureTheory.Measure α} {p : ℝ≥0∞} section SMul variable [SMul M α] [SMulInvariantMeasure M α μ] [MeasurableSMul M α] @[to_additive] instance : SMul Mᵈᵐᵃ (Lp E p μ) where smul c f := Lp.compMeasurePreserving (mk.symm c • ·) (measurePreserving_smul _ _) f @[to_additive (attr := simp)] theorem smul_Lp_val (c : Mᵈᵐᵃ) (f : Lp E p μ) : (c • f).1 = c • f.1 := rfl @[to_additive] theorem smul_Lp_ae_eq (c : Mᵈᵐᵃ) (f : Lp E p μ) : c • f =ᵐ[μ] (f <| mk.symm c • ·) := Lp.coeFn_compMeasurePreserving _ _ @[to_additive] theorem mk_smul_toLp (c : M) {f : α → E} (hf : Memℒp f p μ) : mk c • hf.toLp f = (hf.comp_measurePreserving <| measurePreserving_smul c μ).toLp (f <| c • ·) := rfl @[to_additive (attr := simp)] theorem smul_Lp_const [IsFiniteMeasure μ] (c : Mᵈᵐᵃ) (a : E) : c • Lp.const p μ a = Lp.const p μ a := rfl instance [SMul N α] [SMulCommClass M N α] [SMulInvariantMeasure N α μ] [MeasurableSMul N α] : SMulCommClass Mᵈᵐᵃ Nᵈᵐᵃ (Lp E p μ) := Subtype.val_injective.smulCommClass (fun _ _ ↦ rfl) fun _ _ ↦ rfl instance [NormedRing 𝕜] [Module 𝕜 E] [BoundedSMul 𝕜 E] : SMulCommClass Mᵈᵐᵃ 𝕜 (Lp E p μ) := Subtype.val_injective.smulCommClass (fun _ _ ↦ rfl) fun _ _ ↦ rfl instance [NormedRing 𝕜] [Module 𝕜 E] [BoundedSMul 𝕜 E] : SMulCommClass 𝕜 Mᵈᵐᵃ (Lp E p μ) := .symm _ _ _ -- We don't have a typeclass for additive versions of the next few lemmas -- Should we add `AddDistribAddAction` with `to_additive` both from `MulDistribMulAction` -- and `DistribMulAction`? @[to_additive] theorem smul_Lp_add (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f + g) = c • f + c • g := by rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl attribute [simp] DomAddAct.vadd_Lp_add @[to_additive (attr := simp 1001)] theorem smul_Lp_zero (c : Mᵈᵐᵃ) : c • (0 : Lp E p μ) = 0 := rfl @[to_additive] theorem smul_Lp_neg (c : Mᵈᵐᵃ) (f : Lp E p μ) : c • (-f) = -(c • f) := by rcases f with ⟨⟨_⟩, _⟩; rfl @[to_additive] theorem smul_Lp_sub (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f - g) = c • f - c • g := by rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl instance : DistribSMul Mᵈᵐᵃ (Lp E p μ) where smul_zero _ := rfl smul_add := by rintro _ ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl -- The next few lemmas follow from the `IsometricSMul` instance if `1 ≤ p` @[to_additive (attr := simp)] theorem norm_smul_Lp (c : Mᵈᵐᵃ) (f : Lp E p μ) : ‖c • f‖ = ‖f‖ := Lp.norm_compMeasurePreserving _ _ @[to_additive (attr := simp)] theorem nnnorm_smul_Lp (c : Mᵈᵐᵃ) (f : Lp E p μ) : ‖c • f‖₊ = ‖f‖₊ := NNReal.eq <| Lp.norm_compMeasurePreserving _ _ @[to_additive (attr := simp)]
Mathlib/MeasureTheory/Function/LpSpace/DomAct/Basic.lean
99
100
theorem dist_smul_Lp (c : Mᵈᵐᵃ) (f g : Lp E p μ) : dist (c • f) (c • g) = dist f g := by
simp only [dist, ← smul_Lp_sub, norm_smul_Lp]
1
2.718282
0
0
5
150
import Mathlib.MeasureTheory.Function.AEEqFun.DomAct import Mathlib.MeasureTheory.Function.LpSpace set_option autoImplicit true open MeasureTheory Filter open scoped ENNReal namespace DomMulAct variable {M N α E : Type*} [MeasurableSpace M] [MeasurableSpace N] [MeasurableSpace α] [NormedAddCommGroup E] {μ : MeasureTheory.Measure α} {p : ℝ≥0∞} section SMul variable [SMul M α] [SMulInvariantMeasure M α μ] [MeasurableSMul M α] @[to_additive] instance : SMul Mᵈᵐᵃ (Lp E p μ) where smul c f := Lp.compMeasurePreserving (mk.symm c • ·) (measurePreserving_smul _ _) f @[to_additive (attr := simp)] theorem smul_Lp_val (c : Mᵈᵐᵃ) (f : Lp E p μ) : (c • f).1 = c • f.1 := rfl @[to_additive] theorem smul_Lp_ae_eq (c : Mᵈᵐᵃ) (f : Lp E p μ) : c • f =ᵐ[μ] (f <| mk.symm c • ·) := Lp.coeFn_compMeasurePreserving _ _ @[to_additive] theorem mk_smul_toLp (c : M) {f : α → E} (hf : Memℒp f p μ) : mk c • hf.toLp f = (hf.comp_measurePreserving <| measurePreserving_smul c μ).toLp (f <| c • ·) := rfl @[to_additive (attr := simp)] theorem smul_Lp_const [IsFiniteMeasure μ] (c : Mᵈᵐᵃ) (a : E) : c • Lp.const p μ a = Lp.const p μ a := rfl instance [SMul N α] [SMulCommClass M N α] [SMulInvariantMeasure N α μ] [MeasurableSMul N α] : SMulCommClass Mᵈᵐᵃ Nᵈᵐᵃ (Lp E p μ) := Subtype.val_injective.smulCommClass (fun _ _ ↦ rfl) fun _ _ ↦ rfl instance [NormedRing 𝕜] [Module 𝕜 E] [BoundedSMul 𝕜 E] : SMulCommClass Mᵈᵐᵃ 𝕜 (Lp E p μ) := Subtype.val_injective.smulCommClass (fun _ _ ↦ rfl) fun _ _ ↦ rfl instance [NormedRing 𝕜] [Module 𝕜 E] [BoundedSMul 𝕜 E] : SMulCommClass 𝕜 Mᵈᵐᵃ (Lp E p μ) := .symm _ _ _ -- We don't have a typeclass for additive versions of the next few lemmas -- Should we add `AddDistribAddAction` with `to_additive` both from `MulDistribMulAction` -- and `DistribMulAction`? @[to_additive] theorem smul_Lp_add (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f + g) = c • f + c • g := by rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl attribute [simp] DomAddAct.vadd_Lp_add @[to_additive (attr := simp 1001)] theorem smul_Lp_zero (c : Mᵈᵐᵃ) : c • (0 : Lp E p μ) = 0 := rfl @[to_additive] theorem smul_Lp_neg (c : Mᵈᵐᵃ) (f : Lp E p μ) : c • (-f) = -(c • f) := by rcases f with ⟨⟨_⟩, _⟩; rfl @[to_additive] theorem smul_Lp_sub (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f - g) = c • f - c • g := by rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl instance : DistribSMul Mᵈᵐᵃ (Lp E p μ) where smul_zero _ := rfl smul_add := by rintro _ ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl -- The next few lemmas follow from the `IsometricSMul` instance if `1 ≤ p` @[to_additive (attr := simp)] theorem norm_smul_Lp (c : Mᵈᵐᵃ) (f : Lp E p μ) : ‖c • f‖ = ‖f‖ := Lp.norm_compMeasurePreserving _ _ @[to_additive (attr := simp)] theorem nnnorm_smul_Lp (c : Mᵈᵐᵃ) (f : Lp E p μ) : ‖c • f‖₊ = ‖f‖₊ := NNReal.eq <| Lp.norm_compMeasurePreserving _ _ @[to_additive (attr := simp)] theorem dist_smul_Lp (c : Mᵈᵐᵃ) (f g : Lp E p μ) : dist (c • f) (c • g) = dist f g := by simp only [dist, ← smul_Lp_sub, norm_smul_Lp] @[to_additive (attr := simp)]
Mathlib/MeasureTheory/Function/LpSpace/DomAct/Basic.lean
103
104
theorem edist_smul_Lp (c : Mᵈᵐᵃ) (f g : Lp E p μ) : edist (c • f) (c • g) = edist f g := by
simp only [Lp.edist_dist, dist_smul_Lp]
1
2.718282
0
0
5
150
import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.Algebra.Star.SelfAdjoint #align_import algebra.star.order from "leanprover-community/mathlib"@"31c24aa72e7b3e5ed97a8412470e904f82b81004" open Set open scoped NNRat universe u variable {R : Type u} class StarOrderedRing (R : Type u) [NonUnitalSemiring R] [PartialOrder R] [StarRing R] : Prop where le_iff : ∀ x y : R, x ≤ y ↔ ∃ p, p ∈ AddSubmonoid.closure (Set.range fun s => star s * s) ∧ y = x + p #align star_ordered_ring StarOrderedRing namespace StarOrderedRing -- see note [lower instance priority] instance (priority := 100) toOrderedAddCommMonoid [NonUnitalSemiring R] [PartialOrder R] [StarRing R] [StarOrderedRing R] : OrderedAddCommMonoid R where add_le_add_left := fun x y hle z ↦ by rw [StarOrderedRing.le_iff] at hle ⊢ refine hle.imp fun s hs ↦ ?_ rw [hs.2, add_assoc] exact ⟨hs.1, rfl⟩ #align star_ordered_ring.to_ordered_add_comm_monoid StarOrderedRing.toOrderedAddCommMonoid -- see note [lower instance priority] instance (priority := 100) toExistsAddOfLE [NonUnitalSemiring R] [PartialOrder R] [StarRing R] [StarOrderedRing R] : ExistsAddOfLE R where exists_add_of_le h := match (le_iff _ _).mp h with | ⟨p, _, hp⟩ => ⟨p, hp⟩ #align star_ordered_ring.to_has_exists_add_of_le StarOrderedRing.toExistsAddOfLE -- see note [lower instance priority] instance (priority := 100) toOrderedAddCommGroup [NonUnitalRing R] [PartialOrder R] [StarRing R] [StarOrderedRing R] : OrderedAddCommGroup R where add_le_add_left := @add_le_add_left _ _ _ _ #align star_ordered_ring.to_ordered_add_comm_group StarOrderedRing.toOrderedAddCommGroup lemma of_le_iff [NonUnitalSemiring R] [PartialOrder R] [StarRing R] (h_le_iff : ∀ x y : R, x ≤ y ↔ ∃ s, y = x + star s * s) : StarOrderedRing R where le_iff x y := by refine ⟨fun h => ?_, ?_⟩ · obtain ⟨p, hp⟩ := (h_le_iff x y).mp h exact ⟨star p * p, AddSubmonoid.subset_closure ⟨p, rfl⟩, hp⟩ · rintro ⟨p, hp, hpxy⟩ revert x y hpxy refine AddSubmonoid.closure_induction hp ?_ (fun x y h => add_zero x ▸ h.ge) ?_ · rintro _ ⟨s, rfl⟩ x y rfl exact (h_le_iff _ _).mpr ⟨s, rfl⟩ · rintro a b ha hb x y rfl rw [← add_assoc] exact (ha _ _ rfl).trans (hb _ _ rfl) #align star_ordered_ring.of_le_iff StarOrderedRing.of_le_iffₓ lemma of_nonneg_iff [NonUnitalRing R] [PartialOrder R] [StarRing R] (h_add : ∀ {x y : R}, x ≤ y → ∀ z, z + x ≤ z + y) (h_nonneg_iff : ∀ x : R, 0 ≤ x ↔ x ∈ AddSubmonoid.closure (Set.range fun s : R => star s * s)) : StarOrderedRing R where le_iff x y := by haveI : CovariantClass R R (· + ·) (· ≤ ·) := ⟨fun _ _ _ h => h_add h _⟩ simpa only [← sub_eq_iff_eq_add', sub_nonneg, exists_eq_right'] using h_nonneg_iff (y - x) #align star_ordered_ring.of_nonneg_iff StarOrderedRing.of_nonneg_iff lemma of_nonneg_iff' [NonUnitalRing R] [PartialOrder R] [StarRing R] (h_add : ∀ {x y : R}, x ≤ y → ∀ z, z + x ≤ z + y) (h_nonneg_iff : ∀ x : R, 0 ≤ x ↔ ∃ s, x = star s * s) : StarOrderedRing R := of_le_iff <| by haveI : CovariantClass R R (· + ·) (· ≤ ·) := ⟨fun _ _ _ h => h_add h _⟩ simpa [sub_eq_iff_eq_add', sub_nonneg] using fun x y => h_nonneg_iff (y - x) #align star_ordered_ring.of_nonneg_iff' StarOrderedRing.of_nonneg_iff'
Mathlib/Algebra/Star/Order.lean
137
139
theorem nonneg_iff [NonUnitalSemiring R] [PartialOrder R] [StarRing R] [StarOrderedRing R] {x : R} : 0 ≤ x ↔ x ∈ AddSubmonoid.closure (Set.range fun s : R => star s * s) := by
simp only [le_iff, zero_add, exists_eq_right']
1
2.718282
0
0
1
151
import Mathlib.Algebra.Module.Equiv #align_import linear_algebra.general_linear_group from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9" variable (R M : Type*) namespace LinearMap variable [Semiring R] [AddCommMonoid M] [Module R M] abbrev GeneralLinearGroup := (M →ₗ[R] M)ˣ #align linear_map.general_linear_group LinearMap.GeneralLinearGroup namespace GeneralLinearGroup variable {R M} def toLinearEquiv (f : GeneralLinearGroup R M) : M ≃ₗ[R] M := { f.val with invFun := f.inv.toFun left_inv := fun m ↦ show (f.inv * f.val) m = m by erw [f.inv_val]; simp right_inv := fun m ↦ show (f.val * f.inv) m = m by erw [f.val_inv]; simp } #align linear_map.general_linear_group.to_linear_equiv LinearMap.GeneralLinearGroup.toLinearEquiv def ofLinearEquiv (f : M ≃ₗ[R] M) : GeneralLinearGroup R M where val := f inv := (f.symm : M →ₗ[R] M) val_inv := LinearMap.ext fun _ ↦ f.apply_symm_apply _ inv_val := LinearMap.ext fun _ ↦ f.symm_apply_apply _ #align linear_map.general_linear_group.of_linear_equiv LinearMap.GeneralLinearGroup.ofLinearEquiv variable (R M) def generalLinearEquiv : GeneralLinearGroup R M ≃* M ≃ₗ[R] M where toFun := toLinearEquiv invFun := ofLinearEquiv left_inv f := by ext; rfl right_inv f := by ext; rfl map_mul' x y := by ext; rfl #align linear_map.general_linear_group.general_linear_equiv LinearMap.GeneralLinearGroup.generalLinearEquiv @[simp]
Mathlib/LinearAlgebra/GeneralLinearGroup.lean
68
69
theorem generalLinearEquiv_to_linearMap (f : GeneralLinearGroup R M) : (generalLinearEquiv R M f : M →ₗ[R] M) = f := by
ext; rfl
1
2.718282
0
0
1
152
import Mathlib.CategoryTheory.Monoidal.Functor #align_import category_theory.monoidal.End from "leanprover-community/mathlib"@"85075bccb68ab7fa49fb05db816233fb790e4fe9" universe v u namespace CategoryTheory variable (C : Type u) [Category.{v} C] def endofunctorMonoidalCategory : MonoidalCategory (C ⥤ C) where tensorObj F G := F ⋙ G whiskerLeft X _ _ F := whiskerLeft X F whiskerRight F X := whiskerRight F X tensorHom α β := α ◫ β tensorUnit := 𝟭 C associator F G H := Functor.associator F G H leftUnitor F := Functor.leftUnitor F rightUnitor F := Functor.rightUnitor F #align category_theory.endofunctor_monoidal_category CategoryTheory.endofunctorMonoidalCategory open CategoryTheory.MonoidalCategory attribute [local instance] endofunctorMonoidalCategory @[simp] theorem endofunctorMonoidalCategory_tensorUnit_obj (X : C) : (𝟙_ (C ⥤ C)).obj X = X := rfl @[simp] theorem endofunctorMonoidalCategory_tensorUnit_map {X Y : C} (f : X ⟶ Y) : (𝟙_ (C ⥤ C)).map f = f := rfl @[simp] theorem endofunctorMonoidalCategory_tensorObj_obj (F G : C ⥤ C) (X : C) : (F ⊗ G).obj X = G.obj (F.obj X) := rfl @[simp] theorem endofunctorMonoidalCategory_tensorObj_map (F G : C ⥤ C) {X Y : C} (f : X ⟶ Y) : (F ⊗ G).map f = G.map (F.map f) := rfl @[simp] theorem endofunctorMonoidalCategory_tensorMap_app {F G H K : C ⥤ C} {α : F ⟶ G} {β : H ⟶ K} (X : C) : (α ⊗ β).app X = β.app (F.obj X) ≫ K.map (α.app X) := rfl @[simp] theorem endofunctorMonoidalCategory_whiskerLeft_app {F H K : C ⥤ C} {β : H ⟶ K} (X : C) : (F ◁ β).app X = β.app (F.obj X) := rfl @[simp] theorem endofunctorMonoidalCategory_whiskerRight_app {F G H : C ⥤ C} {α : F ⟶ G} (X : C) : (α ▷ H).app X = H.map (α.app X) := rfl @[simp] theorem endofunctorMonoidalCategory_associator_hom_app (F G H : C ⥤ C) (X : C) : (α_ F G H).hom.app X = 𝟙 _ := rfl @[simp] theorem endofunctorMonoidalCategory_associator_inv_app (F G H : C ⥤ C) (X : C) : (α_ F G H).inv.app X = 𝟙 _ := rfl @[simp] theorem endofunctorMonoidalCategory_leftUnitor_hom_app (F : C ⥤ C) (X : C) : (λ_ F).hom.app X = 𝟙 _ := rfl @[simp] theorem endofunctorMonoidalCategory_leftUnitor_inv_app (F : C ⥤ C) (X : C) : (λ_ F).inv.app X = 𝟙 _ := rfl @[simp] theorem endofunctorMonoidalCategory_rightUnitor_hom_app (F : C ⥤ C) (X : C) : (ρ_ F).hom.app X = 𝟙 _ := rfl @[simp] theorem endofunctorMonoidalCategory_rightUnitor_inv_app (F : C ⥤ C) (X : C) : (ρ_ F).inv.app X = 𝟙 _ := rfl @[simps!] def tensoringRightMonoidal [MonoidalCategory.{v} C] : MonoidalFunctor C (C ⥤ C) := { tensoringRight C with ε := (rightUnitorNatIso C).inv μ := fun X Y => (isoWhiskerRight (curriedAssociatorNatIso C) ((evaluation C (C ⥤ C)).obj X ⋙ (evaluation C C).obj Y)).hom } #align category_theory.tensoring_right_monoidal CategoryTheory.tensoringRightMonoidal variable {C} variable {M : Type*} [Category M] [MonoidalCategory M] (F : MonoidalFunctor M (C ⥤ C)) @[reassoc (attr := simp)] theorem μ_hom_inv_app (i j : M) (X : C) : (F.μ i j).app X ≫ (F.μIso i j).inv.app X = 𝟙 _ := (F.μIso i j).hom_inv_id_app X #align category_theory.μ_hom_inv_app CategoryTheory.μ_hom_inv_app @[reassoc (attr := simp)] theorem μ_inv_hom_app (i j : M) (X : C) : (F.μIso i j).inv.app X ≫ (F.μ i j).app X = 𝟙 _ := (F.μIso i j).inv_hom_id_app X #align category_theory.μ_inv_hom_app CategoryTheory.μ_inv_hom_app @[reassoc (attr := simp)] theorem ε_hom_inv_app (X : C) : F.ε.app X ≫ F.εIso.inv.app X = 𝟙 _ := F.εIso.hom_inv_id_app X #align category_theory.ε_hom_inv_app CategoryTheory.ε_hom_inv_app @[reassoc (attr := simp)] theorem ε_inv_hom_app (X : C) : F.εIso.inv.app X ≫ F.ε.app X = 𝟙 _ := F.εIso.inv_hom_id_app X #align category_theory.ε_inv_hom_app CategoryTheory.ε_inv_hom_app @[reassoc (attr := simp)] theorem ε_naturality {X Y : C} (f : X ⟶ Y) : F.ε.app X ≫ (F.obj (𝟙_ M)).map f = f ≫ F.ε.app Y := (F.ε.naturality f).symm #align category_theory.ε_naturality CategoryTheory.ε_naturality @[reassoc (attr := simp)]
Mathlib/CategoryTheory/Monoidal/End.lean
129
131
theorem ε_inv_naturality {X Y : C} (f : X ⟶ Y) : (MonoidalFunctor.εIso F).inv.app X ≫ (𝟙_ (C ⥤ C)).map f = F.εIso.inv.app X ≫ f := by
aesop_cat
1
2.718282
0
0
1
153
import Mathlib.Algebra.Order.Nonneg.Ring import Mathlib.Algebra.Order.Ring.Rat import Mathlib.Data.Int.Lemmas #align_import data.rat.nnrat from "leanprover-community/mathlib"@"b3f4f007a962e3787aa0f3b5c7942a1317f7d88e" open Function deriving instance CanonicallyOrderedCommSemiring for NNRat deriving instance CanonicallyLinearOrderedAddCommMonoid for NNRat deriving instance Sub for NNRat deriving instance Inhabited for NNRat -- TODO: `deriving instance OrderedSub for NNRat` doesn't work yet, so we add the instance manually instance NNRat.instOrderedSub : OrderedSub ℚ≥0 := Nonneg.orderedSub namespace NNRat variable {α : Type*} {p q : ℚ≥0} @[simp] lemma val_eq_cast (q : ℚ≥0) : q.1 = q := rfl #align nnrat.val_eq_coe NNRat.val_eq_cast instance canLift : CanLift ℚ ℚ≥0 (↑) fun q ↦ 0 ≤ q where prf q hq := ⟨⟨q, hq⟩, rfl⟩ #align nnrat.can_lift NNRat.canLift @[ext] theorem ext : (p : ℚ) = (q : ℚ) → p = q := Subtype.ext #align nnrat.ext NNRat.ext protected theorem coe_injective : Injective ((↑) : ℚ≥0 → ℚ) := Subtype.coe_injective #align nnrat.coe_injective NNRat.coe_injective @[simp, norm_cast] theorem coe_inj : (p : ℚ) = q ↔ p = q := Subtype.coe_inj #align nnrat.coe_inj NNRat.coe_inj theorem ext_iff : p = q ↔ (p : ℚ) = q := Subtype.ext_iff #align nnrat.ext_iff NNRat.ext_iff theorem ne_iff {x y : ℚ≥0} : (x : ℚ) ≠ (y : ℚ) ↔ x ≠ y := NNRat.coe_inj.not #align nnrat.ne_iff NNRat.ne_iff -- TODO: We have to write `NNRat.cast` explicitly, else the statement picks up `Subtype.val` instead @[simp, norm_cast] lemma coe_mk (q : ℚ) (hq) : NNRat.cast ⟨q, hq⟩ = q := rfl #align nnrat.coe_mk NNRat.coe_mk lemma «forall» {p : ℚ≥0 → Prop} : (∀ q, p q) ↔ ∀ q hq, p ⟨q, hq⟩ := Subtype.forall lemma «exists» {p : ℚ≥0 → Prop} : (∃ q, p q) ↔ ∃ q hq, p ⟨q, hq⟩ := Subtype.exists def _root_.Rat.toNNRat (q : ℚ) : ℚ≥0 := ⟨max q 0, le_max_right _ _⟩ #align rat.to_nnrat Rat.toNNRat theorem _root_.Rat.coe_toNNRat (q : ℚ) (hq : 0 ≤ q) : (q.toNNRat : ℚ) = q := max_eq_left hq #align rat.coe_to_nnrat Rat.coe_toNNRat theorem _root_.Rat.le_coe_toNNRat (q : ℚ) : q ≤ q.toNNRat := le_max_left _ _ #align rat.le_coe_to_nnrat Rat.le_coe_toNNRat open Rat (toNNRat) @[simp] theorem coe_nonneg (q : ℚ≥0) : (0 : ℚ) ≤ q := q.2 #align nnrat.coe_nonneg NNRat.coe_nonneg -- eligible for dsimp @[simp, nolint simpNF, norm_cast] lemma coe_zero : ((0 : ℚ≥0) : ℚ) = 0 := rfl #align nnrat.coe_zero NNRat.coe_zero -- eligible for dsimp @[simp, nolint simpNF, norm_cast] lemma coe_one : ((1 : ℚ≥0) : ℚ) = 1 := rfl #align nnrat.coe_one NNRat.coe_one @[simp, norm_cast] theorem coe_add (p q : ℚ≥0) : ((p + q : ℚ≥0) : ℚ) = p + q := rfl #align nnrat.coe_add NNRat.coe_add @[simp, norm_cast] theorem coe_mul (p q : ℚ≥0) : ((p * q : ℚ≥0) : ℚ) = p * q := rfl #align nnrat.coe_mul NNRat.coe_mul -- eligible for dsimp @[simp, nolint simpNF, norm_cast] lemma coe_pow (q : ℚ≥0) (n : ℕ) : (↑(q ^ n) : ℚ) = (q : ℚ) ^ n := rfl #align nnrat.coe_pow NNRat.coe_pow @[simp] lemma num_pow (q : ℚ≥0) (n : ℕ) : (q ^ n).num = q.num ^ n := by simp [num, Int.natAbs_pow] @[simp] lemma den_pow (q : ℚ≥0) (n : ℕ) : (q ^ n).den = q.den ^ n := rfl -- Porting note: `bit0` `bit1` are deprecated, so remove these theorems. #noalign nnrat.coe_bit0 #noalign nnrat.coe_bit1 @[simp, norm_cast] theorem coe_sub (h : q ≤ p) : ((p - q : ℚ≥0) : ℚ) = p - q := max_eq_left <| le_sub_comm.2 <| by rwa [sub_zero] #align nnrat.coe_sub NNRat.coe_sub @[simp]
Mathlib/Data/NNRat/Defs.lean
142
142
theorem coe_eq_zero : (q : ℚ) = 0 ↔ q = 0 := by
norm_cast
1
2.718282
0
0
1
154
import Mathlib.Analysis.Complex.Circle import Mathlib.Analysis.SpecialFunctions.Complex.Log #align_import analysis.special_functions.complex.circle from "leanprover-community/mathlib"@"f333194f5ecd1482191452c5ea60b37d4d6afa08" open Complex Function Set open Real
Mathlib/Analysis/SpecialFunctions/Complex/Circle.lean
37
38
theorem arg_expMapCircle {x : ℝ} (h₁ : -π < x) (h₂ : x ≤ π) : arg (expMapCircle x) = x := by
rw [expMapCircle_apply, exp_mul_I, arg_cos_add_sin_mul_I ⟨h₁, h₂⟩]
1
2.718282
0
0
1
155
import Mathlib.Topology.Sets.Opens #align_import topology.sets.closeds from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" open Order OrderDual Set variable {ι α β : Type*} [TopologicalSpace α] [TopologicalSpace β] namespace TopologicalSpace structure Closeds (α : Type*) [TopologicalSpace α] where carrier : Set α closed' : IsClosed carrier #align topological_space.closeds TopologicalSpace.Closeds namespace Closeds instance : SetLike (Closeds α) α where coe := Closeds.carrier coe_injective' s t h := by cases s; cases t; congr instance : CanLift (Set α) (Closeds α) (↑) IsClosed where prf s hs := ⟨⟨s, hs⟩, rfl⟩ theorem closed (s : Closeds α) : IsClosed (s : Set α) := s.closed' #align topological_space.closeds.closed TopologicalSpace.Closeds.closed def Simps.coe (s : Closeds α) : Set α := s initialize_simps_projections Closeds (carrier → coe, as_prefix coe) @[ext] protected theorem ext {s t : Closeds α} (h : (s : Set α) = t) : s = t := SetLike.ext' h #align topological_space.closeds.ext TopologicalSpace.Closeds.ext @[simp] theorem coe_mk (s : Set α) (h) : (mk s h : Set α) = s := rfl #align topological_space.closeds.coe_mk TopologicalSpace.Closeds.coe_mk @[simps] protected def closure (s : Set α) : Closeds α := ⟨closure s, isClosed_closure⟩ #align topological_space.closeds.closure TopologicalSpace.Closeds.closure theorem gc : GaloisConnection Closeds.closure ((↑) : Closeds α → Set α) := fun _ U => ⟨subset_closure.trans, fun h => closure_minimal h U.closed⟩ #align topological_space.closeds.gc TopologicalSpace.Closeds.gc def gi : GaloisInsertion (@Closeds.closure α _) (↑) where choice s hs := ⟨s, closure_eq_iff_isClosed.1 <| hs.antisymm subset_closure⟩ gc := gc le_l_u _ := subset_closure choice_eq _s hs := SetLike.coe_injective <| subset_closure.antisymm hs #align topological_space.closeds.gi TopologicalSpace.Closeds.gi instance completeLattice : CompleteLattice (Closeds α) := CompleteLattice.copy (GaloisInsertion.liftCompleteLattice gi) -- le _ rfl -- top ⟨univ, isClosed_univ⟩ rfl -- bot ⟨∅, isClosed_empty⟩ (SetLike.coe_injective closure_empty.symm) -- sup (fun s t => ⟨s ∪ t, s.2.union t.2⟩) (funext fun s => funext fun t => SetLike.coe_injective (s.2.union t.2).closure_eq.symm) -- inf (fun s t => ⟨s ∩ t, s.2.inter t.2⟩) rfl -- sSup _ rfl -- sInf (fun S => ⟨⋂ s ∈ S, ↑s, isClosed_biInter fun s _ => s.2⟩) (funext fun _ => SetLike.coe_injective sInf_image.symm) instance : Inhabited (Closeds α) := ⟨⊥⟩ @[simp, norm_cast]
Mathlib/Topology/Sets/Closeds.lean
110
111
theorem coe_sup (s t : Closeds α) : (↑(s ⊔ t) : Set α) = ↑s ∪ ↑t := by
rfl
1
2.718282
0
0
1
156
import Mathlib.Data.List.Sort import Mathlib.Data.Multiset.Basic #align_import data.multiset.sort from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace Multiset open List variable {α : Type*} section sort variable (r : α → α → Prop) [DecidableRel r] [IsTrans α r] [IsAntisymm α r] [IsTotal α r] def sort (s : Multiset α) : List α := Quot.liftOn s (mergeSort r) fun _ _ h => eq_of_perm_of_sorted ((perm_mergeSort _ _).trans <| h.trans (perm_mergeSort _ _).symm) (sorted_mergeSort r _) (sorted_mergeSort r _) #align multiset.sort Multiset.sort @[simp] theorem coe_sort (l : List α) : sort r l = mergeSort r l := rfl #align multiset.coe_sort Multiset.coe_sort @[simp] theorem sort_sorted (s : Multiset α) : Sorted r (sort r s) := Quot.inductionOn s fun _l => sorted_mergeSort r _ #align multiset.sort_sorted Multiset.sort_sorted @[simp] theorem sort_eq (s : Multiset α) : ↑(sort r s) = s := Quot.inductionOn s fun _ => Quot.sound <| perm_mergeSort _ _ #align multiset.sort_eq Multiset.sort_eq @[simp]
Mathlib/Data/Multiset/Sort.lean
50
50
theorem mem_sort {s : Multiset α} {a : α} : a ∈ sort r s ↔ a ∈ s := by
rw [← mem_coe, sort_eq]
1
2.718282
0
0
1
157
import Mathlib.Data.Int.Interval import Mathlib.Data.Int.ModEq import Mathlib.Data.Nat.Count import Mathlib.Data.Rat.Floor import Mathlib.Order.Interval.Finset.Nat open Finset Int namespace Int variable (a b : ℤ) {r : ℤ} (hr : 0 < r) lemma Ico_filter_dvd_eq : (Ico a b).filter (r ∣ ·) = (Ico ⌈a / (r : ℚ)⌉ ⌈b / (r : ℚ)⌉).map ⟨(· * r), mul_left_injective₀ hr.ne'⟩ := by ext x simp only [mem_map, mem_filter, mem_Ico, ceil_le, lt_ceil, div_le_iff, lt_div_iff, dvd_iff_exists_eq_mul_left, cast_pos.2 hr, ← cast_mul, cast_lt, cast_le] aesop lemma Ioc_filter_dvd_eq : (Ioc a b).filter (r ∣ ·) = (Ioc ⌊a / (r : ℚ)⌋ ⌊b / (r : ℚ)⌋).map ⟨(· * r), mul_left_injective₀ hr.ne'⟩ := by ext x simp only [mem_map, mem_filter, mem_Ioc, floor_lt, le_floor, div_lt_iff, le_div_iff, dvd_iff_exists_eq_mul_left, cast_pos.2 hr, ← cast_mul, cast_lt, cast_le] aesop
Mathlib/Data/Int/CardIntervalMod.lean
42
44
theorem Ico_filter_dvd_card : ((Ico a b).filter (r ∣ ·)).card = max (⌈b / (r : ℚ)⌉ - ⌈a / (r : ℚ)⌉) 0 := by
rw [Ico_filter_dvd_eq _ _ hr, card_map, card_Ico, toNat_eq_max]
1
2.718282
0
0
4
158
import Mathlib.Data.Int.Interval import Mathlib.Data.Int.ModEq import Mathlib.Data.Nat.Count import Mathlib.Data.Rat.Floor import Mathlib.Order.Interval.Finset.Nat open Finset Int namespace Int variable (a b : ℤ) {r : ℤ} (hr : 0 < r) lemma Ico_filter_dvd_eq : (Ico a b).filter (r ∣ ·) = (Ico ⌈a / (r : ℚ)⌉ ⌈b / (r : ℚ)⌉).map ⟨(· * r), mul_left_injective₀ hr.ne'⟩ := by ext x simp only [mem_map, mem_filter, mem_Ico, ceil_le, lt_ceil, div_le_iff, lt_div_iff, dvd_iff_exists_eq_mul_left, cast_pos.2 hr, ← cast_mul, cast_lt, cast_le] aesop lemma Ioc_filter_dvd_eq : (Ioc a b).filter (r ∣ ·) = (Ioc ⌊a / (r : ℚ)⌋ ⌊b / (r : ℚ)⌋).map ⟨(· * r), mul_left_injective₀ hr.ne'⟩ := by ext x simp only [mem_map, mem_filter, mem_Ioc, floor_lt, le_floor, div_lt_iff, le_div_iff, dvd_iff_exists_eq_mul_left, cast_pos.2 hr, ← cast_mul, cast_lt, cast_le] aesop theorem Ico_filter_dvd_card : ((Ico a b).filter (r ∣ ·)).card = max (⌈b / (r : ℚ)⌉ - ⌈a / (r : ℚ)⌉) 0 := by rw [Ico_filter_dvd_eq _ _ hr, card_map, card_Ico, toNat_eq_max]
Mathlib/Data/Int/CardIntervalMod.lean
47
49
theorem Ioc_filter_dvd_card : ((Ioc a b).filter (r ∣ ·)).card = max (⌊b / (r : ℚ)⌋ - ⌊a / (r : ℚ)⌋) 0 := by
rw [Ioc_filter_dvd_eq _ _ hr, card_map, card_Ioc, toNat_eq_max]
1
2.718282
0
0
4
158
import Mathlib.Data.Int.Interval import Mathlib.Data.Int.ModEq import Mathlib.Data.Nat.Count import Mathlib.Data.Rat.Floor import Mathlib.Order.Interval.Finset.Nat open Finset Int namespace Int variable (a b : ℤ) {r : ℤ} (hr : 0 < r) lemma Ico_filter_dvd_eq : (Ico a b).filter (r ∣ ·) = (Ico ⌈a / (r : ℚ)⌉ ⌈b / (r : ℚ)⌉).map ⟨(· * r), mul_left_injective₀ hr.ne'⟩ := by ext x simp only [mem_map, mem_filter, mem_Ico, ceil_le, lt_ceil, div_le_iff, lt_div_iff, dvd_iff_exists_eq_mul_left, cast_pos.2 hr, ← cast_mul, cast_lt, cast_le] aesop lemma Ioc_filter_dvd_eq : (Ioc a b).filter (r ∣ ·) = (Ioc ⌊a / (r : ℚ)⌋ ⌊b / (r : ℚ)⌋).map ⟨(· * r), mul_left_injective₀ hr.ne'⟩ := by ext x simp only [mem_map, mem_filter, mem_Ioc, floor_lt, le_floor, div_lt_iff, le_div_iff, dvd_iff_exists_eq_mul_left, cast_pos.2 hr, ← cast_mul, cast_lt, cast_le] aesop theorem Ico_filter_dvd_card : ((Ico a b).filter (r ∣ ·)).card = max (⌈b / (r : ℚ)⌉ - ⌈a / (r : ℚ)⌉) 0 := by rw [Ico_filter_dvd_eq _ _ hr, card_map, card_Ico, toNat_eq_max] theorem Ioc_filter_dvd_card : ((Ioc a b).filter (r ∣ ·)).card = max (⌊b / (r : ℚ)⌋ - ⌊a / (r : ℚ)⌋) 0 := by rw [Ioc_filter_dvd_eq _ _ hr, card_map, card_Ioc, toNat_eq_max] lemma Ico_filter_modEq_eq (v : ℤ) : (Ico a b).filter (· ≡ v [ZMOD r]) = ((Ico (a - v) (b - v)).filter (r ∣ ·)).map ⟨(· + v), add_left_injective v⟩ := by ext x simp_rw [mem_map, mem_filter, mem_Ico, Function.Embedding.coeFn_mk, ← eq_sub_iff_add_eq, exists_eq_right, modEq_comm, modEq_iff_dvd, sub_lt_sub_iff_right, sub_le_sub_iff_right] lemma Ioc_filter_modEq_eq (v : ℤ) : (Ioc a b).filter (· ≡ v [ZMOD r]) = ((Ioc (a - v) (b - v)).filter (r ∣ ·)).map ⟨(· + v), add_left_injective v⟩ := by ext x simp_rw [mem_map, mem_filter, mem_Ioc, Function.Embedding.coeFn_mk, ← eq_sub_iff_add_eq, exists_eq_right, modEq_comm, modEq_iff_dvd, sub_lt_sub_iff_right, sub_le_sub_iff_right]
Mathlib/Data/Int/CardIntervalMod.lean
65
67
theorem Ico_filter_modEq_card (v : ℤ) : ((Ico a b).filter (· ≡ v [ZMOD r])).card = max (⌈(b - v) / (r : ℚ)⌉ - ⌈(a - v) / (r : ℚ)⌉) 0 := by
simp [Ico_filter_modEq_eq, Ico_filter_dvd_eq, toNat_eq_max, hr]
1
2.718282
0
0
4
158