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.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] 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]
Mathlib/Data/Int/CardIntervalMod.lean
71
73
theorem Ioc_filter_modEq_card (v : β„€) : ((Ioc a b).filter (Β· ≑ v [ZMOD r])).card = max (⌊(b - v) / (r : β„š)βŒ‹ - ⌊(a - v) / (r : β„š)βŒ‹) 0 := by
simp [Ioc_filter_modEq_eq, Ioc_filter_dvd_eq, toNat_eq_max, hr]
1
2.718282
0
0
4
158
import Mathlib.Algebra.BigOperators.Group.Finset #align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace Nat variable {ΞΉ : Type*}
Mathlib/Data/Nat/GCD/BigOperators.lean
20
22
theorem coprime_list_prod_left_iff {l : List β„•} {k : β„•} : Coprime l.prod k ↔ βˆ€ n ∈ l, Coprime n k := by
induction l <;> simp [Nat.coprime_mul_iff_left, *]
1
2.718282
0
0
8
159
import Mathlib.Algebra.BigOperators.Group.Finset #align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace Nat variable {ΞΉ : Type*} theorem coprime_list_prod_left_iff {l : List β„•} {k : β„•} : Coprime l.prod k ↔ βˆ€ n ∈ l, Coprime n k := by induction l <;> simp [Nat.coprime_mul_iff_left, *]
Mathlib/Data/Nat/GCD/BigOperators.lean
24
26
theorem coprime_list_prod_right_iff {k : β„•} {l : List β„•} : Coprime k l.prod ↔ βˆ€ n ∈ l, Coprime k n := by
simp_rw [coprime_comm (n := k), coprime_list_prod_left_iff]
1
2.718282
0
0
8
159
import Mathlib.Algebra.BigOperators.Group.Finset #align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace Nat variable {ΞΉ : Type*} theorem coprime_list_prod_left_iff {l : List β„•} {k : β„•} : Coprime l.prod k ↔ βˆ€ n ∈ l, Coprime n k := by induction l <;> simp [Nat.coprime_mul_iff_left, *] theorem coprime_list_prod_right_iff {k : β„•} {l : List β„•} : Coprime k l.prod ↔ βˆ€ n ∈ l, Coprime k n := by simp_rw [coprime_comm (n := k), coprime_list_prod_left_iff]
Mathlib/Data/Nat/GCD/BigOperators.lean
28
30
theorem coprime_multiset_prod_left_iff {m : Multiset β„•} {k : β„•} : Coprime m.prod k ↔ βˆ€ n ∈ m, Coprime n k := by
induction m using Quotient.inductionOn; simpa using coprime_list_prod_left_iff
1
2.718282
0
0
8
159
import Mathlib.Algebra.BigOperators.Group.Finset #align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace Nat variable {ΞΉ : Type*} theorem coprime_list_prod_left_iff {l : List β„•} {k : β„•} : Coprime l.prod k ↔ βˆ€ n ∈ l, Coprime n k := by induction l <;> simp [Nat.coprime_mul_iff_left, *] theorem coprime_list_prod_right_iff {k : β„•} {l : List β„•} : Coprime k l.prod ↔ βˆ€ n ∈ l, Coprime k n := by simp_rw [coprime_comm (n := k), coprime_list_prod_left_iff] theorem coprime_multiset_prod_left_iff {m : Multiset β„•} {k : β„•} : Coprime m.prod k ↔ βˆ€ n ∈ m, Coprime n k := by induction m using Quotient.inductionOn; simpa using coprime_list_prod_left_iff
Mathlib/Data/Nat/GCD/BigOperators.lean
32
34
theorem coprime_multiset_prod_right_iff {k : β„•} {m : Multiset β„•} : Coprime k m.prod ↔ βˆ€ n ∈ m, Coprime k n := by
induction m using Quotient.inductionOn; simpa using coprime_list_prod_right_iff
1
2.718282
0
0
8
159
import Mathlib.Algebra.BigOperators.Group.Finset #align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace Nat variable {ΞΉ : Type*} theorem coprime_list_prod_left_iff {l : List β„•} {k : β„•} : Coprime l.prod k ↔ βˆ€ n ∈ l, Coprime n k := by induction l <;> simp [Nat.coprime_mul_iff_left, *] theorem coprime_list_prod_right_iff {k : β„•} {l : List β„•} : Coprime k l.prod ↔ βˆ€ n ∈ l, Coprime k n := by simp_rw [coprime_comm (n := k), coprime_list_prod_left_iff] theorem coprime_multiset_prod_left_iff {m : Multiset β„•} {k : β„•} : Coprime m.prod k ↔ βˆ€ n ∈ m, Coprime n k := by induction m using Quotient.inductionOn; simpa using coprime_list_prod_left_iff theorem coprime_multiset_prod_right_iff {k : β„•} {m : Multiset β„•} : Coprime k m.prod ↔ βˆ€ n ∈ m, Coprime k n := by induction m using Quotient.inductionOn; simpa using coprime_list_prod_right_iff
Mathlib/Data/Nat/GCD/BigOperators.lean
36
38
theorem coprime_prod_left_iff {t : Finset ΞΉ} {s : ΞΉ β†’ β„•} {x : β„•} : Coprime (∏ i ∈ t, s i) x ↔ βˆ€ i ∈ t, Coprime (s i) x := by
simpa using coprime_multiset_prod_left_iff (m := t.val.map s)
1
2.718282
0
0
8
159
import Mathlib.Algebra.BigOperators.Group.Finset #align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace Nat variable {ΞΉ : Type*} theorem coprime_list_prod_left_iff {l : List β„•} {k : β„•} : Coprime l.prod k ↔ βˆ€ n ∈ l, Coprime n k := by induction l <;> simp [Nat.coprime_mul_iff_left, *] theorem coprime_list_prod_right_iff {k : β„•} {l : List β„•} : Coprime k l.prod ↔ βˆ€ n ∈ l, Coprime k n := by simp_rw [coprime_comm (n := k), coprime_list_prod_left_iff] theorem coprime_multiset_prod_left_iff {m : Multiset β„•} {k : β„•} : Coprime m.prod k ↔ βˆ€ n ∈ m, Coprime n k := by induction m using Quotient.inductionOn; simpa using coprime_list_prod_left_iff theorem coprime_multiset_prod_right_iff {k : β„•} {m : Multiset β„•} : Coprime k m.prod ↔ βˆ€ n ∈ m, Coprime k n := by induction m using Quotient.inductionOn; simpa using coprime_list_prod_right_iff theorem coprime_prod_left_iff {t : Finset ΞΉ} {s : ΞΉ β†’ β„•} {x : β„•} : Coprime (∏ i ∈ t, s i) x ↔ βˆ€ i ∈ t, Coprime (s i) x := by simpa using coprime_multiset_prod_left_iff (m := t.val.map s)
Mathlib/Data/Nat/GCD/BigOperators.lean
40
42
theorem coprime_prod_right_iff {x : β„•} {t : Finset ΞΉ} {s : ΞΉ β†’ β„•} : Coprime x (∏ i ∈ t, s i) ↔ βˆ€ i ∈ t, Coprime x (s i) := by
simpa using coprime_multiset_prod_right_iff (m := t.val.map s)
1
2.718282
0
0
8
159
import Mathlib.Algebra.BigOperators.Group.Finset #align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace Nat variable {ΞΉ : Type*} theorem coprime_list_prod_left_iff {l : List β„•} {k : β„•} : Coprime l.prod k ↔ βˆ€ n ∈ l, Coprime n k := by induction l <;> simp [Nat.coprime_mul_iff_left, *] theorem coprime_list_prod_right_iff {k : β„•} {l : List β„•} : Coprime k l.prod ↔ βˆ€ n ∈ l, Coprime k n := by simp_rw [coprime_comm (n := k), coprime_list_prod_left_iff] theorem coprime_multiset_prod_left_iff {m : Multiset β„•} {k : β„•} : Coprime m.prod k ↔ βˆ€ n ∈ m, Coprime n k := by induction m using Quotient.inductionOn; simpa using coprime_list_prod_left_iff theorem coprime_multiset_prod_right_iff {k : β„•} {m : Multiset β„•} : Coprime k m.prod ↔ βˆ€ n ∈ m, Coprime k n := by induction m using Quotient.inductionOn; simpa using coprime_list_prod_right_iff theorem coprime_prod_left_iff {t : Finset ΞΉ} {s : ΞΉ β†’ β„•} {x : β„•} : Coprime (∏ i ∈ t, s i) x ↔ βˆ€ i ∈ t, Coprime (s i) x := by simpa using coprime_multiset_prod_left_iff (m := t.val.map s) theorem coprime_prod_right_iff {x : β„•} {t : Finset ΞΉ} {s : ΞΉ β†’ β„•} : Coprime x (∏ i ∈ t, s i) ↔ βˆ€ i ∈ t, Coprime x (s i) := by simpa using coprime_multiset_prod_right_iff (m := t.val.map s) alias ⟨_, Coprime.prod_left⟩ := coprime_prod_left_iff #align nat.coprime_prod_left Nat.Coprime.prod_left alias ⟨_, Coprime.prod_right⟩ := coprime_prod_right_iff #align nat.coprime_prod_right Nat.Coprime.prod_right
Mathlib/Data/Nat/GCD/BigOperators.lean
52
54
theorem coprime_fintype_prod_left_iff [Fintype ΞΉ] {s : ΞΉ β†’ β„•} {x : β„•} : Coprime (∏ i, s i) x ↔ βˆ€ i, Coprime (s i) x := by
simp [coprime_prod_left_iff]
1
2.718282
0
0
8
159
import Mathlib.Algebra.BigOperators.Group.Finset #align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace Nat variable {ΞΉ : Type*} theorem coprime_list_prod_left_iff {l : List β„•} {k : β„•} : Coprime l.prod k ↔ βˆ€ n ∈ l, Coprime n k := by induction l <;> simp [Nat.coprime_mul_iff_left, *] theorem coprime_list_prod_right_iff {k : β„•} {l : List β„•} : Coprime k l.prod ↔ βˆ€ n ∈ l, Coprime k n := by simp_rw [coprime_comm (n := k), coprime_list_prod_left_iff] theorem coprime_multiset_prod_left_iff {m : Multiset β„•} {k : β„•} : Coprime m.prod k ↔ βˆ€ n ∈ m, Coprime n k := by induction m using Quotient.inductionOn; simpa using coprime_list_prod_left_iff theorem coprime_multiset_prod_right_iff {k : β„•} {m : Multiset β„•} : Coprime k m.prod ↔ βˆ€ n ∈ m, Coprime k n := by induction m using Quotient.inductionOn; simpa using coprime_list_prod_right_iff theorem coprime_prod_left_iff {t : Finset ΞΉ} {s : ΞΉ β†’ β„•} {x : β„•} : Coprime (∏ i ∈ t, s i) x ↔ βˆ€ i ∈ t, Coprime (s i) x := by simpa using coprime_multiset_prod_left_iff (m := t.val.map s) theorem coprime_prod_right_iff {x : β„•} {t : Finset ΞΉ} {s : ΞΉ β†’ β„•} : Coprime x (∏ i ∈ t, s i) ↔ βˆ€ i ∈ t, Coprime x (s i) := by simpa using coprime_multiset_prod_right_iff (m := t.val.map s) alias ⟨_, Coprime.prod_left⟩ := coprime_prod_left_iff #align nat.coprime_prod_left Nat.Coprime.prod_left alias ⟨_, Coprime.prod_right⟩ := coprime_prod_right_iff #align nat.coprime_prod_right Nat.Coprime.prod_right theorem coprime_fintype_prod_left_iff [Fintype ΞΉ] {s : ΞΉ β†’ β„•} {x : β„•} : Coprime (∏ i, s i) x ↔ βˆ€ i, Coprime (s i) x := by simp [coprime_prod_left_iff]
Mathlib/Data/Nat/GCD/BigOperators.lean
56
58
theorem coprime_fintype_prod_right_iff [Fintype ΞΉ] {x : β„•} {s : ΞΉ β†’ β„•} : Coprime x (∏ i, s i) ↔ βˆ€ i, Coprime x (s i) := by
simp [coprime_prod_right_iff]
1
2.718282
0
0
8
159
import Mathlib.LinearAlgebra.CliffordAlgebra.Grading import Mathlib.LinearAlgebra.TensorProduct.Graded.Internal import Mathlib.LinearAlgebra.QuadraticForm.Prod suppress_compilation variable {R M₁ Mβ‚‚ N : Type*} variable [CommRing R] [AddCommGroup M₁] [AddCommGroup Mβ‚‚] [AddCommGroup N] variable [Module R M₁] [Module R Mβ‚‚] [Module R N] variable (Q₁ : QuadraticForm R M₁) (Qβ‚‚ : QuadraticForm R Mβ‚‚) (Qβ‚™ : QuadraticForm R N) open scoped TensorProduct namespace CliffordAlgebra section map_mul_map variable {Q₁ Qβ‚‚ Qβ‚™} variable (f₁ : Q₁ β†’qα΅’ Qβ‚™) (fβ‚‚ : Qβ‚‚ β†’qα΅’ Qβ‚™) (hf : βˆ€ x y, Qβ‚™.IsOrtho (f₁ x) (fβ‚‚ y)) variable (m₁ : CliffordAlgebra Q₁) (mβ‚‚ : CliffordAlgebra Qβ‚‚) nonrec theorem map_mul_map_of_isOrtho_of_mem_evenOdd {i₁ iβ‚‚ : ZMod 2} (hm₁ : m₁ ∈ evenOdd Q₁ i₁) (hmβ‚‚ : mβ‚‚ ∈ evenOdd Qβ‚‚ iβ‚‚) : map f₁ m₁ * map fβ‚‚ mβ‚‚ = (-1 : β„€Λ£) ^ (iβ‚‚ * i₁) β€’ (map fβ‚‚ mβ‚‚ * map f₁ m₁) := by -- the strategy; for each variable, induct on powers of `ΞΉ`, then on the exponent of each -- power. induction hm₁ using Submodule.iSup_induction' with | zero => rw [map_zero, zero_mul, mul_zero, smul_zero] | add _ _ _ _ ihx ihy => rw [map_add, add_mul, mul_add, ihx, ihy, smul_add] | mem i₁' m₁' hm₁ => obtain ⟨i₁n, rfl⟩ := i₁' dsimp only at * induction hm₁ using Submodule.pow_induction_on_left' with | algebraMap => rw [AlgHom.commutes, Nat.cast_zero, mul_zero, uzpow_zero, one_smul, Algebra.commutes] | add _ _ _ _ _ ihx ihy => rw [map_add, add_mul, mul_add, ihx, ihy, smul_add] | mem_mul m₁ hm₁ i x₁ _hx₁ ih₁ => obtain ⟨v₁, rfl⟩ := hm₁ -- this is the first interesting goal rw [map_mul, mul_assoc, ih₁, mul_smul_comm, map_apply_ΞΉ, Nat.cast_succ, mul_add_one, uzpow_add, mul_smul, ← mul_assoc, ← mul_assoc, ← smul_mul_assoc ((-1) ^ iβ‚‚)] clear ih₁ congr 2 induction hmβ‚‚ using Submodule.iSup_induction' with | zero => rw [map_zero, zero_mul, mul_zero, smul_zero] | add _ _ _ _ ihx ihy => rw [map_add, add_mul, mul_add, ihx, ihy, smul_add] | mem iβ‚‚' mβ‚‚' hmβ‚‚ => clear mβ‚‚ obtain ⟨iβ‚‚n, rfl⟩ := iβ‚‚' dsimp only at * induction hmβ‚‚ using Submodule.pow_induction_on_left' with | algebraMap => rw [AlgHom.commutes, Nat.cast_zero, uzpow_zero, one_smul, Algebra.commutes] | add _ _ _ _ _ ihx ihy => rw [map_add, add_mul, mul_add, ihx, ihy, smul_add] | mem_mul mβ‚‚ hmβ‚‚ i xβ‚‚ _hxβ‚‚ ihβ‚‚ => obtain ⟨vβ‚‚, rfl⟩ := hmβ‚‚ -- this is the second interesting goal rw [map_mul, map_apply_ΞΉ, Nat.cast_succ, ← mul_assoc, ΞΉ_mul_ΞΉ_comm_of_isOrtho (hf _ _), neg_mul, mul_assoc, ihβ‚‚, mul_smul_comm, ← mul_assoc, ← Units.neg_smul, uzpow_add, uzpow_one, mul_neg_one] theorem commute_map_mul_map_of_isOrtho_of_mem_evenOdd_zero_left {iβ‚‚ : ZMod 2} (hm₁ : m₁ ∈ evenOdd Q₁ 0) (hmβ‚‚ : mβ‚‚ ∈ evenOdd Qβ‚‚ iβ‚‚) : Commute (map f₁ m₁) (map fβ‚‚ mβ‚‚) := (map_mul_map_of_isOrtho_of_mem_evenOdd _ _ hf _ _ hm₁ hmβ‚‚).trans <| by simp theorem commute_map_mul_map_of_isOrtho_of_mem_evenOdd_zero_right {i₁ : ZMod 2} (hm₁ : m₁ ∈ evenOdd Q₁ i₁) (hmβ‚‚ : mβ‚‚ ∈ evenOdd Qβ‚‚ 0) : Commute (map f₁ m₁) (map fβ‚‚ mβ‚‚) := (map_mul_map_of_isOrtho_of_mem_evenOdd _ _ hf _ _ hm₁ hmβ‚‚).trans <| by simp
Mathlib/LinearAlgebra/CliffordAlgebra/Prod.lean
101
104
theorem map_mul_map_eq_neg_of_isOrtho_of_mem_evenOdd_one (hm₁ : m₁ ∈ evenOdd Q₁ 1) (hmβ‚‚ : mβ‚‚ ∈ evenOdd Qβ‚‚ 1) : map f₁ m₁ * map fβ‚‚ mβ‚‚ = - map fβ‚‚ mβ‚‚ * map f₁ m₁ := by
simp [map_mul_map_of_isOrtho_of_mem_evenOdd _ _ hf _ _ hm₁ hmβ‚‚]
1
2.718282
0
0
1
160
import Mathlib.Algebra.Group.Pi.Lemmas import Mathlib.Topology.Algebra.Monoid import Mathlib.Topology.Homeomorph #align_import topology.algebra.group_with_zero from "leanprover-community/mathlib"@"c10e724be91096453ee3db13862b9fb9a992fef2" open Topology Filter Function variable {Ξ± Ξ² Gβ‚€ : Type*} section DivConst variable [DivInvMonoid Gβ‚€] [TopologicalSpace Gβ‚€] [ContinuousMul Gβ‚€] {f : Ξ± β†’ Gβ‚€} {s : Set Ξ±} {l : Filter Ξ±}
Mathlib/Topology/Algebra/GroupWithZero.lean
52
54
theorem Filter.Tendsto.div_const {x : Gβ‚€} (hf : Tendsto f l (𝓝 x)) (y : Gβ‚€) : Tendsto (fun a => f a / y) l (𝓝 (x / y)) := by
simpa only [div_eq_mul_inv] using hf.mul tendsto_const_nhds
1
2.718282
0
0
3
161
import Mathlib.Algebra.Group.Pi.Lemmas import Mathlib.Topology.Algebra.Monoid import Mathlib.Topology.Homeomorph #align_import topology.algebra.group_with_zero from "leanprover-community/mathlib"@"c10e724be91096453ee3db13862b9fb9a992fef2" open Topology Filter Function variable {Ξ± Ξ² Gβ‚€ : Type*} section DivConst variable [DivInvMonoid Gβ‚€] [TopologicalSpace Gβ‚€] [ContinuousMul Gβ‚€] {f : Ξ± β†’ Gβ‚€} {s : Set Ξ±} {l : Filter Ξ±} theorem Filter.Tendsto.div_const {x : Gβ‚€} (hf : Tendsto f l (𝓝 x)) (y : Gβ‚€) : Tendsto (fun a => f a / y) l (𝓝 (x / y)) := by simpa only [div_eq_mul_inv] using hf.mul tendsto_const_nhds #align filter.tendsto.div_const Filter.Tendsto.div_const variable [TopologicalSpace Ξ±] nonrec theorem ContinuousAt.div_const {a : Ξ±} (hf : ContinuousAt f a) (y : Gβ‚€) : ContinuousAt (fun x => f x / y) a := hf.div_const y #align continuous_at.div_const ContinuousAt.div_const nonrec theorem ContinuousWithinAt.div_const {a} (hf : ContinuousWithinAt f s a) (y : Gβ‚€) : ContinuousWithinAt (fun x => f x / y) s a := hf.div_const _ #align continuous_within_at.div_const ContinuousWithinAt.div_const
Mathlib/Topology/Algebra/GroupWithZero.lean
69
71
theorem ContinuousOn.div_const (hf : ContinuousOn f s) (y : Gβ‚€) : ContinuousOn (fun x => f x / y) s := by
simpa only [div_eq_mul_inv] using hf.mul continuousOn_const
1
2.718282
0
0
3
161
import Mathlib.Algebra.Group.Pi.Lemmas import Mathlib.Topology.Algebra.Monoid import Mathlib.Topology.Homeomorph #align_import topology.algebra.group_with_zero from "leanprover-community/mathlib"@"c10e724be91096453ee3db13862b9fb9a992fef2" open Topology Filter Function variable {Ξ± Ξ² Gβ‚€ : Type*} section DivConst variable [DivInvMonoid Gβ‚€] [TopologicalSpace Gβ‚€] [ContinuousMul Gβ‚€] {f : Ξ± β†’ Gβ‚€} {s : Set Ξ±} {l : Filter Ξ±} theorem Filter.Tendsto.div_const {x : Gβ‚€} (hf : Tendsto f l (𝓝 x)) (y : Gβ‚€) : Tendsto (fun a => f a / y) l (𝓝 (x / y)) := by simpa only [div_eq_mul_inv] using hf.mul tendsto_const_nhds #align filter.tendsto.div_const Filter.Tendsto.div_const variable [TopologicalSpace Ξ±] nonrec theorem ContinuousAt.div_const {a : Ξ±} (hf : ContinuousAt f a) (y : Gβ‚€) : ContinuousAt (fun x => f x / y) a := hf.div_const y #align continuous_at.div_const ContinuousAt.div_const nonrec theorem ContinuousWithinAt.div_const {a} (hf : ContinuousWithinAt f s a) (y : Gβ‚€) : ContinuousWithinAt (fun x => f x / y) s a := hf.div_const _ #align continuous_within_at.div_const ContinuousWithinAt.div_const theorem ContinuousOn.div_const (hf : ContinuousOn f s) (y : Gβ‚€) : ContinuousOn (fun x => f x / y) s := by simpa only [div_eq_mul_inv] using hf.mul continuousOn_const #align continuous_on.div_const ContinuousOn.div_const @[continuity]
Mathlib/Topology/Algebra/GroupWithZero.lean
75
76
theorem Continuous.div_const (hf : Continuous f) (y : Gβ‚€) : Continuous fun x => f x / y := by
simpa only [div_eq_mul_inv] using hf.mul continuous_const
1
2.718282
0
0
3
161
import Mathlib.Analysis.Calculus.FDeriv.Basic import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace #align_import analysis.calculus.deriv.basic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal NNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] def HasDerivAtFilter (f : π•œ β†’ F) (f' : F) (x : π•œ) (L : Filter π•œ) := HasFDerivAtFilter f (smulRight (1 : π•œ β†’L[π•œ] π•œ) f') x L #align has_deriv_at_filter HasDerivAtFilter def HasDerivWithinAt (f : π•œ β†’ F) (f' : F) (s : Set π•œ) (x : π•œ) := HasDerivAtFilter f f' x (𝓝[s] x) #align has_deriv_within_at HasDerivWithinAt def HasDerivAt (f : π•œ β†’ F) (f' : F) (x : π•œ) := HasDerivAtFilter f f' x (𝓝 x) #align has_deriv_at HasDerivAt def HasStrictDerivAt (f : π•œ β†’ F) (f' : F) (x : π•œ) := HasStrictFDerivAt f (smulRight (1 : π•œ β†’L[π•œ] π•œ) f') x #align has_strict_deriv_at HasStrictDerivAt def derivWithin (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) := fderivWithin π•œ f s x 1 #align deriv_within derivWithin def deriv (f : π•œ β†’ F) (x : π•œ) := fderiv π•œ f x 1 #align deriv deriv variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ}
Mathlib/Analysis/Calculus/Deriv/Basic.lean
161
162
theorem hasFDerivAtFilter_iff_hasDerivAtFilter {f' : π•œ β†’L[π•œ] F} : HasFDerivAtFilter f f' x L ↔ HasDerivAtFilter f (f' 1) x L := by
simp [HasDerivAtFilter]
1
2.718282
0
0
2
162
import Mathlib.Analysis.Calculus.FDeriv.Basic import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace #align_import analysis.calculus.deriv.basic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal NNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] def HasDerivAtFilter (f : π•œ β†’ F) (f' : F) (x : π•œ) (L : Filter π•œ) := HasFDerivAtFilter f (smulRight (1 : π•œ β†’L[π•œ] π•œ) f') x L #align has_deriv_at_filter HasDerivAtFilter def HasDerivWithinAt (f : π•œ β†’ F) (f' : F) (s : Set π•œ) (x : π•œ) := HasDerivAtFilter f f' x (𝓝[s] x) #align has_deriv_within_at HasDerivWithinAt def HasDerivAt (f : π•œ β†’ F) (f' : F) (x : π•œ) := HasDerivAtFilter f f' x (𝓝 x) #align has_deriv_at HasDerivAt def HasStrictDerivAt (f : π•œ β†’ F) (f' : F) (x : π•œ) := HasStrictFDerivAt f (smulRight (1 : π•œ β†’L[π•œ] π•œ) f') x #align has_strict_deriv_at HasStrictDerivAt def derivWithin (f : π•œ β†’ F) (s : Set π•œ) (x : π•œ) := fderivWithin π•œ f s x 1 #align deriv_within derivWithin def deriv (f : π•œ β†’ F) (x : π•œ) := fderiv π•œ f x 1 #align deriv deriv variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} theorem hasFDerivAtFilter_iff_hasDerivAtFilter {f' : π•œ β†’L[π•œ] F} : HasFDerivAtFilter f f' x L ↔ HasDerivAtFilter f (f' 1) x L := by simp [HasDerivAtFilter] #align has_fderiv_at_filter_iff_has_deriv_at_filter hasFDerivAtFilter_iff_hasDerivAtFilter theorem HasFDerivAtFilter.hasDerivAtFilter {f' : π•œ β†’L[π•œ] F} : HasFDerivAtFilter f f' x L β†’ HasDerivAtFilter f (f' 1) x L := hasFDerivAtFilter_iff_hasDerivAtFilter.mp #align has_fderiv_at_filter.has_deriv_at_filter HasFDerivAtFilter.hasDerivAtFilter theorem hasFDerivWithinAt_iff_hasDerivWithinAt {f' : π•œ β†’L[π•œ] F} : HasFDerivWithinAt f f' s x ↔ HasDerivWithinAt f (f' 1) s x := hasFDerivAtFilter_iff_hasDerivAtFilter #align has_fderiv_within_at_iff_has_deriv_within_at hasFDerivWithinAt_iff_hasDerivWithinAt theorem hasDerivWithinAt_iff_hasFDerivWithinAt {f' : F} : HasDerivWithinAt f f' s x ↔ HasFDerivWithinAt f (smulRight (1 : π•œ β†’L[π•œ] π•œ) f') s x := Iff.rfl #align has_deriv_within_at_iff_has_fderiv_within_at hasDerivWithinAt_iff_hasFDerivWithinAt theorem HasFDerivWithinAt.hasDerivWithinAt {f' : π•œ β†’L[π•œ] F} : HasFDerivWithinAt f f' s x β†’ HasDerivWithinAt f (f' 1) s x := hasFDerivWithinAt_iff_hasDerivWithinAt.mp #align has_fderiv_within_at.has_deriv_within_at HasFDerivWithinAt.hasDerivWithinAt theorem HasDerivWithinAt.hasFDerivWithinAt {f' : F} : HasDerivWithinAt f f' s x β†’ HasFDerivWithinAt f (smulRight (1 : π•œ β†’L[π•œ] π•œ) f') s x := hasDerivWithinAt_iff_hasFDerivWithinAt.mp #align has_deriv_within_at.has_fderiv_within_at HasDerivWithinAt.hasFDerivWithinAt theorem hasFDerivAt_iff_hasDerivAt {f' : π•œ β†’L[π•œ] F} : HasFDerivAt f f' x ↔ HasDerivAt f (f' 1) x := hasFDerivAtFilter_iff_hasDerivAtFilter #align has_fderiv_at_iff_has_deriv_at hasFDerivAt_iff_hasDerivAt theorem HasFDerivAt.hasDerivAt {f' : π•œ β†’L[π•œ] F} : HasFDerivAt f f' x β†’ HasDerivAt f (f' 1) x := hasFDerivAt_iff_hasDerivAt.mp #align has_fderiv_at.has_deriv_at HasFDerivAt.hasDerivAt
Mathlib/Analysis/Calculus/Deriv/Basic.lean
201
203
theorem hasStrictFDerivAt_iff_hasStrictDerivAt {f' : π•œ β†’L[π•œ] F} : HasStrictFDerivAt f f' x ↔ HasStrictDerivAt f (f' 1) x := by
simp [HasStrictDerivAt, HasStrictFDerivAt]
1
2.718282
0
0
2
162
import Mathlib.CategoryTheory.NatTrans import Mathlib.CategoryTheory.Iso #align_import category_theory.functor.category from "leanprover-community/mathlib"@"63721b2c3eba6c325ecf8ae8cca27155a4f6306f" namespace CategoryTheory -- declare the `v`'s first; see note [CategoryTheory universes]. universe v₁ vβ‚‚ v₃ u₁ uβ‚‚ u₃ open NatTrans Category CategoryTheory.Functor variable (C : Type u₁) [Category.{v₁} C] (D : Type uβ‚‚) [Category.{vβ‚‚} D] attribute [local simp] vcomp_app variable {C D} {E : Type u₃} [Category.{v₃} E] variable {F G H I : C β₯€ D} instance Functor.category : Category.{max u₁ vβ‚‚} (C β₯€ D) where Hom F G := NatTrans F G id F := NatTrans.id F comp Ξ± Ξ² := vcomp Ξ± Ξ² #align category_theory.functor.category CategoryTheory.Functor.category namespace NatTrans -- Porting note: the behaviour of `ext` has changed here. -- We need to provide a copy of the `NatTrans.ext` lemma, -- written in terms of `F ⟢ G` rather than `NatTrans F G`, -- or `ext` will not retrieve it from the cache. @[ext] theorem ext' {Ξ± Ξ² : F ⟢ G} (w : Ξ±.app = Ξ².app) : Ξ± = Ξ² := NatTrans.ext _ _ w @[simp] theorem vcomp_eq_comp (Ξ± : F ⟢ G) (Ξ² : G ⟢ H) : vcomp Ξ± Ξ² = Ξ± ≫ Ξ² := rfl #align category_theory.nat_trans.vcomp_eq_comp CategoryTheory.NatTrans.vcomp_eq_comp theorem vcomp_app' (Ξ± : F ⟢ G) (Ξ² : G ⟢ H) (X : C) : (Ξ± ≫ Ξ²).app X = Ξ±.app X ≫ Ξ².app X := rfl #align category_theory.nat_trans.vcomp_app' CategoryTheory.NatTrans.vcomp_app'
Mathlib/CategoryTheory/Functor/Category.lean
68
68
theorem congr_app {α β : F ⟢ G} (h : α = β) (X : C) : α.app X = β.app X := by
rw [h]
1
2.718282
0
0
4
163
import Mathlib.CategoryTheory.NatTrans import Mathlib.CategoryTheory.Iso #align_import category_theory.functor.category from "leanprover-community/mathlib"@"63721b2c3eba6c325ecf8ae8cca27155a4f6306f" namespace CategoryTheory -- declare the `v`'s first; see note [CategoryTheory universes]. universe v₁ vβ‚‚ v₃ u₁ uβ‚‚ u₃ open NatTrans Category CategoryTheory.Functor variable (C : Type u₁) [Category.{v₁} C] (D : Type uβ‚‚) [Category.{vβ‚‚} D] attribute [local simp] vcomp_app variable {C D} {E : Type u₃} [Category.{v₃} E] variable {F G H I : C β₯€ D} instance Functor.category : Category.{max u₁ vβ‚‚} (C β₯€ D) where Hom F G := NatTrans F G id F := NatTrans.id F comp Ξ± Ξ² := vcomp Ξ± Ξ² #align category_theory.functor.category CategoryTheory.Functor.category namespace NatTrans -- Porting note: the behaviour of `ext` has changed here. -- We need to provide a copy of the `NatTrans.ext` lemma, -- written in terms of `F ⟢ G` rather than `NatTrans F G`, -- or `ext` will not retrieve it from the cache. @[ext] theorem ext' {Ξ± Ξ² : F ⟢ G} (w : Ξ±.app = Ξ².app) : Ξ± = Ξ² := NatTrans.ext _ _ w @[simp] theorem vcomp_eq_comp (Ξ± : F ⟢ G) (Ξ² : G ⟢ H) : vcomp Ξ± Ξ² = Ξ± ≫ Ξ² := rfl #align category_theory.nat_trans.vcomp_eq_comp CategoryTheory.NatTrans.vcomp_eq_comp theorem vcomp_app' (Ξ± : F ⟢ G) (Ξ² : G ⟢ H) (X : C) : (Ξ± ≫ Ξ²).app X = Ξ±.app X ≫ Ξ².app X := rfl #align category_theory.nat_trans.vcomp_app' CategoryTheory.NatTrans.vcomp_app' theorem congr_app {Ξ± Ξ² : F ⟢ G} (h : Ξ± = Ξ²) (X : C) : Ξ±.app X = Ξ².app X := by rw [h] #align category_theory.nat_trans.congr_app CategoryTheory.NatTrans.congr_app @[simp] theorem id_app (F : C β₯€ D) (X : C) : (πŸ™ F : F ⟢ F).app X = πŸ™ (F.obj X) := rfl #align category_theory.nat_trans.id_app CategoryTheory.NatTrans.id_app @[simp] theorem comp_app {F G H : C β₯€ D} (Ξ± : F ⟢ G) (Ξ² : G ⟢ H) (X : C) : (Ξ± ≫ Ξ²).app X = Ξ±.app X ≫ Ξ².app X := rfl #align category_theory.nat_trans.comp_app CategoryTheory.NatTrans.comp_app attribute [reassoc] comp_app @[reassoc] theorem app_naturality {F G : C β₯€ D β₯€ E} (T : F ⟢ G) (X : C) {Y Z : D} (f : Y ⟢ Z) : (F.obj X).map f ≫ (T.app X).app Z = (T.app X).app Y ≫ (G.obj X).map f := (T.app X).naturality f #align category_theory.nat_trans.app_naturality CategoryTheory.NatTrans.app_naturality @[reassoc] theorem naturality_app {F G : C β₯€ D β₯€ E} (T : F ⟢ G) (Z : D) {X Y : C} (f : X ⟢ Y) : (F.map f).app Z ≫ (T.app Y).app Z = (T.app X).app Z ≫ (G.map f).app Z := congr_fun (congr_arg app (T.naturality f)) Z #align category_theory.nat_trans.naturality_app CategoryTheory.NatTrans.naturality_app theorem mono_of_mono_app (Ξ± : F ⟢ G) [βˆ€ X : C, Mono (Ξ±.app X)] : Mono Ξ± := ⟨fun g h eq => by ext X rw [← cancel_mono (Ξ±.app X), ← comp_app, eq, comp_app]⟩ #align category_theory.nat_trans.mono_of_mono_app CategoryTheory.NatTrans.mono_of_mono_app theorem epi_of_epi_app (Ξ± : F ⟢ G) [βˆ€ X : C, Epi (Ξ±.app X)] : Epi Ξ± := ⟨fun g h eq => by ext X rw [← cancel_epi (Ξ±.app X), ← comp_app, eq, comp_app]⟩ #align category_theory.nat_trans.epi_of_epi_app CategoryTheory.NatTrans.epi_of_epi_app @[simps] def hcomp {H I : D β₯€ E} (Ξ± : F ⟢ G) (Ξ² : H ⟢ I) : F β‹™ H ⟢ G β‹™ I where app := fun X : C => Ξ².app (F.obj X) ≫ I.map (Ξ±.app X) naturality X Y f := by rw [Functor.comp_map, Functor.comp_map, ← assoc, naturality, assoc, ← map_comp I, naturality, map_comp, assoc] #align category_theory.nat_trans.hcomp CategoryTheory.NatTrans.hcomp #align category_theory.nat_trans.hcomp_app CategoryTheory.NatTrans.hcomp_app infixl:80 " β—« " => hcomp
Mathlib/CategoryTheory/Functor/Category.lean
121
122
theorem hcomp_id_app {H : D β₯€ E} (Ξ± : F ⟢ G) (X : C) : (Ξ± β—« πŸ™ H).app X = H.map (Ξ±.app X) := by
simp
1
2.718282
0
0
4
163
import Mathlib.CategoryTheory.NatTrans import Mathlib.CategoryTheory.Iso #align_import category_theory.functor.category from "leanprover-community/mathlib"@"63721b2c3eba6c325ecf8ae8cca27155a4f6306f" namespace CategoryTheory -- declare the `v`'s first; see note [CategoryTheory universes]. universe v₁ vβ‚‚ v₃ u₁ uβ‚‚ u₃ open NatTrans Category CategoryTheory.Functor variable (C : Type u₁) [Category.{v₁} C] (D : Type uβ‚‚) [Category.{vβ‚‚} D] attribute [local simp] vcomp_app variable {C D} {E : Type u₃} [Category.{v₃} E] variable {F G H I : C β₯€ D} instance Functor.category : Category.{max u₁ vβ‚‚} (C β₯€ D) where Hom F G := NatTrans F G id F := NatTrans.id F comp Ξ± Ξ² := vcomp Ξ± Ξ² #align category_theory.functor.category CategoryTheory.Functor.category namespace NatTrans -- Porting note: the behaviour of `ext` has changed here. -- We need to provide a copy of the `NatTrans.ext` lemma, -- written in terms of `F ⟢ G` rather than `NatTrans F G`, -- or `ext` will not retrieve it from the cache. @[ext] theorem ext' {Ξ± Ξ² : F ⟢ G} (w : Ξ±.app = Ξ².app) : Ξ± = Ξ² := NatTrans.ext _ _ w @[simp] theorem vcomp_eq_comp (Ξ± : F ⟢ G) (Ξ² : G ⟢ H) : vcomp Ξ± Ξ² = Ξ± ≫ Ξ² := rfl #align category_theory.nat_trans.vcomp_eq_comp CategoryTheory.NatTrans.vcomp_eq_comp theorem vcomp_app' (Ξ± : F ⟢ G) (Ξ² : G ⟢ H) (X : C) : (Ξ± ≫ Ξ²).app X = Ξ±.app X ≫ Ξ².app X := rfl #align category_theory.nat_trans.vcomp_app' CategoryTheory.NatTrans.vcomp_app' theorem congr_app {Ξ± Ξ² : F ⟢ G} (h : Ξ± = Ξ²) (X : C) : Ξ±.app X = Ξ².app X := by rw [h] #align category_theory.nat_trans.congr_app CategoryTheory.NatTrans.congr_app @[simp] theorem id_app (F : C β₯€ D) (X : C) : (πŸ™ F : F ⟢ F).app X = πŸ™ (F.obj X) := rfl #align category_theory.nat_trans.id_app CategoryTheory.NatTrans.id_app @[simp] theorem comp_app {F G H : C β₯€ D} (Ξ± : F ⟢ G) (Ξ² : G ⟢ H) (X : C) : (Ξ± ≫ Ξ²).app X = Ξ±.app X ≫ Ξ².app X := rfl #align category_theory.nat_trans.comp_app CategoryTheory.NatTrans.comp_app attribute [reassoc] comp_app @[reassoc] theorem app_naturality {F G : C β₯€ D β₯€ E} (T : F ⟢ G) (X : C) {Y Z : D} (f : Y ⟢ Z) : (F.obj X).map f ≫ (T.app X).app Z = (T.app X).app Y ≫ (G.obj X).map f := (T.app X).naturality f #align category_theory.nat_trans.app_naturality CategoryTheory.NatTrans.app_naturality @[reassoc] theorem naturality_app {F G : C β₯€ D β₯€ E} (T : F ⟢ G) (Z : D) {X Y : C} (f : X ⟢ Y) : (F.map f).app Z ≫ (T.app Y).app Z = (T.app X).app Z ≫ (G.map f).app Z := congr_fun (congr_arg app (T.naturality f)) Z #align category_theory.nat_trans.naturality_app CategoryTheory.NatTrans.naturality_app theorem mono_of_mono_app (Ξ± : F ⟢ G) [βˆ€ X : C, Mono (Ξ±.app X)] : Mono Ξ± := ⟨fun g h eq => by ext X rw [← cancel_mono (Ξ±.app X), ← comp_app, eq, comp_app]⟩ #align category_theory.nat_trans.mono_of_mono_app CategoryTheory.NatTrans.mono_of_mono_app theorem epi_of_epi_app (Ξ± : F ⟢ G) [βˆ€ X : C, Epi (Ξ±.app X)] : Epi Ξ± := ⟨fun g h eq => by ext X rw [← cancel_epi (Ξ±.app X), ← comp_app, eq, comp_app]⟩ #align category_theory.nat_trans.epi_of_epi_app CategoryTheory.NatTrans.epi_of_epi_app @[simps] def hcomp {H I : D β₯€ E} (Ξ± : F ⟢ G) (Ξ² : H ⟢ I) : F β‹™ H ⟢ G β‹™ I where app := fun X : C => Ξ².app (F.obj X) ≫ I.map (Ξ±.app X) naturality X Y f := by rw [Functor.comp_map, Functor.comp_map, ← assoc, naturality, assoc, ← map_comp I, naturality, map_comp, assoc] #align category_theory.nat_trans.hcomp CategoryTheory.NatTrans.hcomp #align category_theory.nat_trans.hcomp_app CategoryTheory.NatTrans.hcomp_app infixl:80 " β—« " => hcomp theorem hcomp_id_app {H : D β₯€ E} (Ξ± : F ⟢ G) (X : C) : (Ξ± β—« πŸ™ H).app X = H.map (Ξ±.app X) := by simp #align category_theory.nat_trans.hcomp_id_app CategoryTheory.NatTrans.hcomp_id_app
Mathlib/CategoryTheory/Functor/Category.lean
125
125
theorem id_hcomp_app {H : E β₯€ C} (Ξ± : F ⟢ G) (X : E) : (πŸ™ H β—« Ξ±).app X = Ξ±.app _ := by
simp
1
2.718282
0
0
4
163
import Mathlib.CategoryTheory.NatTrans import Mathlib.CategoryTheory.Iso #align_import category_theory.functor.category from "leanprover-community/mathlib"@"63721b2c3eba6c325ecf8ae8cca27155a4f6306f" namespace CategoryTheory -- declare the `v`'s first; see note [CategoryTheory universes]. universe v₁ vβ‚‚ v₃ u₁ uβ‚‚ u₃ open NatTrans Category CategoryTheory.Functor variable (C : Type u₁) [Category.{v₁} C] (D : Type uβ‚‚) [Category.{vβ‚‚} D] attribute [local simp] vcomp_app variable {C D} {E : Type u₃} [Category.{v₃} E] variable {F G H I : C β₯€ D} instance Functor.category : Category.{max u₁ vβ‚‚} (C β₯€ D) where Hom F G := NatTrans F G id F := NatTrans.id F comp Ξ± Ξ² := vcomp Ξ± Ξ² #align category_theory.functor.category CategoryTheory.Functor.category namespace NatTrans -- Porting note: the behaviour of `ext` has changed here. -- We need to provide a copy of the `NatTrans.ext` lemma, -- written in terms of `F ⟢ G` rather than `NatTrans F G`, -- or `ext` will not retrieve it from the cache. @[ext] theorem ext' {Ξ± Ξ² : F ⟢ G} (w : Ξ±.app = Ξ².app) : Ξ± = Ξ² := NatTrans.ext _ _ w @[simp] theorem vcomp_eq_comp (Ξ± : F ⟢ G) (Ξ² : G ⟢ H) : vcomp Ξ± Ξ² = Ξ± ≫ Ξ² := rfl #align category_theory.nat_trans.vcomp_eq_comp CategoryTheory.NatTrans.vcomp_eq_comp theorem vcomp_app' (Ξ± : F ⟢ G) (Ξ² : G ⟢ H) (X : C) : (Ξ± ≫ Ξ²).app X = Ξ±.app X ≫ Ξ².app X := rfl #align category_theory.nat_trans.vcomp_app' CategoryTheory.NatTrans.vcomp_app' theorem congr_app {Ξ± Ξ² : F ⟢ G} (h : Ξ± = Ξ²) (X : C) : Ξ±.app X = Ξ².app X := by rw [h] #align category_theory.nat_trans.congr_app CategoryTheory.NatTrans.congr_app @[simp] theorem id_app (F : C β₯€ D) (X : C) : (πŸ™ F : F ⟢ F).app X = πŸ™ (F.obj X) := rfl #align category_theory.nat_trans.id_app CategoryTheory.NatTrans.id_app @[simp] theorem comp_app {F G H : C β₯€ D} (Ξ± : F ⟢ G) (Ξ² : G ⟢ H) (X : C) : (Ξ± ≫ Ξ²).app X = Ξ±.app X ≫ Ξ².app X := rfl #align category_theory.nat_trans.comp_app CategoryTheory.NatTrans.comp_app attribute [reassoc] comp_app @[reassoc] theorem app_naturality {F G : C β₯€ D β₯€ E} (T : F ⟢ G) (X : C) {Y Z : D} (f : Y ⟢ Z) : (F.obj X).map f ≫ (T.app X).app Z = (T.app X).app Y ≫ (G.obj X).map f := (T.app X).naturality f #align category_theory.nat_trans.app_naturality CategoryTheory.NatTrans.app_naturality @[reassoc] theorem naturality_app {F G : C β₯€ D β₯€ E} (T : F ⟢ G) (Z : D) {X Y : C} (f : X ⟢ Y) : (F.map f).app Z ≫ (T.app Y).app Z = (T.app X).app Z ≫ (G.map f).app Z := congr_fun (congr_arg app (T.naturality f)) Z #align category_theory.nat_trans.naturality_app CategoryTheory.NatTrans.naturality_app theorem mono_of_mono_app (Ξ± : F ⟢ G) [βˆ€ X : C, Mono (Ξ±.app X)] : Mono Ξ± := ⟨fun g h eq => by ext X rw [← cancel_mono (Ξ±.app X), ← comp_app, eq, comp_app]⟩ #align category_theory.nat_trans.mono_of_mono_app CategoryTheory.NatTrans.mono_of_mono_app theorem epi_of_epi_app (Ξ± : F ⟢ G) [βˆ€ X : C, Epi (Ξ±.app X)] : Epi Ξ± := ⟨fun g h eq => by ext X rw [← cancel_epi (Ξ±.app X), ← comp_app, eq, comp_app]⟩ #align category_theory.nat_trans.epi_of_epi_app CategoryTheory.NatTrans.epi_of_epi_app @[simps] def hcomp {H I : D β₯€ E} (Ξ± : F ⟢ G) (Ξ² : H ⟢ I) : F β‹™ H ⟢ G β‹™ I where app := fun X : C => Ξ².app (F.obj X) ≫ I.map (Ξ±.app X) naturality X Y f := by rw [Functor.comp_map, Functor.comp_map, ← assoc, naturality, assoc, ← map_comp I, naturality, map_comp, assoc] #align category_theory.nat_trans.hcomp CategoryTheory.NatTrans.hcomp #align category_theory.nat_trans.hcomp_app CategoryTheory.NatTrans.hcomp_app infixl:80 " β—« " => hcomp theorem hcomp_id_app {H : D β₯€ E} (Ξ± : F ⟢ G) (X : C) : (Ξ± β—« πŸ™ H).app X = H.map (Ξ±.app X) := by simp #align category_theory.nat_trans.hcomp_id_app CategoryTheory.NatTrans.hcomp_id_app theorem id_hcomp_app {H : E β₯€ C} (Ξ± : F ⟢ G) (X : E) : (πŸ™ H β—« Ξ±).app X = Ξ±.app _ := by simp #align category_theory.nat_trans.id_hcomp_app CategoryTheory.NatTrans.id_hcomp_app -- Note that we don't yet prove a `hcomp_assoc` lemma here: even stating it is painful, because we -- need to use associativity of functor composition. (It's true without the explicit associator, -- because functor composition is definitionally associative, -- but relying on the definitional equality causes bad problems with elaboration later.)
Mathlib/CategoryTheory/Functor/Category.lean
132
134
theorem exchange {I J K : D β₯€ E} (Ξ± : F ⟢ G) (Ξ² : G ⟢ H) (Ξ³ : I ⟢ J) (Ξ΄ : J ⟢ K) : (Ξ± ≫ Ξ²) β—« (Ξ³ ≫ Ξ΄) = (Ξ± β—« Ξ³) ≫ Ξ² β—« Ξ΄ := by
aesop_cat
1
2.718282
0
0
4
163
import Mathlib.Control.Functor import Mathlib.Tactic.Common #align_import control.bifunctor from "leanprover-community/mathlib"@"dc1525fb3ef6eb4348fb1749c302d8abc303d34a" universe uβ‚€ u₁ uβ‚‚ vβ‚€ v₁ vβ‚‚ open Function class Bifunctor (F : Type uβ‚€ β†’ Type u₁ β†’ Type uβ‚‚) where bimap : βˆ€ {Ξ± Ξ±' Ξ² Ξ²'}, (Ξ± β†’ Ξ±') β†’ (Ξ² β†’ Ξ²') β†’ F Ξ± Ξ² β†’ F Ξ±' Ξ²' #align bifunctor Bifunctor export Bifunctor (bimap) class LawfulBifunctor (F : Type uβ‚€ β†’ Type u₁ β†’ Type uβ‚‚) [Bifunctor F] : Prop where id_bimap : βˆ€ {Ξ± Ξ²} (x : F Ξ± Ξ²), bimap id id x = x bimap_bimap : βˆ€ {Ξ±β‚€ α₁ Ξ±β‚‚ Ξ²β‚€ β₁ Ξ²β‚‚} (f : Ξ±β‚€ β†’ α₁) (f' : α₁ β†’ Ξ±β‚‚) (g : Ξ²β‚€ β†’ β₁) (g' : β₁ β†’ Ξ²β‚‚) (x : F Ξ±β‚€ Ξ²β‚€), bimap f' g' (bimap f g x) = bimap (f' ∘ f) (g' ∘ g) x #align is_lawful_bifunctor LawfulBifunctor export LawfulBifunctor (id_bimap bimap_bimap) attribute [higher_order bimap_id_id] id_bimap #align is_lawful_bifunctor.bimap_id_id LawfulBifunctor.bimap_id_id attribute [higher_order bimap_comp_bimap] bimap_bimap #align is_lawful_bifunctor.bimap_comp_bimap LawfulBifunctor.bimap_comp_bimap export LawfulBifunctor (bimap_id_id bimap_comp_bimap) variable {F : Type uβ‚€ β†’ Type u₁ β†’ Type uβ‚‚} [Bifunctor F] namespace Bifunctor abbrev fst {Ξ± Ξ±' Ξ²} (f : Ξ± β†’ Ξ±') : F Ξ± Ξ² β†’ F Ξ±' Ξ² := bimap f id #align bifunctor.fst Bifunctor.fst abbrev snd {Ξ± Ξ² Ξ²'} (f : Ξ² β†’ Ξ²') : F Ξ± Ξ² β†’ F Ξ± Ξ²' := bimap id f #align bifunctor.snd Bifunctor.snd variable [LawfulBifunctor F] @[higher_order fst_id] theorem id_fst : βˆ€ {Ξ± Ξ²} (x : F Ξ± Ξ²), fst id x = x := @id_bimap _ _ _ #align bifunctor.id_fst Bifunctor.id_fst #align bifunctor.fst_id Bifunctor.fst_id @[higher_order snd_id] theorem id_snd : βˆ€ {Ξ± Ξ²} (x : F Ξ± Ξ²), snd id x = x := @id_bimap _ _ _ #align bifunctor.id_snd Bifunctor.id_snd #align bifunctor.snd_id Bifunctor.snd_id @[higher_order fst_comp_fst]
Mathlib/Control/Bifunctor.lean
86
87
theorem comp_fst {Ξ±β‚€ α₁ Ξ±β‚‚ Ξ²} (f : Ξ±β‚€ β†’ α₁) (f' : α₁ β†’ Ξ±β‚‚) (x : F Ξ±β‚€ Ξ²) : fst f' (fst f x) = fst (f' ∘ f) x := by
simp [fst, bimap_bimap]
1
2.718282
0
0
4
164
import Mathlib.Control.Functor import Mathlib.Tactic.Common #align_import control.bifunctor from "leanprover-community/mathlib"@"dc1525fb3ef6eb4348fb1749c302d8abc303d34a" universe uβ‚€ u₁ uβ‚‚ vβ‚€ v₁ vβ‚‚ open Function class Bifunctor (F : Type uβ‚€ β†’ Type u₁ β†’ Type uβ‚‚) where bimap : βˆ€ {Ξ± Ξ±' Ξ² Ξ²'}, (Ξ± β†’ Ξ±') β†’ (Ξ² β†’ Ξ²') β†’ F Ξ± Ξ² β†’ F Ξ±' Ξ²' #align bifunctor Bifunctor export Bifunctor (bimap) class LawfulBifunctor (F : Type uβ‚€ β†’ Type u₁ β†’ Type uβ‚‚) [Bifunctor F] : Prop where id_bimap : βˆ€ {Ξ± Ξ²} (x : F Ξ± Ξ²), bimap id id x = x bimap_bimap : βˆ€ {Ξ±β‚€ α₁ Ξ±β‚‚ Ξ²β‚€ β₁ Ξ²β‚‚} (f : Ξ±β‚€ β†’ α₁) (f' : α₁ β†’ Ξ±β‚‚) (g : Ξ²β‚€ β†’ β₁) (g' : β₁ β†’ Ξ²β‚‚) (x : F Ξ±β‚€ Ξ²β‚€), bimap f' g' (bimap f g x) = bimap (f' ∘ f) (g' ∘ g) x #align is_lawful_bifunctor LawfulBifunctor export LawfulBifunctor (id_bimap bimap_bimap) attribute [higher_order bimap_id_id] id_bimap #align is_lawful_bifunctor.bimap_id_id LawfulBifunctor.bimap_id_id attribute [higher_order bimap_comp_bimap] bimap_bimap #align is_lawful_bifunctor.bimap_comp_bimap LawfulBifunctor.bimap_comp_bimap export LawfulBifunctor (bimap_id_id bimap_comp_bimap) variable {F : Type uβ‚€ β†’ Type u₁ β†’ Type uβ‚‚} [Bifunctor F] namespace Bifunctor abbrev fst {Ξ± Ξ±' Ξ²} (f : Ξ± β†’ Ξ±') : F Ξ± Ξ² β†’ F Ξ±' Ξ² := bimap f id #align bifunctor.fst Bifunctor.fst abbrev snd {Ξ± Ξ² Ξ²'} (f : Ξ² β†’ Ξ²') : F Ξ± Ξ² β†’ F Ξ± Ξ²' := bimap id f #align bifunctor.snd Bifunctor.snd variable [LawfulBifunctor F] @[higher_order fst_id] theorem id_fst : βˆ€ {Ξ± Ξ²} (x : F Ξ± Ξ²), fst id x = x := @id_bimap _ _ _ #align bifunctor.id_fst Bifunctor.id_fst #align bifunctor.fst_id Bifunctor.fst_id @[higher_order snd_id] theorem id_snd : βˆ€ {Ξ± Ξ²} (x : F Ξ± Ξ²), snd id x = x := @id_bimap _ _ _ #align bifunctor.id_snd Bifunctor.id_snd #align bifunctor.snd_id Bifunctor.snd_id @[higher_order fst_comp_fst] theorem comp_fst {Ξ±β‚€ α₁ Ξ±β‚‚ Ξ²} (f : Ξ±β‚€ β†’ α₁) (f' : α₁ β†’ Ξ±β‚‚) (x : F Ξ±β‚€ Ξ²) : fst f' (fst f x) = fst (f' ∘ f) x := by simp [fst, bimap_bimap] #align bifunctor.comp_fst Bifunctor.comp_fst #align bifunctor.fst_comp_fst Bifunctor.fst_comp_fst @[higher_order fst_comp_snd]
Mathlib/Control/Bifunctor.lean
92
93
theorem fst_snd {Ξ±β‚€ α₁ Ξ²β‚€ β₁} (f : Ξ±β‚€ β†’ α₁) (f' : Ξ²β‚€ β†’ β₁) (x : F Ξ±β‚€ Ξ²β‚€) : fst f (snd f' x) = bimap f f' x := by
simp [fst, bimap_bimap]
1
2.718282
0
0
4
164
import Mathlib.Control.Functor import Mathlib.Tactic.Common #align_import control.bifunctor from "leanprover-community/mathlib"@"dc1525fb3ef6eb4348fb1749c302d8abc303d34a" universe uβ‚€ u₁ uβ‚‚ vβ‚€ v₁ vβ‚‚ open Function class Bifunctor (F : Type uβ‚€ β†’ Type u₁ β†’ Type uβ‚‚) where bimap : βˆ€ {Ξ± Ξ±' Ξ² Ξ²'}, (Ξ± β†’ Ξ±') β†’ (Ξ² β†’ Ξ²') β†’ F Ξ± Ξ² β†’ F Ξ±' Ξ²' #align bifunctor Bifunctor export Bifunctor (bimap) class LawfulBifunctor (F : Type uβ‚€ β†’ Type u₁ β†’ Type uβ‚‚) [Bifunctor F] : Prop where id_bimap : βˆ€ {Ξ± Ξ²} (x : F Ξ± Ξ²), bimap id id x = x bimap_bimap : βˆ€ {Ξ±β‚€ α₁ Ξ±β‚‚ Ξ²β‚€ β₁ Ξ²β‚‚} (f : Ξ±β‚€ β†’ α₁) (f' : α₁ β†’ Ξ±β‚‚) (g : Ξ²β‚€ β†’ β₁) (g' : β₁ β†’ Ξ²β‚‚) (x : F Ξ±β‚€ Ξ²β‚€), bimap f' g' (bimap f g x) = bimap (f' ∘ f) (g' ∘ g) x #align is_lawful_bifunctor LawfulBifunctor export LawfulBifunctor (id_bimap bimap_bimap) attribute [higher_order bimap_id_id] id_bimap #align is_lawful_bifunctor.bimap_id_id LawfulBifunctor.bimap_id_id attribute [higher_order bimap_comp_bimap] bimap_bimap #align is_lawful_bifunctor.bimap_comp_bimap LawfulBifunctor.bimap_comp_bimap export LawfulBifunctor (bimap_id_id bimap_comp_bimap) variable {F : Type uβ‚€ β†’ Type u₁ β†’ Type uβ‚‚} [Bifunctor F] namespace Bifunctor abbrev fst {Ξ± Ξ±' Ξ²} (f : Ξ± β†’ Ξ±') : F Ξ± Ξ² β†’ F Ξ±' Ξ² := bimap f id #align bifunctor.fst Bifunctor.fst abbrev snd {Ξ± Ξ² Ξ²'} (f : Ξ² β†’ Ξ²') : F Ξ± Ξ² β†’ F Ξ± Ξ²' := bimap id f #align bifunctor.snd Bifunctor.snd variable [LawfulBifunctor F] @[higher_order fst_id] theorem id_fst : βˆ€ {Ξ± Ξ²} (x : F Ξ± Ξ²), fst id x = x := @id_bimap _ _ _ #align bifunctor.id_fst Bifunctor.id_fst #align bifunctor.fst_id Bifunctor.fst_id @[higher_order snd_id] theorem id_snd : βˆ€ {Ξ± Ξ²} (x : F Ξ± Ξ²), snd id x = x := @id_bimap _ _ _ #align bifunctor.id_snd Bifunctor.id_snd #align bifunctor.snd_id Bifunctor.snd_id @[higher_order fst_comp_fst] theorem comp_fst {Ξ±β‚€ α₁ Ξ±β‚‚ Ξ²} (f : Ξ±β‚€ β†’ α₁) (f' : α₁ β†’ Ξ±β‚‚) (x : F Ξ±β‚€ Ξ²) : fst f' (fst f x) = fst (f' ∘ f) x := by simp [fst, bimap_bimap] #align bifunctor.comp_fst Bifunctor.comp_fst #align bifunctor.fst_comp_fst Bifunctor.fst_comp_fst @[higher_order fst_comp_snd] theorem fst_snd {Ξ±β‚€ α₁ Ξ²β‚€ β₁} (f : Ξ±β‚€ β†’ α₁) (f' : Ξ²β‚€ β†’ β₁) (x : F Ξ±β‚€ Ξ²β‚€) : fst f (snd f' x) = bimap f f' x := by simp [fst, bimap_bimap] #align bifunctor.fst_snd Bifunctor.fst_snd #align bifunctor.fst_comp_snd Bifunctor.fst_comp_snd @[higher_order snd_comp_fst]
Mathlib/Control/Bifunctor.lean
98
99
theorem snd_fst {Ξ±β‚€ α₁ Ξ²β‚€ β₁} (f : Ξ±β‚€ β†’ α₁) (f' : Ξ²β‚€ β†’ β₁) (x : F Ξ±β‚€ Ξ²β‚€) : snd f' (fst f x) = bimap f f' x := by
simp [snd, bimap_bimap]
1
2.718282
0
0
4
164
import Mathlib.Control.Functor import Mathlib.Tactic.Common #align_import control.bifunctor from "leanprover-community/mathlib"@"dc1525fb3ef6eb4348fb1749c302d8abc303d34a" universe uβ‚€ u₁ uβ‚‚ vβ‚€ v₁ vβ‚‚ open Function class Bifunctor (F : Type uβ‚€ β†’ Type u₁ β†’ Type uβ‚‚) where bimap : βˆ€ {Ξ± Ξ±' Ξ² Ξ²'}, (Ξ± β†’ Ξ±') β†’ (Ξ² β†’ Ξ²') β†’ F Ξ± Ξ² β†’ F Ξ±' Ξ²' #align bifunctor Bifunctor export Bifunctor (bimap) class LawfulBifunctor (F : Type uβ‚€ β†’ Type u₁ β†’ Type uβ‚‚) [Bifunctor F] : Prop where id_bimap : βˆ€ {Ξ± Ξ²} (x : F Ξ± Ξ²), bimap id id x = x bimap_bimap : βˆ€ {Ξ±β‚€ α₁ Ξ±β‚‚ Ξ²β‚€ β₁ Ξ²β‚‚} (f : Ξ±β‚€ β†’ α₁) (f' : α₁ β†’ Ξ±β‚‚) (g : Ξ²β‚€ β†’ β₁) (g' : β₁ β†’ Ξ²β‚‚) (x : F Ξ±β‚€ Ξ²β‚€), bimap f' g' (bimap f g x) = bimap (f' ∘ f) (g' ∘ g) x #align is_lawful_bifunctor LawfulBifunctor export LawfulBifunctor (id_bimap bimap_bimap) attribute [higher_order bimap_id_id] id_bimap #align is_lawful_bifunctor.bimap_id_id LawfulBifunctor.bimap_id_id attribute [higher_order bimap_comp_bimap] bimap_bimap #align is_lawful_bifunctor.bimap_comp_bimap LawfulBifunctor.bimap_comp_bimap export LawfulBifunctor (bimap_id_id bimap_comp_bimap) variable {F : Type uβ‚€ β†’ Type u₁ β†’ Type uβ‚‚} [Bifunctor F] namespace Bifunctor abbrev fst {Ξ± Ξ±' Ξ²} (f : Ξ± β†’ Ξ±') : F Ξ± Ξ² β†’ F Ξ±' Ξ² := bimap f id #align bifunctor.fst Bifunctor.fst abbrev snd {Ξ± Ξ² Ξ²'} (f : Ξ² β†’ Ξ²') : F Ξ± Ξ² β†’ F Ξ± Ξ²' := bimap id f #align bifunctor.snd Bifunctor.snd variable [LawfulBifunctor F] @[higher_order fst_id] theorem id_fst : βˆ€ {Ξ± Ξ²} (x : F Ξ± Ξ²), fst id x = x := @id_bimap _ _ _ #align bifunctor.id_fst Bifunctor.id_fst #align bifunctor.fst_id Bifunctor.fst_id @[higher_order snd_id] theorem id_snd : βˆ€ {Ξ± Ξ²} (x : F Ξ± Ξ²), snd id x = x := @id_bimap _ _ _ #align bifunctor.id_snd Bifunctor.id_snd #align bifunctor.snd_id Bifunctor.snd_id @[higher_order fst_comp_fst] theorem comp_fst {Ξ±β‚€ α₁ Ξ±β‚‚ Ξ²} (f : Ξ±β‚€ β†’ α₁) (f' : α₁ β†’ Ξ±β‚‚) (x : F Ξ±β‚€ Ξ²) : fst f' (fst f x) = fst (f' ∘ f) x := by simp [fst, bimap_bimap] #align bifunctor.comp_fst Bifunctor.comp_fst #align bifunctor.fst_comp_fst Bifunctor.fst_comp_fst @[higher_order fst_comp_snd] theorem fst_snd {Ξ±β‚€ α₁ Ξ²β‚€ β₁} (f : Ξ±β‚€ β†’ α₁) (f' : Ξ²β‚€ β†’ β₁) (x : F Ξ±β‚€ Ξ²β‚€) : fst f (snd f' x) = bimap f f' x := by simp [fst, bimap_bimap] #align bifunctor.fst_snd Bifunctor.fst_snd #align bifunctor.fst_comp_snd Bifunctor.fst_comp_snd @[higher_order snd_comp_fst] theorem snd_fst {Ξ±β‚€ α₁ Ξ²β‚€ β₁} (f : Ξ±β‚€ β†’ α₁) (f' : Ξ²β‚€ β†’ β₁) (x : F Ξ±β‚€ Ξ²β‚€) : snd f' (fst f x) = bimap f f' x := by simp [snd, bimap_bimap] #align bifunctor.snd_fst Bifunctor.snd_fst #align bifunctor.snd_comp_fst Bifunctor.snd_comp_fst @[higher_order snd_comp_snd]
Mathlib/Control/Bifunctor.lean
104
105
theorem comp_snd {Ξ± Ξ²β‚€ β₁ Ξ²β‚‚} (g : Ξ²β‚€ β†’ β₁) (g' : β₁ β†’ Ξ²β‚‚) (x : F Ξ± Ξ²β‚€) : snd g' (snd g x) = snd (g' ∘ g) x := by
simp [snd, bimap_bimap]
1
2.718282
0
0
4
164
import Mathlib.Algebra.TrivSqZeroExt #align_import algebra.dual_number from "leanprover-community/mathlib"@"b8d2eaa69d69ce8f03179a5cda774fc0cde984e4" variable {R A B : Type*} abbrev DualNumber (R : Type*) : Type _ := TrivSqZeroExt R R #align dual_number DualNumber def DualNumber.eps [Zero R] [One R] : DualNumber R := TrivSqZeroExt.inr 1 #align dual_number.eps DualNumber.eps @[inherit_doc] scoped[DualNumber] notation "Ξ΅" => DualNumber.eps @[inherit_doc] scoped[DualNumber] postfix:1024 "[Ξ΅]" => DualNumber open DualNumber namespace DualNumber open TrivSqZeroExt @[simp] theorem fst_eps [Zero R] [One R] : fst Ξ΅ = (0 : R) := fst_inr _ _ #align dual_number.fst_eps DualNumber.fst_eps @[simp] theorem snd_eps [Zero R] [One R] : snd Ξ΅ = (1 : R) := snd_inr _ _ #align dual_number.snd_eps DualNumber.snd_eps @[simp] theorem snd_mul [Semiring R] (x y : R[Ξ΅]) : snd (x * y) = fst x * snd y + snd x * fst y := TrivSqZeroExt.snd_mul _ _ #align dual_number.snd_mul DualNumber.snd_mul @[simp] theorem eps_mul_eps [Semiring R] : (Ξ΅ * Ξ΅ : R[Ξ΅]) = 0 := inr_mul_inr _ _ _ #align dual_number.eps_mul_eps DualNumber.eps_mul_eps @[simp] theorem inv_eps [DivisionRing R] : (Ξ΅ : R[Ξ΅])⁻¹ = 0 := TrivSqZeroExt.inv_inr 1 @[simp] theorem inr_eq_smul_eps [MulZeroOneClass R] (r : R) : inr r = (r β€’ Ξ΅ : R[Ξ΅]) := ext (mul_zero r).symm (mul_one r).symm #align dual_number.inr_eq_smul_eps DualNumber.inr_eq_smul_eps
Mathlib/Algebra/DualNumber.lean
96
97
theorem commute_eps_left [Semiring R] (x : DualNumber R) : Commute Ξ΅ x := by
ext <;> simp
1
2.718282
0
0
1
165
import Mathlib.Logic.Nonempty import Mathlib.Init.Set import Mathlib.Logic.Basic #align_import logic.function.basic from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1" open Function universe u v w namespace Function section variable {Ξ± Ξ² Ξ³ : Sort*} {f : Ξ± β†’ Ξ²} @[reducible, simp] def eval {Ξ² : Ξ± β†’ Sort*} (x : Ξ±) (f : βˆ€ x, Ξ² x) : Ξ² x := f x #align function.eval Function.eval theorem eval_apply {Ξ² : Ξ± β†’ Sort*} (x : Ξ±) (f : βˆ€ x, Ξ² x) : eval x f = f x := rfl #align function.eval_apply Function.eval_apply theorem const_def {y : Ξ²} : (fun _ : Ξ± ↦ y) = const Ξ± y := rfl #align function.const_def Function.const_def theorem const_injective [Nonempty Ξ±] : Injective (const Ξ± : Ξ² β†’ Ξ± β†’ Ξ²) := fun y₁ yβ‚‚ h ↦ let ⟨x⟩ := β€ΉNonempty Ξ±β€Ί congr_fun h x #align function.const_injective Function.const_injective @[simp] theorem const_inj [Nonempty Ξ±] {y₁ yβ‚‚ : Ξ²} : const Ξ± y₁ = const Ξ± yβ‚‚ ↔ y₁ = yβ‚‚ := ⟨fun h ↦ const_injective h, fun h ↦ h β–Έ rfl⟩ #align function.const_inj Function.const_inj #align function.id_def Function.id_def -- Porting note: `Function.onFun` is now reducible -- @[simp] theorem onFun_apply (f : Ξ² β†’ Ξ² β†’ Ξ³) (g : Ξ± β†’ Ξ²) (a b : Ξ±) : onFun f g a b = f (g a) (g b) := rfl #align function.on_fun_apply Function.onFun_apply lemma hfunext {Ξ± Ξ±' : Sort u} {Ξ² : Ξ± β†’ Sort v} {Ξ²' : Ξ±' β†’ Sort v} {f : βˆ€a, Ξ² a} {f' : βˆ€a, Ξ²' a} (hΞ± : Ξ± = Ξ±') (h : βˆ€a a', HEq a a' β†’ HEq (f a) (f' a')) : HEq f f' := by subst hΞ± have : βˆ€a, HEq (f a) (f' a) := fun a ↦ h a a (HEq.refl a) have : Ξ² = Ξ²' := by funext a; exact type_eq_of_heq (this a) subst this apply heq_of_eq funext a exact eq_of_heq (this a) #align function.hfunext Function.hfunext #align function.funext_iff Function.funext_iff theorem ne_iff {Ξ² : Ξ± β†’ Sort*} {f₁ fβ‚‚ : βˆ€ a, Ξ² a} : f₁ β‰  fβ‚‚ ↔ βˆƒ a, f₁ a β‰  fβ‚‚ a := funext_iff.not.trans not_forall #align function.ne_iff Function.ne_iff lemma funext_iff_of_subsingleton [Subsingleton Ξ±] {g : Ξ± β†’ Ξ²} (x y : Ξ±) : f x = g y ↔ f = g := by refine ⟨fun h ↦ funext fun z ↦ ?_, fun h ↦ ?_⟩ Β· rwa [Subsingleton.elim x z, Subsingleton.elim y z] at h Β· rw [h, Subsingleton.elim x y] protected theorem Bijective.injective {f : Ξ± β†’ Ξ²} (hf : Bijective f) : Injective f := hf.1 #align function.bijective.injective Function.Bijective.injective protected theorem Bijective.surjective {f : Ξ± β†’ Ξ²} (hf : Bijective f) : Surjective f := hf.2 #align function.bijective.surjective Function.Bijective.surjective theorem Injective.eq_iff (I : Injective f) {a b : Ξ±} : f a = f b ↔ a = b := ⟨@I _ _, congr_arg f⟩ #align function.injective.eq_iff Function.Injective.eq_iff
Mathlib/Logic/Function/Basic.lean
89
91
theorem Injective.beq_eq {Ξ± Ξ² : Type*} [BEq Ξ±] [LawfulBEq Ξ±] [BEq Ξ²] [LawfulBEq Ξ²] {f : Ξ± β†’ Ξ²} (I : Injective f) {a b : Ξ±} : (f a == f b) = (a == b) := by
by_cases h : a == b <;> simp [h] <;> simpa [I.eq_iff] using h
1
2.718282
0
0
2
166
import Mathlib.Logic.Nonempty import Mathlib.Init.Set import Mathlib.Logic.Basic #align_import logic.function.basic from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1" open Function universe u v w namespace Function section variable {Ξ± Ξ² Ξ³ : Sort*} {f : Ξ± β†’ Ξ²} @[reducible, simp] def eval {Ξ² : Ξ± β†’ Sort*} (x : Ξ±) (f : βˆ€ x, Ξ² x) : Ξ² x := f x #align function.eval Function.eval theorem eval_apply {Ξ² : Ξ± β†’ Sort*} (x : Ξ±) (f : βˆ€ x, Ξ² x) : eval x f = f x := rfl #align function.eval_apply Function.eval_apply theorem const_def {y : Ξ²} : (fun _ : Ξ± ↦ y) = const Ξ± y := rfl #align function.const_def Function.const_def theorem const_injective [Nonempty Ξ±] : Injective (const Ξ± : Ξ² β†’ Ξ± β†’ Ξ²) := fun y₁ yβ‚‚ h ↦ let ⟨x⟩ := β€ΉNonempty Ξ±β€Ί congr_fun h x #align function.const_injective Function.const_injective @[simp] theorem const_inj [Nonempty Ξ±] {y₁ yβ‚‚ : Ξ²} : const Ξ± y₁ = const Ξ± yβ‚‚ ↔ y₁ = yβ‚‚ := ⟨fun h ↦ const_injective h, fun h ↦ h β–Έ rfl⟩ #align function.const_inj Function.const_inj #align function.id_def Function.id_def -- Porting note: `Function.onFun` is now reducible -- @[simp] theorem onFun_apply (f : Ξ² β†’ Ξ² β†’ Ξ³) (g : Ξ± β†’ Ξ²) (a b : Ξ±) : onFun f g a b = f (g a) (g b) := rfl #align function.on_fun_apply Function.onFun_apply lemma hfunext {Ξ± Ξ±' : Sort u} {Ξ² : Ξ± β†’ Sort v} {Ξ²' : Ξ±' β†’ Sort v} {f : βˆ€a, Ξ² a} {f' : βˆ€a, Ξ²' a} (hΞ± : Ξ± = Ξ±') (h : βˆ€a a', HEq a a' β†’ HEq (f a) (f' a')) : HEq f f' := by subst hΞ± have : βˆ€a, HEq (f a) (f' a) := fun a ↦ h a a (HEq.refl a) have : Ξ² = Ξ²' := by funext a; exact type_eq_of_heq (this a) subst this apply heq_of_eq funext a exact eq_of_heq (this a) #align function.hfunext Function.hfunext #align function.funext_iff Function.funext_iff theorem ne_iff {Ξ² : Ξ± β†’ Sort*} {f₁ fβ‚‚ : βˆ€ a, Ξ² a} : f₁ β‰  fβ‚‚ ↔ βˆƒ a, f₁ a β‰  fβ‚‚ a := funext_iff.not.trans not_forall #align function.ne_iff Function.ne_iff lemma funext_iff_of_subsingleton [Subsingleton Ξ±] {g : Ξ± β†’ Ξ²} (x y : Ξ±) : f x = g y ↔ f = g := by refine ⟨fun h ↦ funext fun z ↦ ?_, fun h ↦ ?_⟩ Β· rwa [Subsingleton.elim x z, Subsingleton.elim y z] at h Β· rw [h, Subsingleton.elim x y] protected theorem Bijective.injective {f : Ξ± β†’ Ξ²} (hf : Bijective f) : Injective f := hf.1 #align function.bijective.injective Function.Bijective.injective protected theorem Bijective.surjective {f : Ξ± β†’ Ξ²} (hf : Bijective f) : Surjective f := hf.2 #align function.bijective.surjective Function.Bijective.surjective theorem Injective.eq_iff (I : Injective f) {a b : Ξ±} : f a = f b ↔ a = b := ⟨@I _ _, congr_arg f⟩ #align function.injective.eq_iff Function.Injective.eq_iff theorem Injective.beq_eq {Ξ± Ξ² : Type*} [BEq Ξ±] [LawfulBEq Ξ±] [BEq Ξ²] [LawfulBEq Ξ²] {f : Ξ± β†’ Ξ²} (I : Injective f) {a b : Ξ±} : (f a == f b) = (a == b) := by by_cases h : a == b <;> simp [h] <;> simpa [I.eq_iff] using h theorem Injective.eq_iff' (I : Injective f) {a b : Ξ±} {c : Ξ²} (h : f b = c) : f a = c ↔ a = b := h β–Έ I.eq_iff #align function.injective.eq_iff' Function.Injective.eq_iff' theorem Injective.ne (hf : Injective f) {a₁ aβ‚‚ : Ξ±} : a₁ β‰  aβ‚‚ β†’ f a₁ β‰  f aβ‚‚ := mt fun h ↦ hf h #align function.injective.ne Function.Injective.ne theorem Injective.ne_iff (hf : Injective f) {x y : Ξ±} : f x β‰  f y ↔ x β‰  y := ⟨mt <| congr_arg f, hf.ne⟩ #align function.injective.ne_iff Function.Injective.ne_iff theorem Injective.ne_iff' (hf : Injective f) {x y : Ξ±} {z : Ξ²} (h : f y = z) : f x β‰  z ↔ x β‰  y := h β–Έ hf.ne_iff #align function.injective.ne_iff' Function.Injective.ne_iff'
Mathlib/Logic/Function/Basic.lean
109
110
theorem not_injective_iff : Β¬ Injective f ↔ βˆƒ a b, f a = f b ∧ a β‰  b := by
simp only [Injective, not_forall, exists_prop]
1
2.718282
0
0
2
166
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation #align_import linear_algebra.clifford_algebra.star from "leanprover-community/mathlib"@"4d66277cfec381260ba05c68f9ae6ce2a118031d" variable {R : Type*} [CommRing R] variable {M : Type*} [AddCommGroup M] [Module R M] variable {Q : QuadraticForm R M} namespace CliffordAlgebra instance instStarRing : StarRing (CliffordAlgebra Q) where star x := reverse (involute x) star_involutive x := by simp only [reverse_involute_commute.eq, reverse_reverse, involute_involute] star_mul x y := by simp only [map_mul, reverse.map_mul] star_add x y := by simp only [map_add] theorem star_def (x : CliffordAlgebra Q) : star x = reverse (involute x) := rfl #align clifford_algebra.star_def CliffordAlgebra.star_def theorem star_def' (x : CliffordAlgebra Q) : star x = involute (reverse x) := reverse_involute _ #align clifford_algebra.star_def' CliffordAlgebra.star_def' @[simp]
Mathlib/LinearAlgebra/CliffordAlgebra/Star.lean
50
50
theorem star_ΞΉ (m : M) : star (ΞΉ Q m) = -ΞΉ Q m := by
rw [star_def, involute_ΞΉ, map_neg, reverse_ΞΉ]
1
2.718282
0
0
3
167
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation #align_import linear_algebra.clifford_algebra.star from "leanprover-community/mathlib"@"4d66277cfec381260ba05c68f9ae6ce2a118031d" variable {R : Type*} [CommRing R] variable {M : Type*} [AddCommGroup M] [Module R M] variable {Q : QuadraticForm R M} namespace CliffordAlgebra instance instStarRing : StarRing (CliffordAlgebra Q) where star x := reverse (involute x) star_involutive x := by simp only [reverse_involute_commute.eq, reverse_reverse, involute_involute] star_mul x y := by simp only [map_mul, reverse.map_mul] star_add x y := by simp only [map_add] theorem star_def (x : CliffordAlgebra Q) : star x = reverse (involute x) := rfl #align clifford_algebra.star_def CliffordAlgebra.star_def theorem star_def' (x : CliffordAlgebra Q) : star x = involute (reverse x) := reverse_involute _ #align clifford_algebra.star_def' CliffordAlgebra.star_def' @[simp] theorem star_ΞΉ (m : M) : star (ΞΉ Q m) = -ΞΉ Q m := by rw [star_def, involute_ΞΉ, map_neg, reverse_ΞΉ] #align clifford_algebra.star_ΞΉ CliffordAlgebra.star_ΞΉ @[simp]
Mathlib/LinearAlgebra/CliffordAlgebra/Star.lean
57
58
theorem star_smul (r : R) (x : CliffordAlgebra Q) : star (r β€’ x) = r β€’ star x := by
rw [star_def, star_def, map_smul, map_smul]
1
2.718282
0
0
3
167
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation #align_import linear_algebra.clifford_algebra.star from "leanprover-community/mathlib"@"4d66277cfec381260ba05c68f9ae6ce2a118031d" variable {R : Type*} [CommRing R] variable {M : Type*} [AddCommGroup M] [Module R M] variable {Q : QuadraticForm R M} namespace CliffordAlgebra instance instStarRing : StarRing (CliffordAlgebra Q) where star x := reverse (involute x) star_involutive x := by simp only [reverse_involute_commute.eq, reverse_reverse, involute_involute] star_mul x y := by simp only [map_mul, reverse.map_mul] star_add x y := by simp only [map_add] theorem star_def (x : CliffordAlgebra Q) : star x = reverse (involute x) := rfl #align clifford_algebra.star_def CliffordAlgebra.star_def theorem star_def' (x : CliffordAlgebra Q) : star x = involute (reverse x) := reverse_involute _ #align clifford_algebra.star_def' CliffordAlgebra.star_def' @[simp] theorem star_ΞΉ (m : M) : star (ΞΉ Q m) = -ΞΉ Q m := by rw [star_def, involute_ΞΉ, map_neg, reverse_ΞΉ] #align clifford_algebra.star_ΞΉ CliffordAlgebra.star_ΞΉ @[simp] theorem star_smul (r : R) (x : CliffordAlgebra Q) : star (r β€’ x) = r β€’ star x := by rw [star_def, star_def, map_smul, map_smul] #align clifford_algebra.star_smul CliffordAlgebra.star_smul @[simp]
Mathlib/LinearAlgebra/CliffordAlgebra/Star.lean
62
64
theorem star_algebraMap (r : R) : star (algebraMap R (CliffordAlgebra Q) r) = algebraMap R (CliffordAlgebra Q) r := by
rw [star_def, involute.commutes, reverse.commutes]
1
2.718282
0
0
3
167
import Mathlib.Algebra.Group.Semiconj.Defs import Mathlib.Init.Algebra.Classes #align_import algebra.group.commute from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102" assert_not_exists MonoidWithZero assert_not_exists DenselyOrdered variable {G M S : Type*} @[to_additive "Two elements additively commute if `a + b = b + a`"] def Commute [Mul S] (a b : S) : Prop := SemiconjBy a b b #align commute Commute #align add_commute AddCommute @[to_additive] theorem commute_iff_eq [Mul S] (a b : S) : Commute a b ↔ a * b = b * a := Iff.rfl namespace Commute @[to_additive] protected theorem all [CommMagma S] (a b : S) : Commute a b := mul_comm a b #align commute.all Commute.allβ‚“ #align add_commute.all AddCommute.allβ‚“ -- not sure why this needs an `β‚“`, maybe instance names not aligned? section Group variable [Group G] {a b : G} @[to_additive] protected theorem mul_inv_cancel (h : Commute a b) : a * b * a⁻¹ = b := by rw [h.eq, mul_inv_cancel_right] #align commute.mul_inv_cancel Commute.mul_inv_cancel #align add_commute.add_neg_cancel AddCommute.add_neg_cancel @[to_additive]
Mathlib/Algebra/Group/Commute/Defs.lean
262
263
theorem mul_inv_cancel_assoc (h : Commute a b) : a * (b * a⁻¹) = b := by
rw [← mul_assoc, h.mul_inv_cancel]
1
2.718282
0
0
1
168
import Mathlib.LinearAlgebra.TensorProduct.Tower import Mathlib.Algebra.DirectSum.Module #align_import linear_algebra.direct_sum.tensor_product from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d" suppress_compilation universe u v₁ vβ‚‚ w₁ w₁' wβ‚‚ wβ‚‚' section Ring namespace TensorProduct open TensorProduct open DirectSum open LinearMap attribute [local ext] TensorProduct.ext variable (R : Type u) [CommSemiring R] (S) [Semiring S] [Algebra R S] variable {ι₁ : Type v₁} {ΞΉβ‚‚ : Type vβ‚‚} variable [DecidableEq ι₁] [DecidableEq ΞΉβ‚‚] variable (M₁ : ι₁ β†’ Type w₁) (M₁' : Type w₁') (Mβ‚‚ : ΞΉβ‚‚ β†’ Type wβ‚‚) (Mβ‚‚' : Type wβ‚‚') variable [βˆ€ i₁, AddCommMonoid (M₁ i₁)] [AddCommMonoid M₁'] variable [βˆ€ iβ‚‚, AddCommMonoid (Mβ‚‚ iβ‚‚)] [AddCommMonoid Mβ‚‚'] variable [βˆ€ i₁, Module R (M₁ i₁)] [Module R M₁'] [βˆ€ iβ‚‚, Module R (Mβ‚‚ iβ‚‚)] [Module R Mβ‚‚'] variable [βˆ€ i₁, Module S (M₁ i₁)] [βˆ€ i₁, IsScalarTower R S (M₁ i₁)] protected def directSum : ((⨁ i₁, M₁ i₁) βŠ—[R] ⨁ iβ‚‚, Mβ‚‚ iβ‚‚) ≃ₗ[S] ⨁ i : ι₁ Γ— ΞΉβ‚‚, M₁ i.1 βŠ—[R] Mβ‚‚ i.2 := by -- Porting note: entirely rewritten to allow unification to happen one step at a time refine LinearEquiv.ofLinear (R := S) (Rβ‚‚ := S) ?toFun ?invFun ?left ?right Β· refine AlgebraTensorModule.lift ?_ refine DirectSum.toModule S _ _ fun i₁ => ?_ refine LinearMap.flip ?_ refine DirectSum.toModule R _ _ fun iβ‚‚ => LinearMap.flip <| ?_ refine AlgebraTensorModule.curry ?_ exact DirectSum.lof S (ι₁ Γ— ΞΉβ‚‚) (fun i => M₁ i.1 βŠ—[R] Mβ‚‚ i.2) (i₁, iβ‚‚) Β· refine DirectSum.toModule S _ _ fun i => ?_ exact AlgebraTensorModule.map (DirectSum.lof S _ M₁ i.1) (DirectSum.lof R _ Mβ‚‚ i.2) Β· refine DirectSum.linearMap_ext S fun ⟨i₁, iβ‚‚βŸ© => ?_ refine TensorProduct.AlgebraTensorModule.ext fun m₁ mβ‚‚ => ?_ -- Porting note: seems much nicer than the `repeat` lean 3 proof. simp only [coe_comp, Function.comp_apply, toModule_lof, AlgebraTensorModule.map_tmul, AlgebraTensorModule.lift_apply, lift.tmul, coe_restrictScalars, flip_apply, AlgebraTensorModule.curry_apply, curry_apply, id_comp] Β· -- `(_)` prevents typeclass search timing out on problems that can be solved immediately by -- unification apply TensorProduct.AlgebraTensorModule.curry_injective refine DirectSum.linearMap_ext _ fun i₁ => ?_ refine LinearMap.ext fun x₁ => ?_ refine DirectSum.linearMap_ext _ fun iβ‚‚ => ?_ refine LinearMap.ext fun xβ‚‚ => ?_ -- Porting note: seems much nicer than the `repeat` lean 3 proof. simp only [coe_comp, Function.comp_apply, AlgebraTensorModule.curry_apply, curry_apply, coe_restrictScalars, AlgebraTensorModule.lift_apply, lift.tmul, toModule_lof, flip_apply, AlgebraTensorModule.map_tmul, id_coe, id_eq] #align tensor_product.direct_sum TensorProduct.directSum def directSumLeft : (⨁ i₁, M₁ i₁) βŠ—[R] Mβ‚‚' ≃ₗ[R] ⨁ i, M₁ i βŠ—[R] Mβ‚‚' := LinearEquiv.ofLinear (lift <| DirectSum.toModule R _ _ fun i => (mk R _ _).comprβ‚‚ <| DirectSum.lof R ι₁ (fun i => M₁ i βŠ—[R] Mβ‚‚') _) (DirectSum.toModule R _ _ fun i => rTensor _ (DirectSum.lof R ι₁ _ _)) (DirectSum.linearMap_ext R fun i => TensorProduct.ext <| LinearMap.extβ‚‚ fun m₁ mβ‚‚ => by dsimp only [comp_apply, comprβ‚‚_apply, id_apply, mk_apply] simp_rw [DirectSum.toModule_lof, rTensor_tmul, lift.tmul, DirectSum.toModule_lof, comprβ‚‚_apply, mk_apply]) (TensorProduct.ext <| DirectSum.linearMap_ext R fun i => LinearMap.extβ‚‚ fun m₁ mβ‚‚ => by dsimp only [comp_apply, comprβ‚‚_apply, id_apply, mk_apply] simp_rw [lift.tmul, DirectSum.toModule_lof, comprβ‚‚_apply, mk_apply, DirectSum.toModule_lof, rTensor_tmul]) #align tensor_product.direct_sum_left TensorProduct.directSumLeft def directSumRight : (M₁' βŠ—[R] ⨁ i, Mβ‚‚ i) ≃ₗ[R] ⨁ i, M₁' βŠ—[R] Mβ‚‚ i := TensorProduct.comm R _ _ β‰ͺ≫ₗ directSumLeft R Mβ‚‚ M₁' β‰ͺ≫ₗ DFinsupp.mapRange.linearEquiv fun _ => TensorProduct.comm R _ _ #align tensor_product.direct_sum_right TensorProduct.directSumRight variable {M₁ M₁' Mβ‚‚ Mβ‚‚'} @[simp]
Mathlib/LinearAlgebra/DirectSum/TensorProduct.lean
150
153
theorem directSum_lof_tmul_lof (i₁ : ι₁) (m₁ : M₁ i₁) (iβ‚‚ : ΞΉβ‚‚) (mβ‚‚ : Mβ‚‚ iβ‚‚) : TensorProduct.directSum R S M₁ Mβ‚‚ (DirectSum.lof S ι₁ M₁ i₁ m₁ βŠ—β‚œ DirectSum.lof R ΞΉβ‚‚ Mβ‚‚ iβ‚‚ mβ‚‚) = DirectSum.lof S (ι₁ Γ— ΞΉβ‚‚) (fun i => M₁ i.1 βŠ—[R] Mβ‚‚ i.2) (i₁, iβ‚‚) (m₁ βŠ—β‚œ mβ‚‚) := by
simp [TensorProduct.directSum]
1
2.718282
0
0
1
169
import Mathlib.Algebra.Homology.HomologicalComplex import Mathlib.CategoryTheory.DifferentialObject #align_import algebra.homology.differential_object from "leanprover-community/mathlib"@"b535c2d5d996acd9b0554b76395d9c920e186f4f" open CategoryTheory CategoryTheory.Limits open scoped Classical noncomputable section namespace CategoryTheory.DifferentialObject variable {Ξ² : Type*} [AddCommGroup Ξ²] {b : Ξ²} variable {V : Type*} [Category V] [HasZeroMorphisms V] variable (X : DifferentialObject β„€ (GradedObjectWithShift b V)) abbrev objEqToHom {i j : Ξ²} (h : i = j) : X.obj i ⟢ X.obj j := eqToHom (congr_arg X.obj h) set_option linter.uppercaseLean3 false in #align category_theory.differential_object.X_eq_to_hom CategoryTheory.DifferentialObject.objEqToHom @[simp] theorem objEqToHom_refl (i : Ξ²) : X.objEqToHom (refl i) = πŸ™ _ := rfl set_option linter.uppercaseLean3 false in #align category_theory.differential_object.X_eq_to_hom_refl CategoryTheory.DifferentialObject.objEqToHom_refl @[reassoc (attr := simp)]
Mathlib/Algebra/Homology/DifferentialObject.lean
53
54
theorem objEqToHom_d {x y : Ξ²} (h : x = y) : X.objEqToHom h ≫ X.d y = X.d x ≫ X.objEqToHom (by cases h; rfl) := by
cases h; dsimp; simp
1
2.718282
0
0
3
170
import Mathlib.Algebra.Homology.HomologicalComplex import Mathlib.CategoryTheory.DifferentialObject #align_import algebra.homology.differential_object from "leanprover-community/mathlib"@"b535c2d5d996acd9b0554b76395d9c920e186f4f" open CategoryTheory CategoryTheory.Limits open scoped Classical noncomputable section namespace CategoryTheory.DifferentialObject variable {Ξ² : Type*} [AddCommGroup Ξ²] {b : Ξ²} variable {V : Type*} [Category V] [HasZeroMorphisms V] variable (X : DifferentialObject β„€ (GradedObjectWithShift b V)) abbrev objEqToHom {i j : Ξ²} (h : i = j) : X.obj i ⟢ X.obj j := eqToHom (congr_arg X.obj h) set_option linter.uppercaseLean3 false in #align category_theory.differential_object.X_eq_to_hom CategoryTheory.DifferentialObject.objEqToHom @[simp] theorem objEqToHom_refl (i : Ξ²) : X.objEqToHom (refl i) = πŸ™ _ := rfl set_option linter.uppercaseLean3 false in #align category_theory.differential_object.X_eq_to_hom_refl CategoryTheory.DifferentialObject.objEqToHom_refl @[reassoc (attr := simp)] theorem objEqToHom_d {x y : Ξ²} (h : x = y) : X.objEqToHom h ≫ X.d y = X.d x ≫ X.objEqToHom (by cases h; rfl) := by cases h; dsimp; simp #align homological_complex.eq_to_hom_d CategoryTheory.DifferentialObject.objEqToHom_d @[reassoc (attr := simp)] theorem d_squared_apply {x : Ξ²} : X.d x ≫ X.d _ = 0 := congr_fun X.d_squared _ @[reassoc (attr := simp)]
Mathlib/Algebra/Homology/DifferentialObject.lean
61
62
theorem eqToHom_f' {X Y : DifferentialObject β„€ (GradedObjectWithShift b V)} (f : X ⟢ Y) {x y : Ξ²} (h : x = y) : X.objEqToHom h ≫ f.f y = f.f x ≫ Y.objEqToHom h := by
cases h; simp
1
2.718282
0
0
3
170
import Mathlib.Algebra.Homology.HomologicalComplex import Mathlib.CategoryTheory.DifferentialObject #align_import algebra.homology.differential_object from "leanprover-community/mathlib"@"b535c2d5d996acd9b0554b76395d9c920e186f4f" open CategoryTheory CategoryTheory.Limits open scoped Classical noncomputable section open CategoryTheory.DifferentialObject namespace HomologicalComplex variable {Ξ² : Type*} [AddCommGroup Ξ²] (b : Ξ²) variable (V : Type*) [Category V] [HasZeroMorphisms V] -- Porting note: this should be moved to an earlier file. -- Porting note: simpNF linter silenced, both `d_eqToHom` and its `_assoc` version -- do not simplify under themselves @[reassoc (attr := simp, nolint simpNF)]
Mathlib/Algebra/Homology/DifferentialObject.lean
78
79
theorem d_eqToHom (X : HomologicalComplex V (ComplexShape.up' b)) {x y z : Ξ²} (h : y = z) : X.d x y ≫ eqToHom (congr_arg X.X h) = X.d x z := by
cases h; simp
1
2.718282
0
0
3
170
import Mathlib.Logic.Equiv.Defs import Mathlib.Tactic.Convert #align_import control.equiv_functor from "leanprover-community/mathlib"@"d6aae1bcbd04b8de2022b9b83a5b5b10e10c777d" universe uβ‚€ u₁ uβ‚‚ vβ‚€ v₁ vβ‚‚ open Function class EquivFunctor (f : Type uβ‚€ β†’ Type u₁) where map : βˆ€ {Ξ± Ξ²}, Ξ± ≃ Ξ² β†’ f Ξ± β†’ f Ξ² map_refl' : βˆ€ Ξ±, map (Equiv.refl Ξ±) = @id (f Ξ±) := by rfl map_trans' : βˆ€ {Ξ± Ξ² Ξ³} (k : Ξ± ≃ Ξ²) (h : Ξ² ≃ Ξ³), map (k.trans h) = map h ∘ map k := by rfl #align equiv_functor EquivFunctor attribute [simp] EquivFunctor.map_refl' namespace EquivFunctor section variable (f : Type uβ‚€ β†’ Type u₁) [EquivFunctor f] {Ξ± Ξ² : Type uβ‚€} (e : Ξ± ≃ Ξ²) def mapEquiv : f Ξ± ≃ f Ξ² where toFun := EquivFunctor.map e invFun := EquivFunctor.map e.symm left_inv x := by convert (congr_fun (EquivFunctor.map_trans' e e.symm) x).symm simp right_inv y := by convert (congr_fun (EquivFunctor.map_trans' e.symm e) y).symm simp #align equiv_functor.map_equiv EquivFunctor.mapEquiv @[simp] theorem mapEquiv_apply (x : f Ξ±) : mapEquiv f e x = EquivFunctor.map e x := rfl #align equiv_functor.map_equiv_apply EquivFunctor.mapEquiv_apply theorem mapEquiv_symm_apply (y : f Ξ²) : (mapEquiv f e).symm y = EquivFunctor.map e.symm y := rfl #align equiv_functor.map_equiv_symm_apply EquivFunctor.mapEquiv_symm_apply @[simp]
Mathlib/Control/EquivFunctor.lean
70
71
theorem mapEquiv_refl (Ξ±) : mapEquiv f (Equiv.refl Ξ±) = Equiv.refl (f Ξ±) := by
simp only [mapEquiv, map_refl', Equiv.refl_symm]; rfl
1
2.718282
0
0
1
171
import Mathlib.CategoryTheory.Monoidal.Mon_ #align_import category_theory.monoidal.Mod_ from "leanprover-community/mathlib"@"33085c9739c41428651ac461a323fde9a2688d9b" universe v₁ vβ‚‚ u₁ uβ‚‚ open CategoryTheory MonoidalCategory variable (C : Type u₁) [Category.{v₁} C] [MonoidalCategory.{v₁} C] variable {C} structure Mod_ (A : Mon_ C) where X : C act : A.X βŠ— X ⟢ X one_act : (A.one β–· X) ≫ act = (Ξ»_ X).hom := by aesop_cat assoc : (A.mul β–· X) ≫ act = (Ξ±_ A.X A.X X).hom ≫ (A.X ◁ act) ≫ act := by aesop_cat set_option linter.uppercaseLean3 false in #align Mod_ Mod_ attribute [reassoc (attr := simp)] Mod_.one_act Mod_.assoc namespace Mod_ variable {A : Mon_ C} (M : Mod_ A)
Mathlib/CategoryTheory/Monoidal/Mod_.lean
37
38
theorem assoc_flip : (A.X ◁ M.act) ≫ M.act = (Ξ±_ A.X A.X M.X).inv ≫ (A.mul β–· M.X) ≫ M.act := by
simp
1
2.718282
0
0
2
172
import Mathlib.CategoryTheory.Monoidal.Mon_ #align_import category_theory.monoidal.Mod_ from "leanprover-community/mathlib"@"33085c9739c41428651ac461a323fde9a2688d9b" universe v₁ vβ‚‚ u₁ uβ‚‚ open CategoryTheory MonoidalCategory variable (C : Type u₁) [Category.{v₁} C] [MonoidalCategory.{v₁} C] variable {C} structure Mod_ (A : Mon_ C) where X : C act : A.X βŠ— X ⟢ X one_act : (A.one β–· X) ≫ act = (Ξ»_ X).hom := by aesop_cat assoc : (A.mul β–· X) ≫ act = (Ξ±_ A.X A.X X).hom ≫ (A.X ◁ act) ≫ act := by aesop_cat set_option linter.uppercaseLean3 false in #align Mod_ Mod_ attribute [reassoc (attr := simp)] Mod_.one_act Mod_.assoc namespace Mod_ variable {A : Mon_ C} (M : Mod_ A) theorem assoc_flip : (A.X ◁ M.act) ≫ M.act = (Ξ±_ A.X A.X M.X).inv ≫ (A.mul β–· M.X) ≫ M.act := by simp set_option linter.uppercaseLean3 false in #align Mod_.assoc_flip Mod_.assoc_flip @[ext] structure Hom (M N : Mod_ A) where hom : M.X ⟢ N.X act_hom : M.act ≫ hom = (A.X ◁ hom) ≫ N.act := by aesop_cat set_option linter.uppercaseLean3 false in #align Mod_.hom Mod_.Hom attribute [reassoc (attr := simp)] Hom.act_hom @[simps] def id (M : Mod_ A) : Hom M M where hom := πŸ™ M.X set_option linter.uppercaseLean3 false in #align Mod_.id Mod_.id instance homInhabited (M : Mod_ A) : Inhabited (Hom M M) := ⟨id M⟩ set_option linter.uppercaseLean3 false in #align Mod_.hom_inhabited Mod_.homInhabited @[simps] def comp {M N O : Mod_ A} (f : Hom M N) (g : Hom N O) : Hom M O where hom := f.hom ≫ g.hom set_option linter.uppercaseLean3 false in #align Mod_.comp Mod_.comp instance : Category (Mod_ A) where Hom M N := Hom M N id := id comp f g := comp f g -- Porting note: added because `Hom.ext` is not triggered automatically -- See https://github.com/leanprover-community/mathlib4/issues/5229 @[ext] lemma hom_ext {M N : Mod_ A} (f₁ fβ‚‚ : M ⟢ N) (h : f₁.hom = fβ‚‚.hom) : f₁ = fβ‚‚ := Hom.ext _ _ h @[simp]
Mathlib/CategoryTheory/Monoidal/Mod_.lean
81
82
theorem id_hom' (M : Mod_ A) : (πŸ™ M : M ⟢ M).hom = πŸ™ M.X := by
rfl
1
2.718282
0
0
2
172
import Mathlib.Data.Finset.Prod import Mathlib.Data.Sym.Basic import Mathlib.Data.Sym.Sym2.Init import Mathlib.Data.SetLike.Basic #align_import data.sym.sym2 from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" assert_not_exists MonoidWithZero open Finset Function Sym universe u variable {Ξ± Ξ² Ξ³ : Type*} namespace Sym2 @[aesop (rule_sets := [Sym2]) [safe [constructors, cases], norm]] inductive Rel (Ξ± : Type u) : Ξ± Γ— Ξ± β†’ Ξ± Γ— Ξ± β†’ Prop | refl (x y : Ξ±) : Rel _ (x, y) (x, y) | swap (x y : Ξ±) : Rel _ (x, y) (y, x) #align sym2.rel Sym2.Rel #align sym2.rel.refl Sym2.Rel.refl #align sym2.rel.swap Sym2.Rel.swap attribute [refl] Rel.refl @[symm]
Mathlib/Data/Sym/Sym2.lean
69
69
theorem Rel.symm {x y : Ξ± Γ— Ξ±} : Rel Ξ± x y β†’ Rel Ξ± y x := by
aesop (rule_sets := [Sym2])
1
2.718282
0
0
4
173
import Mathlib.Data.Finset.Prod import Mathlib.Data.Sym.Basic import Mathlib.Data.Sym.Sym2.Init import Mathlib.Data.SetLike.Basic #align_import data.sym.sym2 from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" assert_not_exists MonoidWithZero open Finset Function Sym universe u variable {Ξ± Ξ² Ξ³ : Type*} namespace Sym2 @[aesop (rule_sets := [Sym2]) [safe [constructors, cases], norm]] inductive Rel (Ξ± : Type u) : Ξ± Γ— Ξ± β†’ Ξ± Γ— Ξ± β†’ Prop | refl (x y : Ξ±) : Rel _ (x, y) (x, y) | swap (x y : Ξ±) : Rel _ (x, y) (y, x) #align sym2.rel Sym2.Rel #align sym2.rel.refl Sym2.Rel.refl #align sym2.rel.swap Sym2.Rel.swap attribute [refl] Rel.refl @[symm] theorem Rel.symm {x y : Ξ± Γ— Ξ±} : Rel Ξ± x y β†’ Rel Ξ± y x := by aesop (rule_sets := [Sym2]) #align sym2.rel.symm Sym2.Rel.symm @[trans]
Mathlib/Data/Sym/Sym2.lean
73
74
theorem Rel.trans {x y z : Ξ± Γ— Ξ±} (a : Rel Ξ± x y) (b : Rel Ξ± y z) : Rel Ξ± x z := by
aesop (rule_sets := [Sym2])
1
2.718282
0
0
4
173
import Mathlib.Data.Finset.Prod import Mathlib.Data.Sym.Basic import Mathlib.Data.Sym.Sym2.Init import Mathlib.Data.SetLike.Basic #align_import data.sym.sym2 from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" assert_not_exists MonoidWithZero open Finset Function Sym universe u variable {Ξ± Ξ² Ξ³ : Type*} namespace Sym2 @[aesop (rule_sets := [Sym2]) [safe [constructors, cases], norm]] inductive Rel (Ξ± : Type u) : Ξ± Γ— Ξ± β†’ Ξ± Γ— Ξ± β†’ Prop | refl (x y : Ξ±) : Rel _ (x, y) (x, y) | swap (x y : Ξ±) : Rel _ (x, y) (y, x) #align sym2.rel Sym2.Rel #align sym2.rel.refl Sym2.Rel.refl #align sym2.rel.swap Sym2.Rel.swap attribute [refl] Rel.refl @[symm] theorem Rel.symm {x y : Ξ± Γ— Ξ±} : Rel Ξ± x y β†’ Rel Ξ± y x := by aesop (rule_sets := [Sym2]) #align sym2.rel.symm Sym2.Rel.symm @[trans] theorem Rel.trans {x y z : Ξ± Γ— Ξ±} (a : Rel Ξ± x y) (b : Rel Ξ± y z) : Rel Ξ± x z := by aesop (rule_sets := [Sym2]) #align sym2.rel.trans Sym2.Rel.trans theorem Rel.is_equivalence : Equivalence (Rel Ξ±) := { refl := fun (x, y) ↦ Rel.refl x y, symm := Rel.symm, trans := Rel.trans } #align sym2.rel.is_equivalence Sym2.Rel.is_equivalence def Rel.setoid (Ξ± : Type u) : Setoid (Ξ± Γ— Ξ±) := ⟨Rel Ξ±, Rel.is_equivalence⟩ #align sym2.rel.setoid Sym2.Rel.setoid @[simp]
Mathlib/Data/Sym/Sym2.lean
88
89
theorem rel_iff' {p q : Ξ± Γ— Ξ±} : Rel Ξ± p q ↔ p = q ∨ p = q.swap := by
aesop (rule_sets := [Sym2])
1
2.718282
0
0
4
173
import Mathlib.Data.Finset.Prod import Mathlib.Data.Sym.Basic import Mathlib.Data.Sym.Sym2.Init import Mathlib.Data.SetLike.Basic #align_import data.sym.sym2 from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" assert_not_exists MonoidWithZero open Finset Function Sym universe u variable {Ξ± Ξ² Ξ³ : Type*} namespace Sym2 @[aesop (rule_sets := [Sym2]) [safe [constructors, cases], norm]] inductive Rel (Ξ± : Type u) : Ξ± Γ— Ξ± β†’ Ξ± Γ— Ξ± β†’ Prop | refl (x y : Ξ±) : Rel _ (x, y) (x, y) | swap (x y : Ξ±) : Rel _ (x, y) (y, x) #align sym2.rel Sym2.Rel #align sym2.rel.refl Sym2.Rel.refl #align sym2.rel.swap Sym2.Rel.swap attribute [refl] Rel.refl @[symm] theorem Rel.symm {x y : Ξ± Γ— Ξ±} : Rel Ξ± x y β†’ Rel Ξ± y x := by aesop (rule_sets := [Sym2]) #align sym2.rel.symm Sym2.Rel.symm @[trans] theorem Rel.trans {x y z : Ξ± Γ— Ξ±} (a : Rel Ξ± x y) (b : Rel Ξ± y z) : Rel Ξ± x z := by aesop (rule_sets := [Sym2]) #align sym2.rel.trans Sym2.Rel.trans theorem Rel.is_equivalence : Equivalence (Rel Ξ±) := { refl := fun (x, y) ↦ Rel.refl x y, symm := Rel.symm, trans := Rel.trans } #align sym2.rel.is_equivalence Sym2.Rel.is_equivalence def Rel.setoid (Ξ± : Type u) : Setoid (Ξ± Γ— Ξ±) := ⟨Rel Ξ±, Rel.is_equivalence⟩ #align sym2.rel.setoid Sym2.Rel.setoid @[simp] theorem rel_iff' {p q : Ξ± Γ— Ξ±} : Rel Ξ± p q ↔ p = q ∨ p = q.swap := by aesop (rule_sets := [Sym2])
Mathlib/Data/Sym/Sym2.lean
91
92
theorem rel_iff {x y z w : Ξ±} : Rel Ξ± (x, y) (z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z := by
simp
1
2.718282
0
0
4
173
import Mathlib.Order.SuccPred.Basic import Mathlib.Order.BoundedOrder #align_import order.succ_pred.limit from "leanprover-community/mathlib"@"1e05171a5e8cf18d98d9cf7b207540acb044acae" variable {Ξ± : Type*} namespace Order open Function Set OrderDual section LT variable [LT Ξ±] def IsSuccLimit (a : Ξ±) : Prop := βˆ€ b, Β¬b β‹– a #align order.is_succ_limit Order.IsSuccLimit
Mathlib/Order/SuccPred/Limit.lean
46
47
theorem not_isSuccLimit_iff_exists_covBy (a : Ξ±) : Β¬IsSuccLimit a ↔ βˆƒ b, b β‹– a := by
simp [IsSuccLimit]
1
2.718282
0
0
1
174
import Mathlib.Mathport.Rename #align_import init.meta.well_founded_tactics from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd" -- Porting note: meta code used to implement well-founded recursion is not ported theorem Nat.lt_add_of_zero_lt_left (a b : Nat) (h : 0 < b) : a < a + b := show a + 0 < a + b by apply Nat.add_lt_add_left assumption #align nat.lt_add_of_zero_lt_left Nat.lt_add_of_zero_lt_left
Mathlib/Init/Meta/WellFoundedTactics.lean
18
18
theorem Nat.zero_lt_one_add (a : Nat) : 0 < 1 + a := by
simp [Nat.one_add]
1
2.718282
0
0
1
175
import Batteries.Data.Nat.Gcd import Mathlib.Init.Data.Nat.Notation import Mathlib.Mathport.Rename #align_import init.data.nat.gcd from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd" open WellFounded namespace Nat #align nat.gcd Nat.gcd #align nat.gcd_zero_left Nat.gcd_zero_left #align nat.gcd_succ Nat.gcd_succ #align nat.gcd_one_left Nat.gcd_one_left #align nat.gcd_self Nat.gcd_self #align nat.gcd_zero_right Nat.gcd_zero_right #align nat.gcd_rec Nat.gcd_rec #align nat.gcd.induction Nat.gcd.induction #align nat.lcm Nat.lcm
Mathlib/Init/Data/Nat/GCD.lean
35
36
theorem gcd_def (x y : β„•) : gcd x y = if x = 0 then y else gcd (y % x) x := by
cases x <;> simp [Nat.gcd_succ]
1
2.718282
0
0
1
176
import Mathlib.LinearAlgebra.CliffordAlgebra.Grading import Mathlib.Algebra.Module.Opposites #align_import linear_algebra.clifford_algebra.conjugation from "leanprover-community/mathlib"@"34020e531ebc4e8aac6d449d9eecbcd1508ea8d0" variable {R : Type*} [CommRing R] variable {M : Type*} [AddCommGroup M] [Module R M] variable {Q : QuadraticForm R M} namespace CliffordAlgebra section Involute def involute : CliffordAlgebra Q →ₐ[R] CliffordAlgebra Q := CliffordAlgebra.lift Q ⟨-ΞΉ Q, fun m => by simp⟩ #align clifford_algebra.involute CliffordAlgebra.involute @[simp] theorem involute_ΞΉ (m : M) : involute (ΞΉ Q m) = -ΞΉ Q m := lift_ΞΉ_apply _ _ m #align clifford_algebra.involute_ΞΉ CliffordAlgebra.involute_ΞΉ @[simp]
Mathlib/LinearAlgebra/CliffordAlgebra/Conjugation.lean
55
56
theorem involute_comp_involute : involute.comp involute = AlgHom.id R (CliffordAlgebra Q) := by
ext; simp
1
2.718282
0
0
2
177
import Mathlib.LinearAlgebra.CliffordAlgebra.Grading import Mathlib.Algebra.Module.Opposites #align_import linear_algebra.clifford_algebra.conjugation from "leanprover-community/mathlib"@"34020e531ebc4e8aac6d449d9eecbcd1508ea8d0" variable {R : Type*} [CommRing R] variable {M : Type*} [AddCommGroup M] [Module R M] variable {Q : QuadraticForm R M} namespace CliffordAlgebra section Reverse open MulOpposite def reverseOp : CliffordAlgebra Q →ₐ[R] (CliffordAlgebra Q)ᡐᡒᡖ := CliffordAlgebra.lift Q ⟨(MulOpposite.opLinearEquiv R).toLinearMap βˆ˜β‚— ΞΉ Q, fun m => unop_injective <| by simp⟩ @[simp] theorem reverseOp_ΞΉ (m : M) : reverseOp (ΞΉ Q m) = op (ΞΉ Q m) := lift_ΞΉ_apply _ _ _ @[simps! apply] def reverseOpEquiv : CliffordAlgebra Q ≃ₐ[R] (CliffordAlgebra Q)ᡐᡒᡖ := AlgEquiv.ofAlgHom reverseOp (AlgHom.opComm reverseOp) (AlgHom.unop.injective <| hom_ext <| LinearMap.ext fun _ => by simp) (hom_ext <| LinearMap.ext fun _ => by simp) @[simp] theorem reverseOpEquiv_opComm : AlgEquiv.opComm (reverseOpEquiv (Q := Q)) = reverseOpEquiv.symm := rfl def reverse : CliffordAlgebra Q β†’β‚—[R] CliffordAlgebra Q := (opLinearEquiv R).symm.toLinearMap.comp reverseOp.toLinearMap #align clifford_algebra.reverse CliffordAlgebra.reverse @[simp] theorem unop_reverseOp (x : CliffordAlgebra Q) : (reverseOp x).unop = reverse x := rfl @[simp] theorem op_reverse (x : CliffordAlgebra Q) : op (reverse x) = reverseOp x := rfl @[simp]
Mathlib/LinearAlgebra/CliffordAlgebra/Conjugation.lean
111
111
theorem reverse_ΞΉ (m : M) : reverse (ΞΉ Q m) = ΞΉ Q m := by
simp [reverse]
1
2.718282
0
0
2
177
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.GroupWithZero.NeZero import Mathlib.Logic.Unique #align_import algebra.group_with_zero.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" assert_not_exists DenselyOrdered open scoped Classical open Function variable {Ξ± Mβ‚€ Gβ‚€ Mβ‚€' Gβ‚€' F F' : Type*} section end section variable [MulZeroOneClass Mβ‚€]
Mathlib/Algebra/GroupWithZero/Basic.lean
110
111
theorem eq_zero_of_zero_eq_one (h : (0 : Mβ‚€) = 1) (a : Mβ‚€) : a = 0 := by
rw [← mul_one a, ← h, mul_zero]
1
2.718282
0
0
1
178
import Mathlib.Topology.IsLocalHomeomorph import Mathlib.Topology.FiberBundle.Basic #align_import topology.covering from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" open Bundle variable {E X : Type*} [TopologicalSpace E] [TopologicalSpace X] (f : E β†’ X) (s : Set X) def IsEvenlyCovered (x : X) (I : Type*) [TopologicalSpace I] := DiscreteTopology I ∧ βˆƒ t : Trivialization I f, x ∈ t.baseSet #align is_evenly_covered IsEvenlyCovered def IsCoveringMapOn := βˆ€ x ∈ s, IsEvenlyCovered f x (f ⁻¹' {x}) #align is_covering_map_on IsCoveringMapOn def IsCoveringMap := βˆ€ x, IsEvenlyCovered f x (f ⁻¹' {x}) #align is_covering_map IsCoveringMap variable {f}
Mathlib/Topology/Covering.lean
140
141
theorem isCoveringMap_iff_isCoveringMapOn_univ : IsCoveringMap f ↔ IsCoveringMapOn f Set.univ := by
simp only [IsCoveringMap, IsCoveringMapOn, Set.mem_univ, forall_true_left]
1
2.718282
0
0
1
179
import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Deprecated.Submonoid #align_import deprecated.subgroup from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6" open Set Function variable {G : Type*} {H : Type*} {A : Type*} {a a₁ aβ‚‚ b c : G} section Group variable [Group G] [AddGroup A] structure IsAddSubgroup (s : Set A) extends IsAddSubmonoid s : Prop where neg_mem {a} : a ∈ s β†’ -a ∈ s #align is_add_subgroup IsAddSubgroup @[to_additive] structure IsSubgroup (s : Set G) extends IsSubmonoid s : Prop where inv_mem {a} : a ∈ s β†’ a⁻¹ ∈ s #align is_subgroup IsSubgroup @[to_additive]
Mathlib/Deprecated/Subgroup.lean
57
58
theorem IsSubgroup.div_mem {s : Set G} (hs : IsSubgroup s) {x y : G} (hx : x ∈ s) (hy : y ∈ s) : x / y ∈ s := by
simpa only [div_eq_mul_inv] using hs.mul_mem hx (hs.inv_mem hy)
1
2.718282
0
0
1
180
import Mathlib.Algebra.Algebra.Equiv import Mathlib.LinearAlgebra.Span #align_import algebra.algebra.tower from "leanprover-community/mathlib"@"71150516f28d9826c7341f8815b31f7d8770c212" open Pointwise universe u v w u₁ v₁ variable (R : Type u) (S : Type v) (A : Type w) (B : Type u₁) (M : Type v₁) namespace IsScalarTower section Module variable [CommSemiring R] [Semiring A] [Algebra R A] variable [MulAction A M] variable {R} {M}
Mathlib/Algebra/Algebra/Tower.lean
88
90
theorem algebraMap_smul [SMul R M] [IsScalarTower R A M] (r : R) (x : M) : algebraMap R A r β€’ x = r β€’ x := by
rw [Algebra.algebraMap_eq_smul_one, smul_assoc, one_smul]
1
2.718282
0
0
4
181
import Mathlib.Algebra.Algebra.Equiv import Mathlib.LinearAlgebra.Span #align_import algebra.algebra.tower from "leanprover-community/mathlib"@"71150516f28d9826c7341f8815b31f7d8770c212" open Pointwise universe u v w u₁ v₁ variable (R : Type u) (S : Type v) (A : Type w) (B : Type u₁) (M : Type v₁) namespace IsScalarTower section Module variable [CommSemiring R] [Semiring A] [Algebra R A] variable [MulAction A M] variable {R} {M} theorem algebraMap_smul [SMul R M] [IsScalarTower R A M] (r : R) (x : M) : algebraMap R A r β€’ x = r β€’ x := by rw [Algebra.algebraMap_eq_smul_one, smul_assoc, one_smul] #align is_scalar_tower.algebra_map_smul IsScalarTower.algebraMap_smul variable {A} in
Mathlib/Algebra/Algebra/Tower.lean
94
96
theorem of_algebraMap_smul [SMul R M] (h : βˆ€ (r : R) (x : M), algebraMap R A r β€’ x = r β€’ x) : IsScalarTower R A M where smul_assoc r a x := by
rw [Algebra.smul_def, mul_smul, h]
1
2.718282
0
0
4
181
import Mathlib.Algebra.Algebra.Equiv import Mathlib.LinearAlgebra.Span #align_import algebra.algebra.tower from "leanprover-community/mathlib"@"71150516f28d9826c7341f8815b31f7d8770c212" open Pointwise universe u v w u₁ v₁ variable (R : Type u) (S : Type v) (A : Type w) (B : Type u₁) (M : Type v₁) namespace IsScalarTower section Semiring variable [CommSemiring R] [CommSemiring S] [Semiring A] [Semiring B] variable [Algebra R S] [Algebra S A] [Algebra S B] variable {R S A} theorem of_algebraMap_eq [Algebra R A] (h : βˆ€ x, algebraMap R A x = algebraMap S A (algebraMap R S x)) : IsScalarTower R S A := ⟨fun x y z => by simp_rw [Algebra.smul_def, RingHom.map_mul, mul_assoc, h]⟩ #align is_scalar_tower.of_algebra_map_eq IsScalarTower.of_algebraMap_eq theorem of_algebraMap_eq' [Algebra R A] (h : algebraMap R A = (algebraMap S A).comp (algebraMap R S)) : IsScalarTower R S A := of_algebraMap_eq <| RingHom.ext_iff.1 h #align is_scalar_tower.of_algebra_map_eq' IsScalarTower.of_algebraMap_eq' variable (R S A) variable [Algebra R A] [Algebra R B] variable [IsScalarTower R S A] [IsScalarTower R S B] theorem algebraMap_eq : algebraMap R A = (algebraMap S A).comp (algebraMap R S) := RingHom.ext fun x => by simp_rw [RingHom.comp_apply, Algebra.algebraMap_eq_smul_one, smul_assoc, one_smul] #align is_scalar_tower.algebra_map_eq IsScalarTower.algebraMap_eq
Mathlib/Algebra/Algebra/Tower.lean
130
131
theorem algebraMap_apply (x : R) : algebraMap R A x = algebraMap S A (algebraMap R S x) := by
rw [algebraMap_eq R S A, RingHom.comp_apply]
1
2.718282
0
0
4
181
import Mathlib.Algebra.Algebra.Equiv import Mathlib.LinearAlgebra.Span #align_import algebra.algebra.tower from "leanprover-community/mathlib"@"71150516f28d9826c7341f8815b31f7d8770c212" open Pointwise universe u v w u₁ v₁ variable (R : Type u) (S : Type v) (A : Type w) (B : Type u₁) (M : Type v₁) namespace IsScalarTower section Semiring variable [CommSemiring R] [CommSemiring S] [Semiring A] [Semiring B] variable [Algebra R S] [Algebra S A] [Algebra S B] variable {R S A} theorem of_algebraMap_eq [Algebra R A] (h : βˆ€ x, algebraMap R A x = algebraMap S A (algebraMap R S x)) : IsScalarTower R S A := ⟨fun x y z => by simp_rw [Algebra.smul_def, RingHom.map_mul, mul_assoc, h]⟩ #align is_scalar_tower.of_algebra_map_eq IsScalarTower.of_algebraMap_eq theorem of_algebraMap_eq' [Algebra R A] (h : algebraMap R A = (algebraMap S A).comp (algebraMap R S)) : IsScalarTower R S A := of_algebraMap_eq <| RingHom.ext_iff.1 h #align is_scalar_tower.of_algebra_map_eq' IsScalarTower.of_algebraMap_eq' variable (R S A) variable [Algebra R A] [Algebra R B] variable [IsScalarTower R S A] [IsScalarTower R S B] theorem algebraMap_eq : algebraMap R A = (algebraMap S A).comp (algebraMap R S) := RingHom.ext fun x => by simp_rw [RingHom.comp_apply, Algebra.algebraMap_eq_smul_one, smul_assoc, one_smul] #align is_scalar_tower.algebra_map_eq IsScalarTower.algebraMap_eq theorem algebraMap_apply (x : R) : algebraMap R A x = algebraMap S A (algebraMap R S x) := by rw [algebraMap_eq R S A, RingHom.comp_apply] #align is_scalar_tower.algebra_map_apply IsScalarTower.algebraMap_apply @[ext] theorem Algebra.ext {S : Type u} {A : Type v} [CommSemiring S] [Semiring A] (h1 h2 : Algebra S A) (h : βˆ€ (r : S) (x : A), (by have I := h1; exact r β€’ x) = r β€’ x) : h1 = h2 := Algebra.algebra_ext _ _ fun r => by simpa only [@Algebra.smul_def _ _ _ _ h1, @Algebra.smul_def _ _ _ _ h2, mul_one] using h r 1 #align is_scalar_tower.algebra.ext IsScalarTower.Algebra.ext def toAlgHom : S →ₐ[R] A := { algebraMap S A with commutes' := fun _ => (algebraMap_apply _ _ _ _).symm } #align is_scalar_tower.to_alg_hom IsScalarTower.toAlgHom theorem toAlgHom_apply (y : S) : toAlgHom R S A y = algebraMap S A y := rfl #align is_scalar_tower.to_alg_hom_apply IsScalarTower.toAlgHom_apply @[simp] theorem coe_toAlgHom : ↑(toAlgHom R S A) = algebraMap S A := RingHom.ext fun _ => rfl #align is_scalar_tower.coe_to_alg_hom IsScalarTower.coe_toAlgHom @[simp] theorem coe_toAlgHom' : (toAlgHom R S A : S β†’ A) = algebraMap S A := rfl #align is_scalar_tower.coe_to_alg_hom' IsScalarTower.coe_toAlgHom' variable {R S A B} @[simp]
Mathlib/Algebra/Algebra/Tower.lean
162
164
theorem _root_.AlgHom.map_algebraMap (f : A →ₐ[S] B) (r : R) : f (algebraMap R A r) = algebraMap R B r := by
rw [algebraMap_apply R S A r, f.commutes, ← algebraMap_apply R S B]
1
2.718282
0
0
4
181
import Mathlib.Algebra.DirectSum.Module import Mathlib.Algebra.Module.Submodule.Basic #align_import algebra.direct_sum.decomposition from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441" variable {ΞΉ R M Οƒ : Type*} open DirectSum namespace DirectSum section AddCommMonoid variable [DecidableEq ΞΉ] [AddCommMonoid M] variable [SetLike Οƒ M] [AddSubmonoidClass Οƒ M] (β„³ : ΞΉ β†’ Οƒ) class Decomposition where decompose' : M β†’ ⨁ i, β„³ i left_inv : Function.LeftInverse (DirectSum.coeAddMonoidHom β„³) decompose' right_inv : Function.RightInverse (DirectSum.coeAddMonoidHom β„³) decompose' #align direct_sum.decomposition DirectSum.Decomposition instance : Subsingleton (Decomposition β„³) := ⟨fun x y ↦ by cases' x with x xl xr cases' y with y yl yr congr exact Function.LeftInverse.eq_rightInverse xr yl⟩ abbrev Decomposition.ofAddHom (decompose : M β†’+ ⨁ i, β„³ i) (h_left_inv : (DirectSum.coeAddMonoidHom β„³).comp decompose = .id _) (h_right_inv : decompose.comp (DirectSum.coeAddMonoidHom β„³) = .id _) : Decomposition β„³ where decompose' := decompose left_inv := DFunLike.congr_fun h_left_inv right_inv := DFunLike.congr_fun h_right_inv noncomputable def IsInternal.chooseDecomposition (h : IsInternal β„³) : DirectSum.Decomposition β„³ where decompose' := (Equiv.ofBijective _ h).symm left_inv := (Equiv.ofBijective _ h).right_inv right_inv := (Equiv.ofBijective _ h).left_inv variable [Decomposition β„³] protected theorem Decomposition.isInternal : DirectSum.IsInternal β„³ := ⟨Decomposition.right_inv.injective, Decomposition.left_inv.surjective⟩ #align direct_sum.decomposition.is_internal DirectSum.Decomposition.isInternal def decompose : M ≃ ⨁ i, β„³ i where toFun := Decomposition.decompose' invFun := DirectSum.coeAddMonoidHom β„³ left_inv := Decomposition.left_inv right_inv := Decomposition.right_inv #align direct_sum.decompose DirectSum.decompose protected theorem Decomposition.inductionOn {p : M β†’ Prop} (h_zero : p 0) (h_homogeneous : βˆ€ {i} (m : β„³ i), p (m : M)) (h_add : βˆ€ m m' : M, p m β†’ p m' β†’ p (m + m')) : βˆ€ m, p m := by let β„³' : ΞΉ β†’ AddSubmonoid M := fun i ↦ (βŸ¨βŸ¨β„³ i, fun x y ↦ AddMemClass.add_mem x y⟩, (ZeroMemClass.zero_mem _)⟩ : AddSubmonoid M) haveI t : DirectSum.Decomposition β„³' := { decompose' := DirectSum.decompose β„³ left_inv := fun _ ↦ (decompose β„³).left_inv _ right_inv := fun _ ↦ (decompose β„³).right_inv _ } have mem : βˆ€ m, m ∈ iSup β„³' := fun _m ↦ (DirectSum.IsInternal.addSubmonoid_iSup_eq_top β„³' (Decomposition.isInternal β„³')).symm β–Έ trivial -- Porting note: needs to use @ even though no implicit argument is provided exact fun m ↦ @AddSubmonoid.iSup_induction _ _ _ β„³' _ _ (mem m) (fun i m h ↦ h_homogeneous ⟨m, h⟩) h_zero h_add -- exact fun m ↦ -- AddSubmonoid.iSup_induction β„³' (mem m) (fun i m h ↦ h_homogeneous ⟨m, h⟩) h_zero h_add #align direct_sum.decomposition.induction_on DirectSum.Decomposition.inductionOn @[simp] theorem Decomposition.decompose'_eq : Decomposition.decompose' = decompose β„³ := rfl #align direct_sum.decomposition.decompose'_eq DirectSum.Decomposition.decompose'_eq @[simp] theorem decompose_symm_of {i : ΞΉ} (x : β„³ i) : (decompose β„³).symm (DirectSum.of _ i x) = x := DirectSum.coeAddMonoidHom_of β„³ _ _ #align direct_sum.decompose_symm_of DirectSum.decompose_symm_of @[simp]
Mathlib/Algebra/DirectSum/Decomposition.lean
127
128
theorem decompose_coe {i : ΞΉ} (x : β„³ i) : decompose β„³ (x : M) = DirectSum.of _ i x := by
rw [← decompose_symm_of _, Equiv.apply_symm_apply]
1
2.718282
0
0
4
182
import Mathlib.Algebra.DirectSum.Module import Mathlib.Algebra.Module.Submodule.Basic #align_import algebra.direct_sum.decomposition from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441" variable {ΞΉ R M Οƒ : Type*} open DirectSum namespace DirectSum section AddCommMonoid variable [DecidableEq ΞΉ] [AddCommMonoid M] variable [SetLike Οƒ M] [AddSubmonoidClass Οƒ M] (β„³ : ΞΉ β†’ Οƒ) class Decomposition where decompose' : M β†’ ⨁ i, β„³ i left_inv : Function.LeftInverse (DirectSum.coeAddMonoidHom β„³) decompose' right_inv : Function.RightInverse (DirectSum.coeAddMonoidHom β„³) decompose' #align direct_sum.decomposition DirectSum.Decomposition instance : Subsingleton (Decomposition β„³) := ⟨fun x y ↦ by cases' x with x xl xr cases' y with y yl yr congr exact Function.LeftInverse.eq_rightInverse xr yl⟩ abbrev Decomposition.ofAddHom (decompose : M β†’+ ⨁ i, β„³ i) (h_left_inv : (DirectSum.coeAddMonoidHom β„³).comp decompose = .id _) (h_right_inv : decompose.comp (DirectSum.coeAddMonoidHom β„³) = .id _) : Decomposition β„³ where decompose' := decompose left_inv := DFunLike.congr_fun h_left_inv right_inv := DFunLike.congr_fun h_right_inv noncomputable def IsInternal.chooseDecomposition (h : IsInternal β„³) : DirectSum.Decomposition β„³ where decompose' := (Equiv.ofBijective _ h).symm left_inv := (Equiv.ofBijective _ h).right_inv right_inv := (Equiv.ofBijective _ h).left_inv variable [Decomposition β„³] protected theorem Decomposition.isInternal : DirectSum.IsInternal β„³ := ⟨Decomposition.right_inv.injective, Decomposition.left_inv.surjective⟩ #align direct_sum.decomposition.is_internal DirectSum.Decomposition.isInternal def decompose : M ≃ ⨁ i, β„³ i where toFun := Decomposition.decompose' invFun := DirectSum.coeAddMonoidHom β„³ left_inv := Decomposition.left_inv right_inv := Decomposition.right_inv #align direct_sum.decompose DirectSum.decompose protected theorem Decomposition.inductionOn {p : M β†’ Prop} (h_zero : p 0) (h_homogeneous : βˆ€ {i} (m : β„³ i), p (m : M)) (h_add : βˆ€ m m' : M, p m β†’ p m' β†’ p (m + m')) : βˆ€ m, p m := by let β„³' : ΞΉ β†’ AddSubmonoid M := fun i ↦ (βŸ¨βŸ¨β„³ i, fun x y ↦ AddMemClass.add_mem x y⟩, (ZeroMemClass.zero_mem _)⟩ : AddSubmonoid M) haveI t : DirectSum.Decomposition β„³' := { decompose' := DirectSum.decompose β„³ left_inv := fun _ ↦ (decompose β„³).left_inv _ right_inv := fun _ ↦ (decompose β„³).right_inv _ } have mem : βˆ€ m, m ∈ iSup β„³' := fun _m ↦ (DirectSum.IsInternal.addSubmonoid_iSup_eq_top β„³' (Decomposition.isInternal β„³')).symm β–Έ trivial -- Porting note: needs to use @ even though no implicit argument is provided exact fun m ↦ @AddSubmonoid.iSup_induction _ _ _ β„³' _ _ (mem m) (fun i m h ↦ h_homogeneous ⟨m, h⟩) h_zero h_add -- exact fun m ↦ -- AddSubmonoid.iSup_induction β„³' (mem m) (fun i m h ↦ h_homogeneous ⟨m, h⟩) h_zero h_add #align direct_sum.decomposition.induction_on DirectSum.Decomposition.inductionOn @[simp] theorem Decomposition.decompose'_eq : Decomposition.decompose' = decompose β„³ := rfl #align direct_sum.decomposition.decompose'_eq DirectSum.Decomposition.decompose'_eq @[simp] theorem decompose_symm_of {i : ΞΉ} (x : β„³ i) : (decompose β„³).symm (DirectSum.of _ i x) = x := DirectSum.coeAddMonoidHom_of β„³ _ _ #align direct_sum.decompose_symm_of DirectSum.decompose_symm_of @[simp] theorem decompose_coe {i : ΞΉ} (x : β„³ i) : decompose β„³ (x : M) = DirectSum.of _ i x := by rw [← decompose_symm_of _, Equiv.apply_symm_apply] #align direct_sum.decompose_coe DirectSum.decompose_coe theorem decompose_of_mem {x : M} {i : ΞΉ} (hx : x ∈ β„³ i) : decompose β„³ x = DirectSum.of (fun i ↦ β„³ i) i ⟨x, hx⟩ := decompose_coe _ ⟨x, hx⟩ #align direct_sum.decompose_of_mem DirectSum.decompose_of_mem
Mathlib/Algebra/DirectSum/Decomposition.lean
136
137
theorem decompose_of_mem_same {x : M} {i : ΞΉ} (hx : x ∈ β„³ i) : (decompose β„³ x i : M) = x := by
rw [decompose_of_mem _ hx, DirectSum.of_eq_same, Subtype.coe_mk]
1
2.718282
0
0
4
182
import Mathlib.Algebra.DirectSum.Module import Mathlib.Algebra.Module.Submodule.Basic #align_import algebra.direct_sum.decomposition from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441" variable {ΞΉ R M Οƒ : Type*} open DirectSum namespace DirectSum section AddCommMonoid variable [DecidableEq ΞΉ] [AddCommMonoid M] variable [SetLike Οƒ M] [AddSubmonoidClass Οƒ M] (β„³ : ΞΉ β†’ Οƒ) class Decomposition where decompose' : M β†’ ⨁ i, β„³ i left_inv : Function.LeftInverse (DirectSum.coeAddMonoidHom β„³) decompose' right_inv : Function.RightInverse (DirectSum.coeAddMonoidHom β„³) decompose' #align direct_sum.decomposition DirectSum.Decomposition instance : Subsingleton (Decomposition β„³) := ⟨fun x y ↦ by cases' x with x xl xr cases' y with y yl yr congr exact Function.LeftInverse.eq_rightInverse xr yl⟩ abbrev Decomposition.ofAddHom (decompose : M β†’+ ⨁ i, β„³ i) (h_left_inv : (DirectSum.coeAddMonoidHom β„³).comp decompose = .id _) (h_right_inv : decompose.comp (DirectSum.coeAddMonoidHom β„³) = .id _) : Decomposition β„³ where decompose' := decompose left_inv := DFunLike.congr_fun h_left_inv right_inv := DFunLike.congr_fun h_right_inv noncomputable def IsInternal.chooseDecomposition (h : IsInternal β„³) : DirectSum.Decomposition β„³ where decompose' := (Equiv.ofBijective _ h).symm left_inv := (Equiv.ofBijective _ h).right_inv right_inv := (Equiv.ofBijective _ h).left_inv variable [Decomposition β„³] protected theorem Decomposition.isInternal : DirectSum.IsInternal β„³ := ⟨Decomposition.right_inv.injective, Decomposition.left_inv.surjective⟩ #align direct_sum.decomposition.is_internal DirectSum.Decomposition.isInternal def decompose : M ≃ ⨁ i, β„³ i where toFun := Decomposition.decompose' invFun := DirectSum.coeAddMonoidHom β„³ left_inv := Decomposition.left_inv right_inv := Decomposition.right_inv #align direct_sum.decompose DirectSum.decompose protected theorem Decomposition.inductionOn {p : M β†’ Prop} (h_zero : p 0) (h_homogeneous : βˆ€ {i} (m : β„³ i), p (m : M)) (h_add : βˆ€ m m' : M, p m β†’ p m' β†’ p (m + m')) : βˆ€ m, p m := by let β„³' : ΞΉ β†’ AddSubmonoid M := fun i ↦ (βŸ¨βŸ¨β„³ i, fun x y ↦ AddMemClass.add_mem x y⟩, (ZeroMemClass.zero_mem _)⟩ : AddSubmonoid M) haveI t : DirectSum.Decomposition β„³' := { decompose' := DirectSum.decompose β„³ left_inv := fun _ ↦ (decompose β„³).left_inv _ right_inv := fun _ ↦ (decompose β„³).right_inv _ } have mem : βˆ€ m, m ∈ iSup β„³' := fun _m ↦ (DirectSum.IsInternal.addSubmonoid_iSup_eq_top β„³' (Decomposition.isInternal β„³')).symm β–Έ trivial -- Porting note: needs to use @ even though no implicit argument is provided exact fun m ↦ @AddSubmonoid.iSup_induction _ _ _ β„³' _ _ (mem m) (fun i m h ↦ h_homogeneous ⟨m, h⟩) h_zero h_add -- exact fun m ↦ -- AddSubmonoid.iSup_induction β„³' (mem m) (fun i m h ↦ h_homogeneous ⟨m, h⟩) h_zero h_add #align direct_sum.decomposition.induction_on DirectSum.Decomposition.inductionOn @[simp] theorem Decomposition.decompose'_eq : Decomposition.decompose' = decompose β„³ := rfl #align direct_sum.decomposition.decompose'_eq DirectSum.Decomposition.decompose'_eq @[simp] theorem decompose_symm_of {i : ΞΉ} (x : β„³ i) : (decompose β„³).symm (DirectSum.of _ i x) = x := DirectSum.coeAddMonoidHom_of β„³ _ _ #align direct_sum.decompose_symm_of DirectSum.decompose_symm_of @[simp] theorem decompose_coe {i : ΞΉ} (x : β„³ i) : decompose β„³ (x : M) = DirectSum.of _ i x := by rw [← decompose_symm_of _, Equiv.apply_symm_apply] #align direct_sum.decompose_coe DirectSum.decompose_coe theorem decompose_of_mem {x : M} {i : ΞΉ} (hx : x ∈ β„³ i) : decompose β„³ x = DirectSum.of (fun i ↦ β„³ i) i ⟨x, hx⟩ := decompose_coe _ ⟨x, hx⟩ #align direct_sum.decompose_of_mem DirectSum.decompose_of_mem theorem decompose_of_mem_same {x : M} {i : ΞΉ} (hx : x ∈ β„³ i) : (decompose β„³ x i : M) = x := by rw [decompose_of_mem _ hx, DirectSum.of_eq_same, Subtype.coe_mk] #align direct_sum.decompose_of_mem_same DirectSum.decompose_of_mem_same
Mathlib/Algebra/DirectSum/Decomposition.lean
140
142
theorem decompose_of_mem_ne {x : M} {i j : ΞΉ} (hx : x ∈ β„³ i) (hij : i β‰  j) : (decompose β„³ x j : M) = 0 := by
rw [decompose_of_mem _ hx, DirectSum.of_eq_of_ne _ _ _ _ hij, ZeroMemClass.coe_zero]
1
2.718282
0
0
4
182
import Mathlib.Algebra.DirectSum.Module import Mathlib.Algebra.Module.Submodule.Basic #align_import algebra.direct_sum.decomposition from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441" variable {ΞΉ R M Οƒ : Type*} open DirectSum namespace DirectSum section AddCommMonoid variable [DecidableEq ΞΉ] [AddCommMonoid M] variable [SetLike Οƒ M] [AddSubmonoidClass Οƒ M] (β„³ : ΞΉ β†’ Οƒ) class Decomposition where decompose' : M β†’ ⨁ i, β„³ i left_inv : Function.LeftInverse (DirectSum.coeAddMonoidHom β„³) decompose' right_inv : Function.RightInverse (DirectSum.coeAddMonoidHom β„³) decompose' #align direct_sum.decomposition DirectSum.Decomposition instance : Subsingleton (Decomposition β„³) := ⟨fun x y ↦ by cases' x with x xl xr cases' y with y yl yr congr exact Function.LeftInverse.eq_rightInverse xr yl⟩ abbrev Decomposition.ofAddHom (decompose : M β†’+ ⨁ i, β„³ i) (h_left_inv : (DirectSum.coeAddMonoidHom β„³).comp decompose = .id _) (h_right_inv : decompose.comp (DirectSum.coeAddMonoidHom β„³) = .id _) : Decomposition β„³ where decompose' := decompose left_inv := DFunLike.congr_fun h_left_inv right_inv := DFunLike.congr_fun h_right_inv noncomputable def IsInternal.chooseDecomposition (h : IsInternal β„³) : DirectSum.Decomposition β„³ where decompose' := (Equiv.ofBijective _ h).symm left_inv := (Equiv.ofBijective _ h).right_inv right_inv := (Equiv.ofBijective _ h).left_inv variable [Decomposition β„³] protected theorem Decomposition.isInternal : DirectSum.IsInternal β„³ := ⟨Decomposition.right_inv.injective, Decomposition.left_inv.surjective⟩ #align direct_sum.decomposition.is_internal DirectSum.Decomposition.isInternal def decompose : M ≃ ⨁ i, β„³ i where toFun := Decomposition.decompose' invFun := DirectSum.coeAddMonoidHom β„³ left_inv := Decomposition.left_inv right_inv := Decomposition.right_inv #align direct_sum.decompose DirectSum.decompose protected theorem Decomposition.inductionOn {p : M β†’ Prop} (h_zero : p 0) (h_homogeneous : βˆ€ {i} (m : β„³ i), p (m : M)) (h_add : βˆ€ m m' : M, p m β†’ p m' β†’ p (m + m')) : βˆ€ m, p m := by let β„³' : ΞΉ β†’ AddSubmonoid M := fun i ↦ (βŸ¨βŸ¨β„³ i, fun x y ↦ AddMemClass.add_mem x y⟩, (ZeroMemClass.zero_mem _)⟩ : AddSubmonoid M) haveI t : DirectSum.Decomposition β„³' := { decompose' := DirectSum.decompose β„³ left_inv := fun _ ↦ (decompose β„³).left_inv _ right_inv := fun _ ↦ (decompose β„³).right_inv _ } have mem : βˆ€ m, m ∈ iSup β„³' := fun _m ↦ (DirectSum.IsInternal.addSubmonoid_iSup_eq_top β„³' (Decomposition.isInternal β„³')).symm β–Έ trivial -- Porting note: needs to use @ even though no implicit argument is provided exact fun m ↦ @AddSubmonoid.iSup_induction _ _ _ β„³' _ _ (mem m) (fun i m h ↦ h_homogeneous ⟨m, h⟩) h_zero h_add -- exact fun m ↦ -- AddSubmonoid.iSup_induction β„³' (mem m) (fun i m h ↦ h_homogeneous ⟨m, h⟩) h_zero h_add #align direct_sum.decomposition.induction_on DirectSum.Decomposition.inductionOn @[simp] theorem Decomposition.decompose'_eq : Decomposition.decompose' = decompose β„³ := rfl #align direct_sum.decomposition.decompose'_eq DirectSum.Decomposition.decompose'_eq @[simp] theorem decompose_symm_of {i : ΞΉ} (x : β„³ i) : (decompose β„³).symm (DirectSum.of _ i x) = x := DirectSum.coeAddMonoidHom_of β„³ _ _ #align direct_sum.decompose_symm_of DirectSum.decompose_symm_of @[simp] theorem decompose_coe {i : ΞΉ} (x : β„³ i) : decompose β„³ (x : M) = DirectSum.of _ i x := by rw [← decompose_symm_of _, Equiv.apply_symm_apply] #align direct_sum.decompose_coe DirectSum.decompose_coe theorem decompose_of_mem {x : M} {i : ΞΉ} (hx : x ∈ β„³ i) : decompose β„³ x = DirectSum.of (fun i ↦ β„³ i) i ⟨x, hx⟩ := decompose_coe _ ⟨x, hx⟩ #align direct_sum.decompose_of_mem DirectSum.decompose_of_mem theorem decompose_of_mem_same {x : M} {i : ΞΉ} (hx : x ∈ β„³ i) : (decompose β„³ x i : M) = x := by rw [decompose_of_mem _ hx, DirectSum.of_eq_same, Subtype.coe_mk] #align direct_sum.decompose_of_mem_same DirectSum.decompose_of_mem_same theorem decompose_of_mem_ne {x : M} {i j : ΞΉ} (hx : x ∈ β„³ i) (hij : i β‰  j) : (decompose β„³ x j : M) = 0 := by rw [decompose_of_mem _ hx, DirectSum.of_eq_of_ne _ _ _ _ hij, ZeroMemClass.coe_zero] #align direct_sum.decompose_of_mem_ne DirectSum.decompose_of_mem_ne
Mathlib/Algebra/DirectSum/Decomposition.lean
145
147
theorem degree_eq_of_mem_mem {x : M} {i j : ΞΉ} (hxi : x ∈ β„³ i) (hxj : x ∈ β„³ j) (hx : x β‰  0) : i = j := by
contrapose! hx; rw [← decompose_of_mem_same β„³ hxj, decompose_of_mem_ne β„³ hxi hx]
1
2.718282
0
0
4
182
import Mathlib.Algebra.Group.Prod #align_import data.nat.cast.prod from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865" assert_not_exists MonoidWithZero variable {Ξ± Ξ² : Type*} namespace Prod variable [AddMonoidWithOne Ξ±] [AddMonoidWithOne Ξ²] instance instAddMonoidWithOne : AddMonoidWithOne (Ξ± Γ— Ξ²) := { Prod.instAddMonoid, @Prod.instOne Ξ± Ξ² _ _ with natCast := fun n => (n, n) natCast_zero := congr_argβ‚‚ Prod.mk Nat.cast_zero Nat.cast_zero natCast_succ := fun _ => congr_argβ‚‚ Prod.mk (Nat.cast_succ _) (Nat.cast_succ _) } @[simp]
Mathlib/Data/Nat/Cast/Prod.lean
29
29
theorem fst_natCast (n : β„•) : (n : Ξ± Γ— Ξ²).fst = n := by
induction n <;> simp [*]
1
2.718282
0
0
2
183
import Mathlib.Algebra.Group.Prod #align_import data.nat.cast.prod from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865" assert_not_exists MonoidWithZero variable {Ξ± Ξ² : Type*} namespace Prod variable [AddMonoidWithOne Ξ±] [AddMonoidWithOne Ξ²] instance instAddMonoidWithOne : AddMonoidWithOne (Ξ± Γ— Ξ²) := { Prod.instAddMonoid, @Prod.instOne Ξ± Ξ² _ _ with natCast := fun n => (n, n) natCast_zero := congr_argβ‚‚ Prod.mk Nat.cast_zero Nat.cast_zero natCast_succ := fun _ => congr_argβ‚‚ Prod.mk (Nat.cast_succ _) (Nat.cast_succ _) } @[simp] theorem fst_natCast (n : β„•) : (n : Ξ± Γ— Ξ²).fst = n := by induction n <;> simp [*] #align prod.fst_nat_cast Prod.fst_natCast -- See note [no_index around OfNat.ofNat] @[simp] theorem fst_ofNat (n : β„•) [n.AtLeastTwo] : (no_index (OfNat.ofNat n : Ξ± Γ— Ξ²)).1 = (OfNat.ofNat n : Ξ±) := rfl @[simp]
Mathlib/Data/Nat/Cast/Prod.lean
39
39
theorem snd_natCast (n : β„•) : (n : Ξ± Γ— Ξ²).snd = n := by
induction n <;> simp [*]
1
2.718282
0
0
2
183
import Mathlib.MeasureTheory.Measure.AEMeasurable #align_import dynamics.ergodic.measure_preserving from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] [MeasurableSpace Ξ³] [MeasurableSpace Ξ΄] namespace MeasureTheory open Measure Function Set variable {ΞΌa : Measure Ξ±} {ΞΌb : Measure Ξ²} {ΞΌc : Measure Ξ³} {ΞΌd : Measure Ξ΄} structure MeasurePreserving (f : Ξ± β†’ Ξ²) (ΞΌa : Measure Ξ± := by volume_tac) (ΞΌb : Measure Ξ² := by volume_tac) : Prop where protected measurable : Measurable f protected map_eq : map f ΞΌa = ΞΌb #align measure_theory.measure_preserving MeasureTheory.MeasurePreserving #align measure_theory.measure_preserving.measurable MeasureTheory.MeasurePreserving.measurable #align measure_theory.measure_preserving.map_eq MeasureTheory.MeasurePreserving.map_eq protected theorem _root_.Measurable.measurePreserving {f : Ξ± β†’ Ξ²} (h : Measurable f) (ΞΌa : Measure Ξ±) : MeasurePreserving f ΞΌa (map f ΞΌa) := ⟨h, rfl⟩ #align measurable.measure_preserving Measurable.measurePreserving namespace MeasurePreserving protected theorem id (ΞΌ : Measure Ξ±) : MeasurePreserving id ΞΌ ΞΌ := ⟨measurable_id, map_id⟩ #align measure_theory.measure_preserving.id MeasureTheory.MeasurePreserving.id protected theorem aemeasurable {f : Ξ± β†’ Ξ²} (hf : MeasurePreserving f ΞΌa ΞΌb) : AEMeasurable f ΞΌa := hf.1.aemeasurable #align measure_theory.measure_preserving.ae_measurable MeasureTheory.MeasurePreserving.aemeasurable @[nontriviality] theorem of_isEmpty [IsEmpty Ξ²] (f : Ξ± β†’ Ξ²) (ΞΌa : Measure Ξ±) (ΞΌb : Measure Ξ²) : MeasurePreserving f ΞΌa ΞΌb := ⟨measurable_of_subsingleton_codomain _, Subsingleton.elim _ _⟩ theorem symm (e : Ξ± ≃ᡐ Ξ²) {ΞΌa : Measure Ξ±} {ΞΌb : Measure Ξ²} (h : MeasurePreserving e ΞΌa ΞΌb) : MeasurePreserving e.symm ΞΌb ΞΌa := ⟨e.symm.measurable, by rw [← h.map_eq, map_map e.symm.measurable e.measurable, e.symm_comp_self, map_id]⟩ #align measure_theory.measure_preserving.symm MeasureTheory.MeasurePreserving.symm theorem restrict_preimage {f : Ξ± β†’ Ξ²} (hf : MeasurePreserving f ΞΌa ΞΌb) {s : Set Ξ²} (hs : MeasurableSet s) : MeasurePreserving f (ΞΌa.restrict (f ⁻¹' s)) (ΞΌb.restrict s) := ⟨hf.measurable, by rw [← hf.map_eq, restrict_map hf.measurable hs]⟩ #align measure_theory.measure_preserving.restrict_preimage MeasureTheory.MeasurePreserving.restrict_preimage theorem restrict_preimage_emb {f : Ξ± β†’ Ξ²} (hf : MeasurePreserving f ΞΌa ΞΌb) (hβ‚‚ : MeasurableEmbedding f) (s : Set Ξ²) : MeasurePreserving f (ΞΌa.restrict (f ⁻¹' s)) (ΞΌb.restrict s) := ⟨hf.measurable, by rw [← hf.map_eq, hβ‚‚.restrict_map]⟩ #align measure_theory.measure_preserving.restrict_preimage_emb MeasureTheory.MeasurePreserving.restrict_preimage_emb
Mathlib/Dynamics/Ergodic/MeasurePreserving.lean
87
89
theorem restrict_image_emb {f : Ξ± β†’ Ξ²} (hf : MeasurePreserving f ΞΌa ΞΌb) (hβ‚‚ : MeasurableEmbedding f) (s : Set Ξ±) : MeasurePreserving f (ΞΌa.restrict s) (ΞΌb.restrict (f '' s)) := by
simpa only [Set.preimage_image_eq _ hβ‚‚.injective] using hf.restrict_preimage_emb hβ‚‚ (f '' s)
1
2.718282
0
0
2
184
import Mathlib.MeasureTheory.Measure.AEMeasurable #align_import dynamics.ergodic.measure_preserving from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] [MeasurableSpace Ξ³] [MeasurableSpace Ξ΄] namespace MeasureTheory open Measure Function Set variable {ΞΌa : Measure Ξ±} {ΞΌb : Measure Ξ²} {ΞΌc : Measure Ξ³} {ΞΌd : Measure Ξ΄} structure MeasurePreserving (f : Ξ± β†’ Ξ²) (ΞΌa : Measure Ξ± := by volume_tac) (ΞΌb : Measure Ξ² := by volume_tac) : Prop where protected measurable : Measurable f protected map_eq : map f ΞΌa = ΞΌb #align measure_theory.measure_preserving MeasureTheory.MeasurePreserving #align measure_theory.measure_preserving.measurable MeasureTheory.MeasurePreserving.measurable #align measure_theory.measure_preserving.map_eq MeasureTheory.MeasurePreserving.map_eq protected theorem _root_.Measurable.measurePreserving {f : Ξ± β†’ Ξ²} (h : Measurable f) (ΞΌa : Measure Ξ±) : MeasurePreserving f ΞΌa (map f ΞΌa) := ⟨h, rfl⟩ #align measurable.measure_preserving Measurable.measurePreserving namespace MeasurePreserving protected theorem id (ΞΌ : Measure Ξ±) : MeasurePreserving id ΞΌ ΞΌ := ⟨measurable_id, map_id⟩ #align measure_theory.measure_preserving.id MeasureTheory.MeasurePreserving.id protected theorem aemeasurable {f : Ξ± β†’ Ξ²} (hf : MeasurePreserving f ΞΌa ΞΌb) : AEMeasurable f ΞΌa := hf.1.aemeasurable #align measure_theory.measure_preserving.ae_measurable MeasureTheory.MeasurePreserving.aemeasurable @[nontriviality] theorem of_isEmpty [IsEmpty Ξ²] (f : Ξ± β†’ Ξ²) (ΞΌa : Measure Ξ±) (ΞΌb : Measure Ξ²) : MeasurePreserving f ΞΌa ΞΌb := ⟨measurable_of_subsingleton_codomain _, Subsingleton.elim _ _⟩ theorem symm (e : Ξ± ≃ᡐ Ξ²) {ΞΌa : Measure Ξ±} {ΞΌb : Measure Ξ²} (h : MeasurePreserving e ΞΌa ΞΌb) : MeasurePreserving e.symm ΞΌb ΞΌa := ⟨e.symm.measurable, by rw [← h.map_eq, map_map e.symm.measurable e.measurable, e.symm_comp_self, map_id]⟩ #align measure_theory.measure_preserving.symm MeasureTheory.MeasurePreserving.symm theorem restrict_preimage {f : Ξ± β†’ Ξ²} (hf : MeasurePreserving f ΞΌa ΞΌb) {s : Set Ξ²} (hs : MeasurableSet s) : MeasurePreserving f (ΞΌa.restrict (f ⁻¹' s)) (ΞΌb.restrict s) := ⟨hf.measurable, by rw [← hf.map_eq, restrict_map hf.measurable hs]⟩ #align measure_theory.measure_preserving.restrict_preimage MeasureTheory.MeasurePreserving.restrict_preimage theorem restrict_preimage_emb {f : Ξ± β†’ Ξ²} (hf : MeasurePreserving f ΞΌa ΞΌb) (hβ‚‚ : MeasurableEmbedding f) (s : Set Ξ²) : MeasurePreserving f (ΞΌa.restrict (f ⁻¹' s)) (ΞΌb.restrict s) := ⟨hf.measurable, by rw [← hf.map_eq, hβ‚‚.restrict_map]⟩ #align measure_theory.measure_preserving.restrict_preimage_emb MeasureTheory.MeasurePreserving.restrict_preimage_emb theorem restrict_image_emb {f : Ξ± β†’ Ξ²} (hf : MeasurePreserving f ΞΌa ΞΌb) (hβ‚‚ : MeasurableEmbedding f) (s : Set Ξ±) : MeasurePreserving f (ΞΌa.restrict s) (ΞΌb.restrict (f '' s)) := by simpa only [Set.preimage_image_eq _ hβ‚‚.injective] using hf.restrict_preimage_emb hβ‚‚ (f '' s) #align measure_theory.measure_preserving.restrict_image_emb MeasureTheory.MeasurePreserving.restrict_image_emb
Mathlib/Dynamics/Ergodic/MeasurePreserving.lean
92
94
theorem aemeasurable_comp_iff {f : Ξ± β†’ Ξ²} (hf : MeasurePreserving f ΞΌa ΞΌb) (hβ‚‚ : MeasurableEmbedding f) {g : Ξ² β†’ Ξ³} : AEMeasurable (g ∘ f) ΞΌa ↔ AEMeasurable g ΞΌb := by
rw [← hf.map_eq, hβ‚‚.aemeasurable_map_iff]
1
2.718282
0
0
2
184
import Mathlib.Algebra.Star.Order import Mathlib.Topology.Instances.NNReal import Mathlib.Topology.Order.MonotoneContinuity #align_import data.real.sqrt from "leanprover-community/mathlib"@"31c24aa72e7b3e5ed97a8412470e904f82b81004" open Set Filter open scoped Filter NNReal Topology namespace NNReal variable {x y : ℝβ‰₯0} -- Porting note: was @[pp_nodot] noncomputable def sqrt : ℝβ‰₯0 ≃o ℝβ‰₯0 := OrderIso.symm <| powOrderIso 2 two_ne_zero #align nnreal.sqrt NNReal.sqrt @[simp] lemma sq_sqrt (x : ℝβ‰₯0) : sqrt x ^ 2 = x := sqrt.symm_apply_apply _ #align nnreal.sq_sqrt NNReal.sq_sqrt @[simp] lemma sqrt_sq (x : ℝβ‰₯0) : sqrt (x ^ 2) = x := sqrt.apply_symm_apply _ #align nnreal.sqrt_sq NNReal.sqrt_sq @[simp] lemma mul_self_sqrt (x : ℝβ‰₯0) : sqrt x * sqrt x = x := by rw [← sq, sq_sqrt] #align nnreal.mul_self_sqrt NNReal.mul_self_sqrt @[simp] lemma sqrt_mul_self (x : ℝβ‰₯0) : sqrt (x * x) = x := by rw [← sq, sqrt_sq] #align nnreal.sqrt_mul_self NNReal.sqrt_mul_self lemma sqrt_le_sqrt : sqrt x ≀ sqrt y ↔ x ≀ y := sqrt.le_iff_le #align nnreal.sqrt_le_sqrt_iff NNReal.sqrt_le_sqrt lemma sqrt_lt_sqrt : sqrt x < sqrt y ↔ x < y := sqrt.lt_iff_lt #align nnreal.sqrt_lt_sqrt_iff NNReal.sqrt_lt_sqrt lemma sqrt_eq_iff_eq_sq : sqrt x = y ↔ x = y ^ 2 := sqrt.toEquiv.apply_eq_iff_eq_symm_apply #align nnreal.sqrt_eq_iff_sq_eq NNReal.sqrt_eq_iff_eq_sq lemma sqrt_le_iff_le_sq : sqrt x ≀ y ↔ x ≀ y ^ 2 := sqrt.to_galoisConnection _ _ #align nnreal.sqrt_le_iff NNReal.sqrt_le_iff_le_sq lemma le_sqrt_iff_sq_le : x ≀ sqrt y ↔ x ^ 2 ≀ y := (sqrt.symm.to_galoisConnection _ _).symm #align nnreal.le_sqrt_iff NNReal.le_sqrt_iff_sq_le -- 2024-02-14 @[deprecated] alias sqrt_le_sqrt_iff := sqrt_le_sqrt @[deprecated] alias sqrt_lt_sqrt_iff := sqrt_lt_sqrt @[deprecated] alias sqrt_le_iff := sqrt_le_iff_le_sq @[deprecated] alias le_sqrt_iff := le_sqrt_iff_sq_le @[deprecated] alias sqrt_eq_iff_sq_eq := sqrt_eq_iff_eq_sq @[simp] lemma sqrt_eq_zero : sqrt x = 0 ↔ x = 0 := by simp [sqrt_eq_iff_eq_sq] #align nnreal.sqrt_eq_zero NNReal.sqrt_eq_zero @[simp] lemma sqrt_eq_one : sqrt x = 1 ↔ x = 1 := by simp [sqrt_eq_iff_eq_sq] @[simp] lemma sqrt_zero : sqrt 0 = 0 := by simp #align nnreal.sqrt_zero NNReal.sqrt_zero @[simp] lemma sqrt_one : sqrt 1 = 1 := by simp #align nnreal.sqrt_one NNReal.sqrt_one @[simp] lemma sqrt_le_one : sqrt x ≀ 1 ↔ x ≀ 1 := by rw [← sqrt_one, sqrt_le_sqrt, sqrt_one] @[simp] lemma one_le_sqrt : 1 ≀ sqrt x ↔ 1 ≀ x := by rw [← sqrt_one, sqrt_le_sqrt, sqrt_one]
Mathlib/Data/Real/Sqrt.lean
97
98
theorem sqrt_mul (x y : ℝβ‰₯0) : sqrt (x * y) = sqrt x * sqrt y := by
rw [sqrt_eq_iff_eq_sq, mul_pow, sq_sqrt, sq_sqrt]
1
2.718282
0
0
1
185
import Mathlib.Init.Function import Mathlib.Init.Order.Defs #align_import data.bool.basic from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" namespace Bool @[deprecated (since := "2024-06-07")] alias decide_True := decide_true_eq_true #align bool.to_bool_true decide_true_eq_true @[deprecated (since := "2024-06-07")] alias decide_False := decide_false_eq_false #align bool.to_bool_false decide_false_eq_false #align bool.to_bool_coe Bool.decide_coe @[deprecated (since := "2024-06-07")] alias coe_decide := decide_eq_true_iff #align bool.coe_to_bool decide_eq_true_iff @[deprecated decide_eq_true_iff (since := "2024-06-07")] alias of_decide_iff := decide_eq_true_iff #align bool.of_to_bool_iff decide_eq_true_iff #align bool.tt_eq_to_bool_iff true_eq_decide_iff #align bool.ff_eq_to_bool_iff false_eq_decide_iff @[deprecated (since := "2024-06-07")] alias decide_not := decide_not #align bool.to_bool_not decide_not #align bool.to_bool_and Bool.decide_and #align bool.to_bool_or Bool.decide_or #align bool.to_bool_eq decide_eq_decide @[deprecated (since := "2024-06-07")] alias not_false' := false_ne_true #align bool.not_ff Bool.false_ne_true @[deprecated (since := "2024-06-07")] alias eq_iff_eq_true_iff := eq_iff_iff #align bool.default_bool Bool.default_bool
Mathlib/Data/Bool/Basic.lean
57
57
theorem dichotomy (b : Bool) : b = false ∨ b = true := by
cases b <;> simp
1
2.718282
0
0
6
186
import Mathlib.Init.Function import Mathlib.Init.Order.Defs #align_import data.bool.basic from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" namespace Bool @[deprecated (since := "2024-06-07")] alias decide_True := decide_true_eq_true #align bool.to_bool_true decide_true_eq_true @[deprecated (since := "2024-06-07")] alias decide_False := decide_false_eq_false #align bool.to_bool_false decide_false_eq_false #align bool.to_bool_coe Bool.decide_coe @[deprecated (since := "2024-06-07")] alias coe_decide := decide_eq_true_iff #align bool.coe_to_bool decide_eq_true_iff @[deprecated decide_eq_true_iff (since := "2024-06-07")] alias of_decide_iff := decide_eq_true_iff #align bool.of_to_bool_iff decide_eq_true_iff #align bool.tt_eq_to_bool_iff true_eq_decide_iff #align bool.ff_eq_to_bool_iff false_eq_decide_iff @[deprecated (since := "2024-06-07")] alias decide_not := decide_not #align bool.to_bool_not decide_not #align bool.to_bool_and Bool.decide_and #align bool.to_bool_or Bool.decide_or #align bool.to_bool_eq decide_eq_decide @[deprecated (since := "2024-06-07")] alias not_false' := false_ne_true #align bool.not_ff Bool.false_ne_true @[deprecated (since := "2024-06-07")] alias eq_iff_eq_true_iff := eq_iff_iff #align bool.default_bool Bool.default_bool theorem dichotomy (b : Bool) : b = false ∨ b = true := by cases b <;> simp #align bool.dichotomy Bool.dichotomy theorem forall_bool' {p : Bool β†’ Prop} (b : Bool) : (βˆ€ x, p x) ↔ p b ∧ p !b := ⟨fun h ↦ ⟨h _, h _⟩, fun ⟨h₁, hβ‚‚βŸ© x ↦ by cases b <;> cases x <;> assumption⟩ @[simp] theorem forall_bool {p : Bool β†’ Prop} : (βˆ€ b, p b) ↔ p false ∧ p true := forall_bool' false #align bool.forall_bool Bool.forall_bool theorem exists_bool' {p : Bool β†’ Prop} (b : Bool) : (βˆƒ x, p x) ↔ p b ∨ p !b := ⟨fun ⟨x, hx⟩ ↦ by cases x <;> cases b <;> first | exact .inl β€Ή_β€Ί | exact .inr β€Ή_β€Ί, fun h ↦ by cases h <;> exact ⟨_, β€Ή_β€ΊβŸ©βŸ© @[simp] theorem exists_bool {p : Bool β†’ Prop} : (βˆƒ b, p b) ↔ p false ∨ p true := exists_bool' false #align bool.exists_bool Bool.exists_bool #align bool.decidable_forall_bool Bool.instDecidableForallOfDecidablePred #align bool.decidable_exists_bool Bool.instDecidableExistsOfDecidablePred #align bool.cond_eq_ite Bool.cond_eq_ite #align bool.cond_to_bool Bool.cond_decide #align bool.cond_bnot Bool.cond_not theorem not_ne_id : not β‰  id := fun h ↦ false_ne_true <| congrFun h true #align bool.bnot_ne_id Bool.not_ne_id #align bool.coe_bool_iff Bool.coe_iff_coe @[deprecated (since := "2024-06-07")] alias eq_true_of_ne_false := eq_true_of_ne_false #align bool.eq_tt_of_ne_ff eq_true_of_ne_false @[deprecated (since := "2024-06-07")] alias eq_false_of_ne_true := eq_false_of_ne_true #align bool.eq_ff_of_ne_tt eq_true_of_ne_false #align bool.bor_comm Bool.or_comm #align bool.bor_assoc Bool.or_assoc #align bool.bor_left_comm Bool.or_left_comm
Mathlib/Data/Bool/Basic.lean
99
99
theorem or_inl {a b : Bool} (H : a) : a || b := by
simp [H]
1
2.718282
0
0
6
186
import Mathlib.Init.Function import Mathlib.Init.Order.Defs #align_import data.bool.basic from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" namespace Bool @[deprecated (since := "2024-06-07")] alias decide_True := decide_true_eq_true #align bool.to_bool_true decide_true_eq_true @[deprecated (since := "2024-06-07")] alias decide_False := decide_false_eq_false #align bool.to_bool_false decide_false_eq_false #align bool.to_bool_coe Bool.decide_coe @[deprecated (since := "2024-06-07")] alias coe_decide := decide_eq_true_iff #align bool.coe_to_bool decide_eq_true_iff @[deprecated decide_eq_true_iff (since := "2024-06-07")] alias of_decide_iff := decide_eq_true_iff #align bool.of_to_bool_iff decide_eq_true_iff #align bool.tt_eq_to_bool_iff true_eq_decide_iff #align bool.ff_eq_to_bool_iff false_eq_decide_iff @[deprecated (since := "2024-06-07")] alias decide_not := decide_not #align bool.to_bool_not decide_not #align bool.to_bool_and Bool.decide_and #align bool.to_bool_or Bool.decide_or #align bool.to_bool_eq decide_eq_decide @[deprecated (since := "2024-06-07")] alias not_false' := false_ne_true #align bool.not_ff Bool.false_ne_true @[deprecated (since := "2024-06-07")] alias eq_iff_eq_true_iff := eq_iff_iff #align bool.default_bool Bool.default_bool theorem dichotomy (b : Bool) : b = false ∨ b = true := by cases b <;> simp #align bool.dichotomy Bool.dichotomy theorem forall_bool' {p : Bool β†’ Prop} (b : Bool) : (βˆ€ x, p x) ↔ p b ∧ p !b := ⟨fun h ↦ ⟨h _, h _⟩, fun ⟨h₁, hβ‚‚βŸ© x ↦ by cases b <;> cases x <;> assumption⟩ @[simp] theorem forall_bool {p : Bool β†’ Prop} : (βˆ€ b, p b) ↔ p false ∧ p true := forall_bool' false #align bool.forall_bool Bool.forall_bool theorem exists_bool' {p : Bool β†’ Prop} (b : Bool) : (βˆƒ x, p x) ↔ p b ∨ p !b := ⟨fun ⟨x, hx⟩ ↦ by cases x <;> cases b <;> first | exact .inl β€Ή_β€Ί | exact .inr β€Ή_β€Ί, fun h ↦ by cases h <;> exact ⟨_, β€Ή_β€ΊβŸ©βŸ© @[simp] theorem exists_bool {p : Bool β†’ Prop} : (βˆƒ b, p b) ↔ p false ∨ p true := exists_bool' false #align bool.exists_bool Bool.exists_bool #align bool.decidable_forall_bool Bool.instDecidableForallOfDecidablePred #align bool.decidable_exists_bool Bool.instDecidableExistsOfDecidablePred #align bool.cond_eq_ite Bool.cond_eq_ite #align bool.cond_to_bool Bool.cond_decide #align bool.cond_bnot Bool.cond_not theorem not_ne_id : not β‰  id := fun h ↦ false_ne_true <| congrFun h true #align bool.bnot_ne_id Bool.not_ne_id #align bool.coe_bool_iff Bool.coe_iff_coe @[deprecated (since := "2024-06-07")] alias eq_true_of_ne_false := eq_true_of_ne_false #align bool.eq_tt_of_ne_ff eq_true_of_ne_false @[deprecated (since := "2024-06-07")] alias eq_false_of_ne_true := eq_false_of_ne_true #align bool.eq_ff_of_ne_tt eq_true_of_ne_false #align bool.bor_comm Bool.or_comm #align bool.bor_assoc Bool.or_assoc #align bool.bor_left_comm Bool.or_left_comm theorem or_inl {a b : Bool} (H : a) : a || b := by simp [H] #align bool.bor_inl Bool.or_inl
Mathlib/Data/Bool/Basic.lean
102
102
theorem or_inr {a b : Bool} (H : b) : a || b := by
cases a <;> simp [H]
1
2.718282
0
0
6
186
import Mathlib.Init.Function import Mathlib.Init.Order.Defs #align_import data.bool.basic from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" namespace Bool @[deprecated (since := "2024-06-07")] alias decide_True := decide_true_eq_true #align bool.to_bool_true decide_true_eq_true @[deprecated (since := "2024-06-07")] alias decide_False := decide_false_eq_false #align bool.to_bool_false decide_false_eq_false #align bool.to_bool_coe Bool.decide_coe @[deprecated (since := "2024-06-07")] alias coe_decide := decide_eq_true_iff #align bool.coe_to_bool decide_eq_true_iff @[deprecated decide_eq_true_iff (since := "2024-06-07")] alias of_decide_iff := decide_eq_true_iff #align bool.of_to_bool_iff decide_eq_true_iff #align bool.tt_eq_to_bool_iff true_eq_decide_iff #align bool.ff_eq_to_bool_iff false_eq_decide_iff @[deprecated (since := "2024-06-07")] alias decide_not := decide_not #align bool.to_bool_not decide_not #align bool.to_bool_and Bool.decide_and #align bool.to_bool_or Bool.decide_or #align bool.to_bool_eq decide_eq_decide @[deprecated (since := "2024-06-07")] alias not_false' := false_ne_true #align bool.not_ff Bool.false_ne_true @[deprecated (since := "2024-06-07")] alias eq_iff_eq_true_iff := eq_iff_iff #align bool.default_bool Bool.default_bool theorem dichotomy (b : Bool) : b = false ∨ b = true := by cases b <;> simp #align bool.dichotomy Bool.dichotomy theorem forall_bool' {p : Bool β†’ Prop} (b : Bool) : (βˆ€ x, p x) ↔ p b ∧ p !b := ⟨fun h ↦ ⟨h _, h _⟩, fun ⟨h₁, hβ‚‚βŸ© x ↦ by cases b <;> cases x <;> assumption⟩ @[simp] theorem forall_bool {p : Bool β†’ Prop} : (βˆ€ b, p b) ↔ p false ∧ p true := forall_bool' false #align bool.forall_bool Bool.forall_bool theorem exists_bool' {p : Bool β†’ Prop} (b : Bool) : (βˆƒ x, p x) ↔ p b ∨ p !b := ⟨fun ⟨x, hx⟩ ↦ by cases x <;> cases b <;> first | exact .inl β€Ή_β€Ί | exact .inr β€Ή_β€Ί, fun h ↦ by cases h <;> exact ⟨_, β€Ή_β€ΊβŸ©βŸ© @[simp] theorem exists_bool {p : Bool β†’ Prop} : (βˆƒ b, p b) ↔ p false ∨ p true := exists_bool' false #align bool.exists_bool Bool.exists_bool #align bool.decidable_forall_bool Bool.instDecidableForallOfDecidablePred #align bool.decidable_exists_bool Bool.instDecidableExistsOfDecidablePred #align bool.cond_eq_ite Bool.cond_eq_ite #align bool.cond_to_bool Bool.cond_decide #align bool.cond_bnot Bool.cond_not theorem not_ne_id : not β‰  id := fun h ↦ false_ne_true <| congrFun h true #align bool.bnot_ne_id Bool.not_ne_id #align bool.coe_bool_iff Bool.coe_iff_coe @[deprecated (since := "2024-06-07")] alias eq_true_of_ne_false := eq_true_of_ne_false #align bool.eq_tt_of_ne_ff eq_true_of_ne_false @[deprecated (since := "2024-06-07")] alias eq_false_of_ne_true := eq_false_of_ne_true #align bool.eq_ff_of_ne_tt eq_true_of_ne_false #align bool.bor_comm Bool.or_comm #align bool.bor_assoc Bool.or_assoc #align bool.bor_left_comm Bool.or_left_comm theorem or_inl {a b : Bool} (H : a) : a || b := by simp [H] #align bool.bor_inl Bool.or_inl theorem or_inr {a b : Bool} (H : b) : a || b := by cases a <;> simp [H] #align bool.bor_inr Bool.or_inr #align bool.band_comm Bool.and_comm #align bool.band_assoc Bool.and_assoc #align bool.band_left_comm Bool.and_left_comm
Mathlib/Data/Bool/Basic.lean
109
109
theorem and_elim_left : βˆ€ {a b : Bool}, a && b β†’ a := by
decide
1
2.718282
0
0
6
186
import Mathlib.Init.Function import Mathlib.Init.Order.Defs #align_import data.bool.basic from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" namespace Bool @[deprecated (since := "2024-06-07")] alias decide_True := decide_true_eq_true #align bool.to_bool_true decide_true_eq_true @[deprecated (since := "2024-06-07")] alias decide_False := decide_false_eq_false #align bool.to_bool_false decide_false_eq_false #align bool.to_bool_coe Bool.decide_coe @[deprecated (since := "2024-06-07")] alias coe_decide := decide_eq_true_iff #align bool.coe_to_bool decide_eq_true_iff @[deprecated decide_eq_true_iff (since := "2024-06-07")] alias of_decide_iff := decide_eq_true_iff #align bool.of_to_bool_iff decide_eq_true_iff #align bool.tt_eq_to_bool_iff true_eq_decide_iff #align bool.ff_eq_to_bool_iff false_eq_decide_iff @[deprecated (since := "2024-06-07")] alias decide_not := decide_not #align bool.to_bool_not decide_not #align bool.to_bool_and Bool.decide_and #align bool.to_bool_or Bool.decide_or #align bool.to_bool_eq decide_eq_decide @[deprecated (since := "2024-06-07")] alias not_false' := false_ne_true #align bool.not_ff Bool.false_ne_true @[deprecated (since := "2024-06-07")] alias eq_iff_eq_true_iff := eq_iff_iff #align bool.default_bool Bool.default_bool theorem dichotomy (b : Bool) : b = false ∨ b = true := by cases b <;> simp #align bool.dichotomy Bool.dichotomy theorem forall_bool' {p : Bool β†’ Prop} (b : Bool) : (βˆ€ x, p x) ↔ p b ∧ p !b := ⟨fun h ↦ ⟨h _, h _⟩, fun ⟨h₁, hβ‚‚βŸ© x ↦ by cases b <;> cases x <;> assumption⟩ @[simp] theorem forall_bool {p : Bool β†’ Prop} : (βˆ€ b, p b) ↔ p false ∧ p true := forall_bool' false #align bool.forall_bool Bool.forall_bool theorem exists_bool' {p : Bool β†’ Prop} (b : Bool) : (βˆƒ x, p x) ↔ p b ∨ p !b := ⟨fun ⟨x, hx⟩ ↦ by cases x <;> cases b <;> first | exact .inl β€Ή_β€Ί | exact .inr β€Ή_β€Ί, fun h ↦ by cases h <;> exact ⟨_, β€Ή_β€ΊβŸ©βŸ© @[simp] theorem exists_bool {p : Bool β†’ Prop} : (βˆƒ b, p b) ↔ p false ∨ p true := exists_bool' false #align bool.exists_bool Bool.exists_bool #align bool.decidable_forall_bool Bool.instDecidableForallOfDecidablePred #align bool.decidable_exists_bool Bool.instDecidableExistsOfDecidablePred #align bool.cond_eq_ite Bool.cond_eq_ite #align bool.cond_to_bool Bool.cond_decide #align bool.cond_bnot Bool.cond_not theorem not_ne_id : not β‰  id := fun h ↦ false_ne_true <| congrFun h true #align bool.bnot_ne_id Bool.not_ne_id #align bool.coe_bool_iff Bool.coe_iff_coe @[deprecated (since := "2024-06-07")] alias eq_true_of_ne_false := eq_true_of_ne_false #align bool.eq_tt_of_ne_ff eq_true_of_ne_false @[deprecated (since := "2024-06-07")] alias eq_false_of_ne_true := eq_false_of_ne_true #align bool.eq_ff_of_ne_tt eq_true_of_ne_false #align bool.bor_comm Bool.or_comm #align bool.bor_assoc Bool.or_assoc #align bool.bor_left_comm Bool.or_left_comm theorem or_inl {a b : Bool} (H : a) : a || b := by simp [H] #align bool.bor_inl Bool.or_inl theorem or_inr {a b : Bool} (H : b) : a || b := by cases a <;> simp [H] #align bool.bor_inr Bool.or_inr #align bool.band_comm Bool.and_comm #align bool.band_assoc Bool.and_assoc #align bool.band_left_comm Bool.and_left_comm theorem and_elim_left : βˆ€ {a b : Bool}, a && b β†’ a := by decide #align bool.band_elim_left Bool.and_elim_left
Mathlib/Data/Bool/Basic.lean
112
112
theorem and_intro : βˆ€ {a b : Bool}, a β†’ b β†’ a && b := by
decide
1
2.718282
0
0
6
186
import Mathlib.Init.Function import Mathlib.Init.Order.Defs #align_import data.bool.basic from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" namespace Bool @[deprecated (since := "2024-06-07")] alias decide_True := decide_true_eq_true #align bool.to_bool_true decide_true_eq_true @[deprecated (since := "2024-06-07")] alias decide_False := decide_false_eq_false #align bool.to_bool_false decide_false_eq_false #align bool.to_bool_coe Bool.decide_coe @[deprecated (since := "2024-06-07")] alias coe_decide := decide_eq_true_iff #align bool.coe_to_bool decide_eq_true_iff @[deprecated decide_eq_true_iff (since := "2024-06-07")] alias of_decide_iff := decide_eq_true_iff #align bool.of_to_bool_iff decide_eq_true_iff #align bool.tt_eq_to_bool_iff true_eq_decide_iff #align bool.ff_eq_to_bool_iff false_eq_decide_iff @[deprecated (since := "2024-06-07")] alias decide_not := decide_not #align bool.to_bool_not decide_not #align bool.to_bool_and Bool.decide_and #align bool.to_bool_or Bool.decide_or #align bool.to_bool_eq decide_eq_decide @[deprecated (since := "2024-06-07")] alias not_false' := false_ne_true #align bool.not_ff Bool.false_ne_true @[deprecated (since := "2024-06-07")] alias eq_iff_eq_true_iff := eq_iff_iff #align bool.default_bool Bool.default_bool theorem dichotomy (b : Bool) : b = false ∨ b = true := by cases b <;> simp #align bool.dichotomy Bool.dichotomy theorem forall_bool' {p : Bool β†’ Prop} (b : Bool) : (βˆ€ x, p x) ↔ p b ∧ p !b := ⟨fun h ↦ ⟨h _, h _⟩, fun ⟨h₁, hβ‚‚βŸ© x ↦ by cases b <;> cases x <;> assumption⟩ @[simp] theorem forall_bool {p : Bool β†’ Prop} : (βˆ€ b, p b) ↔ p false ∧ p true := forall_bool' false #align bool.forall_bool Bool.forall_bool theorem exists_bool' {p : Bool β†’ Prop} (b : Bool) : (βˆƒ x, p x) ↔ p b ∨ p !b := ⟨fun ⟨x, hx⟩ ↦ by cases x <;> cases b <;> first | exact .inl β€Ή_β€Ί | exact .inr β€Ή_β€Ί, fun h ↦ by cases h <;> exact ⟨_, β€Ή_β€ΊβŸ©βŸ© @[simp] theorem exists_bool {p : Bool β†’ Prop} : (βˆƒ b, p b) ↔ p false ∨ p true := exists_bool' false #align bool.exists_bool Bool.exists_bool #align bool.decidable_forall_bool Bool.instDecidableForallOfDecidablePred #align bool.decidable_exists_bool Bool.instDecidableExistsOfDecidablePred #align bool.cond_eq_ite Bool.cond_eq_ite #align bool.cond_to_bool Bool.cond_decide #align bool.cond_bnot Bool.cond_not theorem not_ne_id : not β‰  id := fun h ↦ false_ne_true <| congrFun h true #align bool.bnot_ne_id Bool.not_ne_id #align bool.coe_bool_iff Bool.coe_iff_coe @[deprecated (since := "2024-06-07")] alias eq_true_of_ne_false := eq_true_of_ne_false #align bool.eq_tt_of_ne_ff eq_true_of_ne_false @[deprecated (since := "2024-06-07")] alias eq_false_of_ne_true := eq_false_of_ne_true #align bool.eq_ff_of_ne_tt eq_true_of_ne_false #align bool.bor_comm Bool.or_comm #align bool.bor_assoc Bool.or_assoc #align bool.bor_left_comm Bool.or_left_comm theorem or_inl {a b : Bool} (H : a) : a || b := by simp [H] #align bool.bor_inl Bool.or_inl theorem or_inr {a b : Bool} (H : b) : a || b := by cases a <;> simp [H] #align bool.bor_inr Bool.or_inr #align bool.band_comm Bool.and_comm #align bool.band_assoc Bool.and_assoc #align bool.band_left_comm Bool.and_left_comm theorem and_elim_left : βˆ€ {a b : Bool}, a && b β†’ a := by decide #align bool.band_elim_left Bool.and_elim_left theorem and_intro : βˆ€ {a b : Bool}, a β†’ b β†’ a && b := by decide #align bool.band_intro Bool.and_intro
Mathlib/Data/Bool/Basic.lean
115
115
theorem and_elim_right : βˆ€ {a b : Bool}, a && b β†’ b := by
decide
1
2.718282
0
0
6
186
import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace #align_import geometry.manifold.vector_bundle.fiberwise_linear from "leanprover-community/mathlib"@"be2c24f56783935652cefffb4bfca7e4b25d167e" noncomputable section open Set TopologicalSpace open scoped Manifold Topology variable {π•œ B F : Type*} [TopologicalSpace B] variable [NontriviallyNormedField π•œ] [NormedAddCommGroup F] [NormedSpace π•œ F] namespace FiberwiseLinear variable {Ο† Ο†' : B β†’ F ≃L[π•œ] F} {U U' : Set B} def partialHomeomorph (Ο† : B β†’ F ≃L[π•œ] F) (hU : IsOpen U) (hΟ† : ContinuousOn (fun x => Ο† x : B β†’ F β†’L[π•œ] F) U) (h2Ο† : ContinuousOn (fun x => (Ο† x).symm : B β†’ F β†’L[π•œ] F) U) : PartialHomeomorph (B Γ— F) (B Γ— F) where toFun x := (x.1, Ο† x.1 x.2) invFun x := (x.1, (Ο† x.1).symm x.2) source := U Γ—Λ’ univ target := U Γ—Λ’ univ map_source' _x hx := mk_mem_prod hx.1 (mem_univ _) map_target' _x hx := mk_mem_prod hx.1 (mem_univ _) left_inv' _ _ := Prod.ext rfl (ContinuousLinearEquiv.symm_apply_apply _ _) right_inv' _ _ := Prod.ext rfl (ContinuousLinearEquiv.apply_symm_apply _ _) open_source := hU.prod isOpen_univ open_target := hU.prod isOpen_univ continuousOn_toFun := have : ContinuousOn (fun p : B Γ— F => ((Ο† p.1 : F β†’L[π•œ] F), p.2)) (U Γ—Λ’ univ) := hΟ†.prod_map continuousOn_id continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this) continuousOn_invFun := haveI : ContinuousOn (fun p : B Γ— F => (((Ο† p.1).symm : F β†’L[π•œ] F), p.2)) (U Γ—Λ’ univ) := h2Ο†.prod_map continuousOn_id continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this) #align fiberwise_linear.local_homeomorph FiberwiseLinear.partialHomeomorph theorem trans_partialHomeomorph_apply (hU : IsOpen U) (hΟ† : ContinuousOn (fun x => Ο† x : B β†’ F β†’L[π•œ] F) U) (h2Ο† : ContinuousOn (fun x => (Ο† x).symm : B β†’ F β†’L[π•œ] F) U) (hU' : IsOpen U') (hΟ†' : ContinuousOn (fun x => Ο†' x : B β†’ F β†’L[π•œ] F) U') (h2Ο†' : ContinuousOn (fun x => (Ο†' x).symm : B β†’ F β†’L[π•œ] F) U') (b : B) (v : F) : (FiberwiseLinear.partialHomeomorph Ο† hU hΟ† h2Ο† ≫ₕ FiberwiseLinear.partialHomeomorph Ο†' hU' hΟ†' h2Ο†') ⟨b, v⟩ = ⟨b, Ο†' b (Ο† b v)⟩ := rfl #align fiberwise_linear.trans_local_homeomorph_apply FiberwiseLinear.trans_partialHomeomorph_apply
Mathlib/Geometry/Manifold/VectorBundle/FiberwiseLinear.lean
74
82
theorem source_trans_partialHomeomorph (hU : IsOpen U) (hΟ† : ContinuousOn (fun x => Ο† x : B β†’ F β†’L[π•œ] F) U) (h2Ο† : ContinuousOn (fun x => (Ο† x).symm : B β†’ F β†’L[π•œ] F) U) (hU' : IsOpen U') (hΟ†' : ContinuousOn (fun x => Ο†' x : B β†’ F β†’L[π•œ] F) U') (h2Ο†' : ContinuousOn (fun x => (Ο†' x).symm : B β†’ F β†’L[π•œ] F) U') : (FiberwiseLinear.partialHomeomorph Ο† hU hΟ† h2Ο† ≫ₕ FiberwiseLinear.partialHomeomorph Ο†' hU' hΟ†' h2Ο†').source = (U ∩ U') Γ—Λ’ univ := by
dsimp only [FiberwiseLinear.partialHomeomorph]; mfld_set_tac
1
2.718282
0
0
2
187
import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace #align_import geometry.manifold.vector_bundle.fiberwise_linear from "leanprover-community/mathlib"@"be2c24f56783935652cefffb4bfca7e4b25d167e" noncomputable section open Set TopologicalSpace open scoped Manifold Topology variable {π•œ B F : Type*} [TopologicalSpace B] variable [NontriviallyNormedField π•œ] [NormedAddCommGroup F] [NormedSpace π•œ F] namespace FiberwiseLinear variable {Ο† Ο†' : B β†’ F ≃L[π•œ] F} {U U' : Set B} def partialHomeomorph (Ο† : B β†’ F ≃L[π•œ] F) (hU : IsOpen U) (hΟ† : ContinuousOn (fun x => Ο† x : B β†’ F β†’L[π•œ] F) U) (h2Ο† : ContinuousOn (fun x => (Ο† x).symm : B β†’ F β†’L[π•œ] F) U) : PartialHomeomorph (B Γ— F) (B Γ— F) where toFun x := (x.1, Ο† x.1 x.2) invFun x := (x.1, (Ο† x.1).symm x.2) source := U Γ—Λ’ univ target := U Γ—Λ’ univ map_source' _x hx := mk_mem_prod hx.1 (mem_univ _) map_target' _x hx := mk_mem_prod hx.1 (mem_univ _) left_inv' _ _ := Prod.ext rfl (ContinuousLinearEquiv.symm_apply_apply _ _) right_inv' _ _ := Prod.ext rfl (ContinuousLinearEquiv.apply_symm_apply _ _) open_source := hU.prod isOpen_univ open_target := hU.prod isOpen_univ continuousOn_toFun := have : ContinuousOn (fun p : B Γ— F => ((Ο† p.1 : F β†’L[π•œ] F), p.2)) (U Γ—Λ’ univ) := hΟ†.prod_map continuousOn_id continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this) continuousOn_invFun := haveI : ContinuousOn (fun p : B Γ— F => (((Ο† p.1).symm : F β†’L[π•œ] F), p.2)) (U Γ—Λ’ univ) := h2Ο†.prod_map continuousOn_id continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this) #align fiberwise_linear.local_homeomorph FiberwiseLinear.partialHomeomorph theorem trans_partialHomeomorph_apply (hU : IsOpen U) (hΟ† : ContinuousOn (fun x => Ο† x : B β†’ F β†’L[π•œ] F) U) (h2Ο† : ContinuousOn (fun x => (Ο† x).symm : B β†’ F β†’L[π•œ] F) U) (hU' : IsOpen U') (hΟ†' : ContinuousOn (fun x => Ο†' x : B β†’ F β†’L[π•œ] F) U') (h2Ο†' : ContinuousOn (fun x => (Ο†' x).symm : B β†’ F β†’L[π•œ] F) U') (b : B) (v : F) : (FiberwiseLinear.partialHomeomorph Ο† hU hΟ† h2Ο† ≫ₕ FiberwiseLinear.partialHomeomorph Ο†' hU' hΟ†' h2Ο†') ⟨b, v⟩ = ⟨b, Ο†' b (Ο† b v)⟩ := rfl #align fiberwise_linear.trans_local_homeomorph_apply FiberwiseLinear.trans_partialHomeomorph_apply theorem source_trans_partialHomeomorph (hU : IsOpen U) (hΟ† : ContinuousOn (fun x => Ο† x : B β†’ F β†’L[π•œ] F) U) (h2Ο† : ContinuousOn (fun x => (Ο† x).symm : B β†’ F β†’L[π•œ] F) U) (hU' : IsOpen U') (hΟ†' : ContinuousOn (fun x => Ο†' x : B β†’ F β†’L[π•œ] F) U') (h2Ο†' : ContinuousOn (fun x => (Ο†' x).symm : B β†’ F β†’L[π•œ] F) U') : (FiberwiseLinear.partialHomeomorph Ο† hU hΟ† h2Ο† ≫ₕ FiberwiseLinear.partialHomeomorph Ο†' hU' hΟ†' h2Ο†').source = (U ∩ U') Γ—Λ’ univ := by dsimp only [FiberwiseLinear.partialHomeomorph]; mfld_set_tac #align fiberwise_linear.source_trans_local_homeomorph FiberwiseLinear.source_trans_partialHomeomorph
Mathlib/Geometry/Manifold/VectorBundle/FiberwiseLinear.lean
87
95
theorem target_trans_partialHomeomorph (hU : IsOpen U) (hΟ† : ContinuousOn (fun x => Ο† x : B β†’ F β†’L[π•œ] F) U) (h2Ο† : ContinuousOn (fun x => (Ο† x).symm : B β†’ F β†’L[π•œ] F) U) (hU' : IsOpen U') (hΟ†' : ContinuousOn (fun x => Ο†' x : B β†’ F β†’L[π•œ] F) U') (h2Ο†' : ContinuousOn (fun x => (Ο†' x).symm : B β†’ F β†’L[π•œ] F) U') : (FiberwiseLinear.partialHomeomorph Ο† hU hΟ† h2Ο† ≫ₕ FiberwiseLinear.partialHomeomorph Ο†' hU' hΟ†' h2Ο†').target = (U ∩ U') Γ—Λ’ univ := by
dsimp only [FiberwiseLinear.partialHomeomorph]; mfld_set_tac
1
2.718282
0
0
2
187
import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Ring.Action.Subobjects import Mathlib.Algebra.Ring.Equiv import Mathlib.Algebra.Ring.Prod import Mathlib.Data.Set.Finite import Mathlib.GroupTheory.Submonoid.Centralizer import Mathlib.RingTheory.NonUnitalSubsemiring.Basic #align_import ring_theory.subsemiring.basic from "leanprover-community/mathlib"@"b915e9392ecb2a861e1e766f0e1df6ac481188ca" universe u v w section AddSubmonoidWithOneClass class AddSubmonoidWithOneClass (S R : Type*) [AddMonoidWithOne R] [SetLike S R] extends AddSubmonoidClass S R, OneMemClass S R : Prop #align add_submonoid_with_one_class AddSubmonoidWithOneClass variable {S R : Type*} [AddMonoidWithOne R] [SetLike S R] (s : S) @[aesop safe apply (rule_sets := [SetLike])]
Mathlib/Algebra/Ring/Subsemiring/Basic.lean
39
40
theorem natCast_mem [AddSubmonoidWithOneClass S R] (n : β„•) : (n : R) ∈ s := by
induction n <;> simp [zero_mem, add_mem, one_mem, *]
1
2.718282
0
0
1
188
import Mathlib.Analysis.Calculus.Conformal.NormedSpace import Mathlib.Analysis.InnerProductSpace.ConformalLinearMap #align_import analysis.calculus.conformal.inner_product from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section variable {E F : Type*} variable [NormedAddCommGroup E] [NormedAddCommGroup F] variable [InnerProductSpace ℝ E] [InnerProductSpace ℝ F] open RealInnerProductSpace
Mathlib/Analysis/Calculus/Conformal/InnerProduct.lean
29
31
theorem conformalAt_iff' {f : E β†’ F} {x : E} : ConformalAt f x ↔ βˆƒ c : ℝ, 0 < c ∧ βˆ€ u v : E, βŸͺfderiv ℝ f x u, fderiv ℝ f x v⟫ = c * βŸͺu, v⟫ := by
rw [conformalAt_iff_isConformalMap_fderiv, isConformalMap_iff]
1
2.718282
0
0
2
189
import Mathlib.Analysis.Calculus.Conformal.NormedSpace import Mathlib.Analysis.InnerProductSpace.ConformalLinearMap #align_import analysis.calculus.conformal.inner_product from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section variable {E F : Type*} variable [NormedAddCommGroup E] [NormedAddCommGroup F] variable [InnerProductSpace ℝ E] [InnerProductSpace ℝ F] open RealInnerProductSpace theorem conformalAt_iff' {f : E β†’ F} {x : E} : ConformalAt f x ↔ βˆƒ c : ℝ, 0 < c ∧ βˆ€ u v : E, βŸͺfderiv ℝ f x u, fderiv ℝ f x v⟫ = c * βŸͺu, v⟫ := by rw [conformalAt_iff_isConformalMap_fderiv, isConformalMap_iff] #align conformal_at_iff' conformalAt_iff'
Mathlib/Analysis/Calculus/Conformal/InnerProduct.lean
36
38
theorem conformalAt_iff {f : E β†’ F} {x : E} {f' : E β†’L[ℝ] F} (h : HasFDerivAt f f' x) : ConformalAt f x ↔ βˆƒ c : ℝ, 0 < c ∧ βˆ€ u v : E, βŸͺf' u, f' v⟫ = c * βŸͺu, v⟫ := by
simp only [conformalAt_iff', h.fderiv]
1
2.718282
0
0
2
189
import Mathlib.CategoryTheory.Limits.Shapes.Images import Mathlib.CategoryTheory.Limits.Constructions.EpiMono #align_import category_theory.limits.preserves.shapes.images from "leanprover-community/mathlib"@"fc78e3c190c72a109699385da6be2725e88df841" noncomputable section namespace CategoryTheory namespace PreservesImage open CategoryTheory open CategoryTheory.Limits universe u₁ uβ‚‚ v₁ vβ‚‚ variable {A : Type u₁} {B : Type uβ‚‚} [Category.{v₁} A] [Category.{vβ‚‚} B] variable [HasEqualizers A] [HasImages A] variable [StrongEpiCategory B] [HasImages B] variable (L : A β₯€ B) variable [βˆ€ {X Y Z : A} (f : X ⟢ Z) (g : Y ⟢ Z), PreservesLimit (cospan f g) L] variable [βˆ€ {X Y Z : A} (f : X ⟢ Y) (g : X ⟢ Z), PreservesColimit (span f g) L] @[simps!] def iso {X Y : A} (f : X ⟢ Y) : image (L.map f) β‰… L.obj (image f) := let aux1 : StrongEpiMonoFactorisation (L.map f) := { I := L.obj (Limits.image f) m := L.map <| Limits.image.ΞΉ _ m_mono := preserves_mono_of_preservesLimit _ _ e := L.map <| factorThruImage _ e_strong_epi := @strongEpi_of_epi B _ _ _ _ _ (preserves_epi_of_preservesColimit L _) fac := by rw [← L.map_comp, Limits.image.fac] } IsImage.isoExt (Image.isImage (L.map f)) aux1.toMonoIsImage #align category_theory.preserves_image.iso CategoryTheory.PreservesImage.iso @[reassoc]
Mathlib/CategoryTheory/Limits/Preserves/Shapes/Images.lean
52
53
theorem factorThruImage_comp_hom {X Y : A} (f : X ⟢ Y) : factorThruImage (L.map f) ≫ (iso L f).hom = L.map (factorThruImage f) := by
simp
1
2.718282
0
0
3
190
import Mathlib.CategoryTheory.Limits.Shapes.Images import Mathlib.CategoryTheory.Limits.Constructions.EpiMono #align_import category_theory.limits.preserves.shapes.images from "leanprover-community/mathlib"@"fc78e3c190c72a109699385da6be2725e88df841" noncomputable section namespace CategoryTheory namespace PreservesImage open CategoryTheory open CategoryTheory.Limits universe u₁ uβ‚‚ v₁ vβ‚‚ variable {A : Type u₁} {B : Type uβ‚‚} [Category.{v₁} A] [Category.{vβ‚‚} B] variable [HasEqualizers A] [HasImages A] variable [StrongEpiCategory B] [HasImages B] variable (L : A β₯€ B) variable [βˆ€ {X Y Z : A} (f : X ⟢ Z) (g : Y ⟢ Z), PreservesLimit (cospan f g) L] variable [βˆ€ {X Y Z : A} (f : X ⟢ Y) (g : X ⟢ Z), PreservesColimit (span f g) L] @[simps!] def iso {X Y : A} (f : X ⟢ Y) : image (L.map f) β‰… L.obj (image f) := let aux1 : StrongEpiMonoFactorisation (L.map f) := { I := L.obj (Limits.image f) m := L.map <| Limits.image.ΞΉ _ m_mono := preserves_mono_of_preservesLimit _ _ e := L.map <| factorThruImage _ e_strong_epi := @strongEpi_of_epi B _ _ _ _ _ (preserves_epi_of_preservesColimit L _) fac := by rw [← L.map_comp, Limits.image.fac] } IsImage.isoExt (Image.isImage (L.map f)) aux1.toMonoIsImage #align category_theory.preserves_image.iso CategoryTheory.PreservesImage.iso @[reassoc] theorem factorThruImage_comp_hom {X Y : A} (f : X ⟢ Y) : factorThruImage (L.map f) ≫ (iso L f).hom = L.map (factorThruImage f) := by simp #align category_theory.preserves_image.factor_thru_image_comp_hom CategoryTheory.PreservesImage.factorThruImage_comp_hom @[reassoc]
Mathlib/CategoryTheory/Limits/Preserves/Shapes/Images.lean
57
58
theorem hom_comp_map_image_ΞΉ {X Y : A} (f : X ⟢ Y) : (iso L f).hom ≫ L.map (image.ΞΉ f) = image.ΞΉ (L.map f) := by
rw [iso_hom, image.lift_fac]
1
2.718282
0
0
3
190
import Mathlib.CategoryTheory.Limits.Shapes.Images import Mathlib.CategoryTheory.Limits.Constructions.EpiMono #align_import category_theory.limits.preserves.shapes.images from "leanprover-community/mathlib"@"fc78e3c190c72a109699385da6be2725e88df841" noncomputable section namespace CategoryTheory namespace PreservesImage open CategoryTheory open CategoryTheory.Limits universe u₁ uβ‚‚ v₁ vβ‚‚ variable {A : Type u₁} {B : Type uβ‚‚} [Category.{v₁} A] [Category.{vβ‚‚} B] variable [HasEqualizers A] [HasImages A] variable [StrongEpiCategory B] [HasImages B] variable (L : A β₯€ B) variable [βˆ€ {X Y Z : A} (f : X ⟢ Z) (g : Y ⟢ Z), PreservesLimit (cospan f g) L] variable [βˆ€ {X Y Z : A} (f : X ⟢ Y) (g : X ⟢ Z), PreservesColimit (span f g) L] @[simps!] def iso {X Y : A} (f : X ⟢ Y) : image (L.map f) β‰… L.obj (image f) := let aux1 : StrongEpiMonoFactorisation (L.map f) := { I := L.obj (Limits.image f) m := L.map <| Limits.image.ΞΉ _ m_mono := preserves_mono_of_preservesLimit _ _ e := L.map <| factorThruImage _ e_strong_epi := @strongEpi_of_epi B _ _ _ _ _ (preserves_epi_of_preservesColimit L _) fac := by rw [← L.map_comp, Limits.image.fac] } IsImage.isoExt (Image.isImage (L.map f)) aux1.toMonoIsImage #align category_theory.preserves_image.iso CategoryTheory.PreservesImage.iso @[reassoc] theorem factorThruImage_comp_hom {X Y : A} (f : X ⟢ Y) : factorThruImage (L.map f) ≫ (iso L f).hom = L.map (factorThruImage f) := by simp #align category_theory.preserves_image.factor_thru_image_comp_hom CategoryTheory.PreservesImage.factorThruImage_comp_hom @[reassoc] theorem hom_comp_map_image_ΞΉ {X Y : A} (f : X ⟢ Y) : (iso L f).hom ≫ L.map (image.ΞΉ f) = image.ΞΉ (L.map f) := by rw [iso_hom, image.lift_fac] #align category_theory.preserves_image.hom_comp_map_image_ΞΉ CategoryTheory.PreservesImage.hom_comp_map_image_ΞΉ @[reassoc]
Mathlib/CategoryTheory/Limits/Preserves/Shapes/Images.lean
62
63
theorem inv_comp_image_ΞΉ_map {X Y : A} (f : X ⟢ Y) : (iso L f).inv ≫ image.ΞΉ (L.map f) = L.map (image.ΞΉ f) := by
simp
1
2.718282
0
0
3
190
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚
Mathlib/Data/Option/NAry.lean
46
48
theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by
cases a <;> rfl
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp]
Mathlib/Data/Option/NAry.lean
63
63
theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by
cases a <;> rfl
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp] theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by cases a <;> rfl #align option.mapβ‚‚_none_right Option.mapβ‚‚_none_right @[simp] theorem mapβ‚‚_coe_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = b.map fun b => f a b := rfl #align option.mapβ‚‚_coe_left Option.mapβ‚‚_coe_left -- Porting note: This proof was `rfl` in Lean3, but now is not. @[simp]
Mathlib/Data/Option/NAry.lean
73
74
theorem mapβ‚‚_coe_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Ξ²) : mapβ‚‚ f a b = a.map fun a => f a b := by
cases a <;> rfl
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp] theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by cases a <;> rfl #align option.mapβ‚‚_none_right Option.mapβ‚‚_none_right @[simp] theorem mapβ‚‚_coe_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = b.map fun b => f a b := rfl #align option.mapβ‚‚_coe_left Option.mapβ‚‚_coe_left -- Porting note: This proof was `rfl` in Lean3, but now is not. @[simp] theorem mapβ‚‚_coe_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Ξ²) : mapβ‚‚ f a b = a.map fun a => f a b := by cases a <;> rfl #align option.mapβ‚‚_coe_right Option.mapβ‚‚_coe_right -- Porting note: Removed the `@[simp]` tag as membership of an `Option` is no-longer simp-normal.
Mathlib/Data/Option/NAry.lean
78
79
theorem mem_mapβ‚‚_iff {c : Ξ³} : c ∈ mapβ‚‚ f a b ↔ βˆƒ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c := by
simp [mapβ‚‚, bind_eq_some]
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp] theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by cases a <;> rfl #align option.mapβ‚‚_none_right Option.mapβ‚‚_none_right @[simp] theorem mapβ‚‚_coe_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = b.map fun b => f a b := rfl #align option.mapβ‚‚_coe_left Option.mapβ‚‚_coe_left -- Porting note: This proof was `rfl` in Lean3, but now is not. @[simp] theorem mapβ‚‚_coe_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Ξ²) : mapβ‚‚ f a b = a.map fun a => f a b := by cases a <;> rfl #align option.mapβ‚‚_coe_right Option.mapβ‚‚_coe_right -- Porting note: Removed the `@[simp]` tag as membership of an `Option` is no-longer simp-normal. theorem mem_mapβ‚‚_iff {c : Ξ³} : c ∈ mapβ‚‚ f a b ↔ βˆƒ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c := by simp [mapβ‚‚, bind_eq_some] #align option.mem_mapβ‚‚_iff Option.mem_mapβ‚‚_iff @[simp]
Mathlib/Data/Option/NAry.lean
83
84
theorem mapβ‚‚_eq_none_iff : mapβ‚‚ f a b = none ↔ a = none ∨ b = none := by
cases a <;> cases b <;> simp
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp] theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by cases a <;> rfl #align option.mapβ‚‚_none_right Option.mapβ‚‚_none_right @[simp] theorem mapβ‚‚_coe_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = b.map fun b => f a b := rfl #align option.mapβ‚‚_coe_left Option.mapβ‚‚_coe_left -- Porting note: This proof was `rfl` in Lean3, but now is not. @[simp] theorem mapβ‚‚_coe_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Ξ²) : mapβ‚‚ f a b = a.map fun a => f a b := by cases a <;> rfl #align option.mapβ‚‚_coe_right Option.mapβ‚‚_coe_right -- Porting note: Removed the `@[simp]` tag as membership of an `Option` is no-longer simp-normal. theorem mem_mapβ‚‚_iff {c : Ξ³} : c ∈ mapβ‚‚ f a b ↔ βˆƒ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c := by simp [mapβ‚‚, bind_eq_some] #align option.mem_mapβ‚‚_iff Option.mem_mapβ‚‚_iff @[simp] theorem mapβ‚‚_eq_none_iff : mapβ‚‚ f a b = none ↔ a = none ∨ b = none := by cases a <;> cases b <;> simp #align option.mapβ‚‚_eq_none_iff Option.mapβ‚‚_eq_none_iff
Mathlib/Data/Option/NAry.lean
87
88
theorem mapβ‚‚_swap (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = mapβ‚‚ (fun a b => f b a) b a := by
cases a <;> cases b <;> rfl
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp] theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by cases a <;> rfl #align option.mapβ‚‚_none_right Option.mapβ‚‚_none_right @[simp] theorem mapβ‚‚_coe_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = b.map fun b => f a b := rfl #align option.mapβ‚‚_coe_left Option.mapβ‚‚_coe_left -- Porting note: This proof was `rfl` in Lean3, but now is not. @[simp] theorem mapβ‚‚_coe_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Ξ²) : mapβ‚‚ f a b = a.map fun a => f a b := by cases a <;> rfl #align option.mapβ‚‚_coe_right Option.mapβ‚‚_coe_right -- Porting note: Removed the `@[simp]` tag as membership of an `Option` is no-longer simp-normal. theorem mem_mapβ‚‚_iff {c : Ξ³} : c ∈ mapβ‚‚ f a b ↔ βˆƒ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c := by simp [mapβ‚‚, bind_eq_some] #align option.mem_mapβ‚‚_iff Option.mem_mapβ‚‚_iff @[simp] theorem mapβ‚‚_eq_none_iff : mapβ‚‚ f a b = none ↔ a = none ∨ b = none := by cases a <;> cases b <;> simp #align option.mapβ‚‚_eq_none_iff Option.mapβ‚‚_eq_none_iff theorem mapβ‚‚_swap (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = mapβ‚‚ (fun a b => f b a) b a := by cases a <;> cases b <;> rfl #align option.mapβ‚‚_swap Option.mapβ‚‚_swap
Mathlib/Data/Option/NAry.lean
91
92
theorem map_mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (g : Ξ³ β†’ Ξ΄) : (mapβ‚‚ f a b).map g = mapβ‚‚ (fun a b => g (f a b)) a b := by
cases a <;> cases b <;> rfl
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp] theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by cases a <;> rfl #align option.mapβ‚‚_none_right Option.mapβ‚‚_none_right @[simp] theorem mapβ‚‚_coe_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = b.map fun b => f a b := rfl #align option.mapβ‚‚_coe_left Option.mapβ‚‚_coe_left -- Porting note: This proof was `rfl` in Lean3, but now is not. @[simp] theorem mapβ‚‚_coe_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Ξ²) : mapβ‚‚ f a b = a.map fun a => f a b := by cases a <;> rfl #align option.mapβ‚‚_coe_right Option.mapβ‚‚_coe_right -- Porting note: Removed the `@[simp]` tag as membership of an `Option` is no-longer simp-normal. theorem mem_mapβ‚‚_iff {c : Ξ³} : c ∈ mapβ‚‚ f a b ↔ βˆƒ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c := by simp [mapβ‚‚, bind_eq_some] #align option.mem_mapβ‚‚_iff Option.mem_mapβ‚‚_iff @[simp] theorem mapβ‚‚_eq_none_iff : mapβ‚‚ f a b = none ↔ a = none ∨ b = none := by cases a <;> cases b <;> simp #align option.mapβ‚‚_eq_none_iff Option.mapβ‚‚_eq_none_iff theorem mapβ‚‚_swap (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = mapβ‚‚ (fun a b => f b a) b a := by cases a <;> cases b <;> rfl #align option.mapβ‚‚_swap Option.mapβ‚‚_swap theorem map_mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (g : Ξ³ β†’ Ξ΄) : (mapβ‚‚ f a b).map g = mapβ‚‚ (fun a b => g (f a b)) a b := by cases a <;> cases b <;> rfl #align option.map_mapβ‚‚ Option.map_mapβ‚‚
Mathlib/Data/Option/NAry.lean
95
96
theorem mapβ‚‚_map_left (f : Ξ³ β†’ Ξ² β†’ Ξ΄) (g : Ξ± β†’ Ξ³) : mapβ‚‚ f (a.map g) b = mapβ‚‚ (fun a b => f (g a) b) a b := by
cases a <;> rfl
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp] theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by cases a <;> rfl #align option.mapβ‚‚_none_right Option.mapβ‚‚_none_right @[simp] theorem mapβ‚‚_coe_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = b.map fun b => f a b := rfl #align option.mapβ‚‚_coe_left Option.mapβ‚‚_coe_left -- Porting note: This proof was `rfl` in Lean3, but now is not. @[simp] theorem mapβ‚‚_coe_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Ξ²) : mapβ‚‚ f a b = a.map fun a => f a b := by cases a <;> rfl #align option.mapβ‚‚_coe_right Option.mapβ‚‚_coe_right -- Porting note: Removed the `@[simp]` tag as membership of an `Option` is no-longer simp-normal. theorem mem_mapβ‚‚_iff {c : Ξ³} : c ∈ mapβ‚‚ f a b ↔ βˆƒ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c := by simp [mapβ‚‚, bind_eq_some] #align option.mem_mapβ‚‚_iff Option.mem_mapβ‚‚_iff @[simp] theorem mapβ‚‚_eq_none_iff : mapβ‚‚ f a b = none ↔ a = none ∨ b = none := by cases a <;> cases b <;> simp #align option.mapβ‚‚_eq_none_iff Option.mapβ‚‚_eq_none_iff theorem mapβ‚‚_swap (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = mapβ‚‚ (fun a b => f b a) b a := by cases a <;> cases b <;> rfl #align option.mapβ‚‚_swap Option.mapβ‚‚_swap theorem map_mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (g : Ξ³ β†’ Ξ΄) : (mapβ‚‚ f a b).map g = mapβ‚‚ (fun a b => g (f a b)) a b := by cases a <;> cases b <;> rfl #align option.map_mapβ‚‚ Option.map_mapβ‚‚ theorem mapβ‚‚_map_left (f : Ξ³ β†’ Ξ² β†’ Ξ΄) (g : Ξ± β†’ Ξ³) : mapβ‚‚ f (a.map g) b = mapβ‚‚ (fun a b => f (g a) b) a b := by cases a <;> rfl #align option.mapβ‚‚_map_left Option.mapβ‚‚_map_left
Mathlib/Data/Option/NAry.lean
99
100
theorem mapβ‚‚_map_right (f : Ξ± β†’ Ξ³ β†’ Ξ΄) (g : Ξ² β†’ Ξ³) : mapβ‚‚ f a (b.map g) = mapβ‚‚ (fun a b => f a (g b)) a b := by
cases b <;> rfl
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp] theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by cases a <;> rfl #align option.mapβ‚‚_none_right Option.mapβ‚‚_none_right @[simp] theorem mapβ‚‚_coe_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = b.map fun b => f a b := rfl #align option.mapβ‚‚_coe_left Option.mapβ‚‚_coe_left -- Porting note: This proof was `rfl` in Lean3, but now is not. @[simp] theorem mapβ‚‚_coe_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Ξ²) : mapβ‚‚ f a b = a.map fun a => f a b := by cases a <;> rfl #align option.mapβ‚‚_coe_right Option.mapβ‚‚_coe_right -- Porting note: Removed the `@[simp]` tag as membership of an `Option` is no-longer simp-normal. theorem mem_mapβ‚‚_iff {c : Ξ³} : c ∈ mapβ‚‚ f a b ↔ βˆƒ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c := by simp [mapβ‚‚, bind_eq_some] #align option.mem_mapβ‚‚_iff Option.mem_mapβ‚‚_iff @[simp] theorem mapβ‚‚_eq_none_iff : mapβ‚‚ f a b = none ↔ a = none ∨ b = none := by cases a <;> cases b <;> simp #align option.mapβ‚‚_eq_none_iff Option.mapβ‚‚_eq_none_iff theorem mapβ‚‚_swap (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = mapβ‚‚ (fun a b => f b a) b a := by cases a <;> cases b <;> rfl #align option.mapβ‚‚_swap Option.mapβ‚‚_swap theorem map_mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (g : Ξ³ β†’ Ξ΄) : (mapβ‚‚ f a b).map g = mapβ‚‚ (fun a b => g (f a b)) a b := by cases a <;> cases b <;> rfl #align option.map_mapβ‚‚ Option.map_mapβ‚‚ theorem mapβ‚‚_map_left (f : Ξ³ β†’ Ξ² β†’ Ξ΄) (g : Ξ± β†’ Ξ³) : mapβ‚‚ f (a.map g) b = mapβ‚‚ (fun a b => f (g a) b) a b := by cases a <;> rfl #align option.mapβ‚‚_map_left Option.mapβ‚‚_map_left theorem mapβ‚‚_map_right (f : Ξ± β†’ Ξ³ β†’ Ξ΄) (g : Ξ² β†’ Ξ³) : mapβ‚‚ f a (b.map g) = mapβ‚‚ (fun a b => f a (g b)) a b := by cases b <;> rfl #align option.mapβ‚‚_map_right Option.mapβ‚‚_map_right @[simp] theorem mapβ‚‚_curry (f : Ξ± Γ— Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ (curry f) a b = Option.map f (mapβ‚‚ Prod.mk a b) := (map_mapβ‚‚ _ _).symm #align option.mapβ‚‚_curry Option.mapβ‚‚_curry @[simp]
Mathlib/Data/Option/NAry.lean
109
110
theorem map_uncurry (f : Ξ± β†’ Ξ² β†’ Ξ³) (x : Option (Ξ± Γ— Ξ²)) : x.map (uncurry f) = mapβ‚‚ f (x.map Prod.fst) (x.map Prod.snd) := by
cases x <;> rfl
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp] theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by cases a <;> rfl #align option.mapβ‚‚_none_right Option.mapβ‚‚_none_right @[simp] theorem mapβ‚‚_coe_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = b.map fun b => f a b := rfl #align option.mapβ‚‚_coe_left Option.mapβ‚‚_coe_left -- Porting note: This proof was `rfl` in Lean3, but now is not. @[simp] theorem mapβ‚‚_coe_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Ξ²) : mapβ‚‚ f a b = a.map fun a => f a b := by cases a <;> rfl #align option.mapβ‚‚_coe_right Option.mapβ‚‚_coe_right -- Porting note: Removed the `@[simp]` tag as membership of an `Option` is no-longer simp-normal. theorem mem_mapβ‚‚_iff {c : Ξ³} : c ∈ mapβ‚‚ f a b ↔ βˆƒ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c := by simp [mapβ‚‚, bind_eq_some] #align option.mem_mapβ‚‚_iff Option.mem_mapβ‚‚_iff @[simp] theorem mapβ‚‚_eq_none_iff : mapβ‚‚ f a b = none ↔ a = none ∨ b = none := by cases a <;> cases b <;> simp #align option.mapβ‚‚_eq_none_iff Option.mapβ‚‚_eq_none_iff theorem mapβ‚‚_swap (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = mapβ‚‚ (fun a b => f b a) b a := by cases a <;> cases b <;> rfl #align option.mapβ‚‚_swap Option.mapβ‚‚_swap theorem map_mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (g : Ξ³ β†’ Ξ΄) : (mapβ‚‚ f a b).map g = mapβ‚‚ (fun a b => g (f a b)) a b := by cases a <;> cases b <;> rfl #align option.map_mapβ‚‚ Option.map_mapβ‚‚ theorem mapβ‚‚_map_left (f : Ξ³ β†’ Ξ² β†’ Ξ΄) (g : Ξ± β†’ Ξ³) : mapβ‚‚ f (a.map g) b = mapβ‚‚ (fun a b => f (g a) b) a b := by cases a <;> rfl #align option.mapβ‚‚_map_left Option.mapβ‚‚_map_left theorem mapβ‚‚_map_right (f : Ξ± β†’ Ξ³ β†’ Ξ΄) (g : Ξ² β†’ Ξ³) : mapβ‚‚ f a (b.map g) = mapβ‚‚ (fun a b => f a (g b)) a b := by cases b <;> rfl #align option.mapβ‚‚_map_right Option.mapβ‚‚_map_right @[simp] theorem mapβ‚‚_curry (f : Ξ± Γ— Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ (curry f) a b = Option.map f (mapβ‚‚ Prod.mk a b) := (map_mapβ‚‚ _ _).symm #align option.mapβ‚‚_curry Option.mapβ‚‚_curry @[simp] theorem map_uncurry (f : Ξ± β†’ Ξ² β†’ Ξ³) (x : Option (Ξ± Γ— Ξ²)) : x.map (uncurry f) = mapβ‚‚ f (x.map Prod.fst) (x.map Prod.snd) := by cases x <;> rfl #align option.map_uncurry Option.map_uncurry variable {Ξ±' Ξ²' Ξ΄' Ξ΅ Ξ΅' : Type*}
Mathlib/Data/Option/NAry.lean
124
127
theorem mapβ‚‚_assoc {f : Ξ΄ β†’ Ξ³ β†’ Ξ΅} {g : Ξ± β†’ Ξ² β†’ Ξ΄} {f' : Ξ± β†’ Ξ΅' β†’ Ξ΅} {g' : Ξ² β†’ Ξ³ β†’ Ξ΅'} (h_assoc : βˆ€ a b c, f (g a b) c = f' a (g' b c)) : mapβ‚‚ f (mapβ‚‚ g a b) c = mapβ‚‚ f' a (mapβ‚‚ g' b c) := by
cases a <;> cases b <;> cases c <;> simp [h_assoc]
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp] theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by cases a <;> rfl #align option.mapβ‚‚_none_right Option.mapβ‚‚_none_right @[simp] theorem mapβ‚‚_coe_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = b.map fun b => f a b := rfl #align option.mapβ‚‚_coe_left Option.mapβ‚‚_coe_left -- Porting note: This proof was `rfl` in Lean3, but now is not. @[simp] theorem mapβ‚‚_coe_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Ξ²) : mapβ‚‚ f a b = a.map fun a => f a b := by cases a <;> rfl #align option.mapβ‚‚_coe_right Option.mapβ‚‚_coe_right -- Porting note: Removed the `@[simp]` tag as membership of an `Option` is no-longer simp-normal. theorem mem_mapβ‚‚_iff {c : Ξ³} : c ∈ mapβ‚‚ f a b ↔ βˆƒ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c := by simp [mapβ‚‚, bind_eq_some] #align option.mem_mapβ‚‚_iff Option.mem_mapβ‚‚_iff @[simp] theorem mapβ‚‚_eq_none_iff : mapβ‚‚ f a b = none ↔ a = none ∨ b = none := by cases a <;> cases b <;> simp #align option.mapβ‚‚_eq_none_iff Option.mapβ‚‚_eq_none_iff theorem mapβ‚‚_swap (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = mapβ‚‚ (fun a b => f b a) b a := by cases a <;> cases b <;> rfl #align option.mapβ‚‚_swap Option.mapβ‚‚_swap theorem map_mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (g : Ξ³ β†’ Ξ΄) : (mapβ‚‚ f a b).map g = mapβ‚‚ (fun a b => g (f a b)) a b := by cases a <;> cases b <;> rfl #align option.map_mapβ‚‚ Option.map_mapβ‚‚ theorem mapβ‚‚_map_left (f : Ξ³ β†’ Ξ² β†’ Ξ΄) (g : Ξ± β†’ Ξ³) : mapβ‚‚ f (a.map g) b = mapβ‚‚ (fun a b => f (g a) b) a b := by cases a <;> rfl #align option.mapβ‚‚_map_left Option.mapβ‚‚_map_left theorem mapβ‚‚_map_right (f : Ξ± β†’ Ξ³ β†’ Ξ΄) (g : Ξ² β†’ Ξ³) : mapβ‚‚ f a (b.map g) = mapβ‚‚ (fun a b => f a (g b)) a b := by cases b <;> rfl #align option.mapβ‚‚_map_right Option.mapβ‚‚_map_right @[simp] theorem mapβ‚‚_curry (f : Ξ± Γ— Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ (curry f) a b = Option.map f (mapβ‚‚ Prod.mk a b) := (map_mapβ‚‚ _ _).symm #align option.mapβ‚‚_curry Option.mapβ‚‚_curry @[simp] theorem map_uncurry (f : Ξ± β†’ Ξ² β†’ Ξ³) (x : Option (Ξ± Γ— Ξ²)) : x.map (uncurry f) = mapβ‚‚ f (x.map Prod.fst) (x.map Prod.snd) := by cases x <;> rfl #align option.map_uncurry Option.map_uncurry variable {Ξ±' Ξ²' Ξ΄' Ξ΅ Ξ΅' : Type*} theorem mapβ‚‚_assoc {f : Ξ΄ β†’ Ξ³ β†’ Ξ΅} {g : Ξ± β†’ Ξ² β†’ Ξ΄} {f' : Ξ± β†’ Ξ΅' β†’ Ξ΅} {g' : Ξ² β†’ Ξ³ β†’ Ξ΅'} (h_assoc : βˆ€ a b c, f (g a b) c = f' a (g' b c)) : mapβ‚‚ f (mapβ‚‚ g a b) c = mapβ‚‚ f' a (mapβ‚‚ g' b c) := by cases a <;> cases b <;> cases c <;> simp [h_assoc] #align option.mapβ‚‚_assoc Option.mapβ‚‚_assoc
Mathlib/Data/Option/NAry.lean
130
131
theorem mapβ‚‚_comm {g : Ξ² β†’ Ξ± β†’ Ξ³} (h_comm : βˆ€ a b, f a b = g b a) : mapβ‚‚ f a b = mapβ‚‚ g b a := by
cases a <;> cases b <;> simp [h_comm]
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp] theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by cases a <;> rfl #align option.mapβ‚‚_none_right Option.mapβ‚‚_none_right @[simp] theorem mapβ‚‚_coe_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = b.map fun b => f a b := rfl #align option.mapβ‚‚_coe_left Option.mapβ‚‚_coe_left -- Porting note: This proof was `rfl` in Lean3, but now is not. @[simp] theorem mapβ‚‚_coe_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Ξ²) : mapβ‚‚ f a b = a.map fun a => f a b := by cases a <;> rfl #align option.mapβ‚‚_coe_right Option.mapβ‚‚_coe_right -- Porting note: Removed the `@[simp]` tag as membership of an `Option` is no-longer simp-normal. theorem mem_mapβ‚‚_iff {c : Ξ³} : c ∈ mapβ‚‚ f a b ↔ βˆƒ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c := by simp [mapβ‚‚, bind_eq_some] #align option.mem_mapβ‚‚_iff Option.mem_mapβ‚‚_iff @[simp] theorem mapβ‚‚_eq_none_iff : mapβ‚‚ f a b = none ↔ a = none ∨ b = none := by cases a <;> cases b <;> simp #align option.mapβ‚‚_eq_none_iff Option.mapβ‚‚_eq_none_iff theorem mapβ‚‚_swap (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = mapβ‚‚ (fun a b => f b a) b a := by cases a <;> cases b <;> rfl #align option.mapβ‚‚_swap Option.mapβ‚‚_swap theorem map_mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (g : Ξ³ β†’ Ξ΄) : (mapβ‚‚ f a b).map g = mapβ‚‚ (fun a b => g (f a b)) a b := by cases a <;> cases b <;> rfl #align option.map_mapβ‚‚ Option.map_mapβ‚‚ theorem mapβ‚‚_map_left (f : Ξ³ β†’ Ξ² β†’ Ξ΄) (g : Ξ± β†’ Ξ³) : mapβ‚‚ f (a.map g) b = mapβ‚‚ (fun a b => f (g a) b) a b := by cases a <;> rfl #align option.mapβ‚‚_map_left Option.mapβ‚‚_map_left theorem mapβ‚‚_map_right (f : Ξ± β†’ Ξ³ β†’ Ξ΄) (g : Ξ² β†’ Ξ³) : mapβ‚‚ f a (b.map g) = mapβ‚‚ (fun a b => f a (g b)) a b := by cases b <;> rfl #align option.mapβ‚‚_map_right Option.mapβ‚‚_map_right @[simp] theorem mapβ‚‚_curry (f : Ξ± Γ— Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ (curry f) a b = Option.map f (mapβ‚‚ Prod.mk a b) := (map_mapβ‚‚ _ _).symm #align option.mapβ‚‚_curry Option.mapβ‚‚_curry @[simp] theorem map_uncurry (f : Ξ± β†’ Ξ² β†’ Ξ³) (x : Option (Ξ± Γ— Ξ²)) : x.map (uncurry f) = mapβ‚‚ f (x.map Prod.fst) (x.map Prod.snd) := by cases x <;> rfl #align option.map_uncurry Option.map_uncurry variable {Ξ±' Ξ²' Ξ΄' Ξ΅ Ξ΅' : Type*} theorem mapβ‚‚_assoc {f : Ξ΄ β†’ Ξ³ β†’ Ξ΅} {g : Ξ± β†’ Ξ² β†’ Ξ΄} {f' : Ξ± β†’ Ξ΅' β†’ Ξ΅} {g' : Ξ² β†’ Ξ³ β†’ Ξ΅'} (h_assoc : βˆ€ a b c, f (g a b) c = f' a (g' b c)) : mapβ‚‚ f (mapβ‚‚ g a b) c = mapβ‚‚ f' a (mapβ‚‚ g' b c) := by cases a <;> cases b <;> cases c <;> simp [h_assoc] #align option.mapβ‚‚_assoc Option.mapβ‚‚_assoc theorem mapβ‚‚_comm {g : Ξ² β†’ Ξ± β†’ Ξ³} (h_comm : βˆ€ a b, f a b = g b a) : mapβ‚‚ f a b = mapβ‚‚ g b a := by cases a <;> cases b <;> simp [h_comm] #align option.mapβ‚‚_comm Option.mapβ‚‚_comm
Mathlib/Data/Option/NAry.lean
134
137
theorem mapβ‚‚_left_comm {f : Ξ± β†’ Ξ΄ β†’ Ξ΅} {g : Ξ² β†’ Ξ³ β†’ Ξ΄} {f' : Ξ± β†’ Ξ³ β†’ Ξ΄'} {g' : Ξ² β†’ Ξ΄' β†’ Ξ΅} (h_left_comm : βˆ€ a b c, f a (g b c) = g' b (f' a c)) : mapβ‚‚ f a (mapβ‚‚ g b c) = mapβ‚‚ g' b (mapβ‚‚ f' a c) := by
cases a <;> cases b <;> cases c <;> simp [h_left_comm]
1
2.718282
0
0
14
191
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : Option Ξ³ := a.bind fun a => b.map <| f a #align option.mapβ‚‚ Option.mapβ‚‚ theorem mapβ‚‚_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = f <$> a <*> b := by cases a <;> rfl #align option.mapβ‚‚_def Option.mapβ‚‚_def -- Porting note (#10618): In Lean3, was `@[simp]` but now `simp` can prove it theorem mapβ‚‚_some_some (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f (some a) (some b) = f a b := rfl #align option.mapβ‚‚_some_some Option.mapβ‚‚_some_some theorem mapβ‚‚_coe_coe (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Ξ²) : mapβ‚‚ f a b = f a b := rfl #align option.mapβ‚‚_coe_coe Option.mapβ‚‚_coe_coe @[simp] theorem mapβ‚‚_none_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (b : Option Ξ²) : mapβ‚‚ f none b = none := rfl #align option.mapβ‚‚_none_left Option.mapβ‚‚_none_left @[simp] theorem mapβ‚‚_none_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) : mapβ‚‚ f a none = none := by cases a <;> rfl #align option.mapβ‚‚_none_right Option.mapβ‚‚_none_right @[simp] theorem mapβ‚‚_coe_left (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = b.map fun b => f a b := rfl #align option.mapβ‚‚_coe_left Option.mapβ‚‚_coe_left -- Porting note: This proof was `rfl` in Lean3, but now is not. @[simp] theorem mapβ‚‚_coe_right (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Ξ²) : mapβ‚‚ f a b = a.map fun a => f a b := by cases a <;> rfl #align option.mapβ‚‚_coe_right Option.mapβ‚‚_coe_right -- Porting note: Removed the `@[simp]` tag as membership of an `Option` is no-longer simp-normal. theorem mem_mapβ‚‚_iff {c : Ξ³} : c ∈ mapβ‚‚ f a b ↔ βˆƒ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c := by simp [mapβ‚‚, bind_eq_some] #align option.mem_mapβ‚‚_iff Option.mem_mapβ‚‚_iff @[simp] theorem mapβ‚‚_eq_none_iff : mapβ‚‚ f a b = none ↔ a = none ∨ b = none := by cases a <;> cases b <;> simp #align option.mapβ‚‚_eq_none_iff Option.mapβ‚‚_eq_none_iff theorem mapβ‚‚_swap (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ f a b = mapβ‚‚ (fun a b => f b a) b a := by cases a <;> cases b <;> rfl #align option.mapβ‚‚_swap Option.mapβ‚‚_swap theorem map_mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (g : Ξ³ β†’ Ξ΄) : (mapβ‚‚ f a b).map g = mapβ‚‚ (fun a b => g (f a b)) a b := by cases a <;> cases b <;> rfl #align option.map_mapβ‚‚ Option.map_mapβ‚‚ theorem mapβ‚‚_map_left (f : Ξ³ β†’ Ξ² β†’ Ξ΄) (g : Ξ± β†’ Ξ³) : mapβ‚‚ f (a.map g) b = mapβ‚‚ (fun a b => f (g a) b) a b := by cases a <;> rfl #align option.mapβ‚‚_map_left Option.mapβ‚‚_map_left theorem mapβ‚‚_map_right (f : Ξ± β†’ Ξ³ β†’ Ξ΄) (g : Ξ² β†’ Ξ³) : mapβ‚‚ f a (b.map g) = mapβ‚‚ (fun a b => f a (g b)) a b := by cases b <;> rfl #align option.mapβ‚‚_map_right Option.mapβ‚‚_map_right @[simp] theorem mapβ‚‚_curry (f : Ξ± Γ— Ξ² β†’ Ξ³) (a : Option Ξ±) (b : Option Ξ²) : mapβ‚‚ (curry f) a b = Option.map f (mapβ‚‚ Prod.mk a b) := (map_mapβ‚‚ _ _).symm #align option.mapβ‚‚_curry Option.mapβ‚‚_curry @[simp] theorem map_uncurry (f : Ξ± β†’ Ξ² β†’ Ξ³) (x : Option (Ξ± Γ— Ξ²)) : x.map (uncurry f) = mapβ‚‚ f (x.map Prod.fst) (x.map Prod.snd) := by cases x <;> rfl #align option.map_uncurry Option.map_uncurry variable {Ξ±' Ξ²' Ξ΄' Ξ΅ Ξ΅' : Type*} theorem mapβ‚‚_assoc {f : Ξ΄ β†’ Ξ³ β†’ Ξ΅} {g : Ξ± β†’ Ξ² β†’ Ξ΄} {f' : Ξ± β†’ Ξ΅' β†’ Ξ΅} {g' : Ξ² β†’ Ξ³ β†’ Ξ΅'} (h_assoc : βˆ€ a b c, f (g a b) c = f' a (g' b c)) : mapβ‚‚ f (mapβ‚‚ g a b) c = mapβ‚‚ f' a (mapβ‚‚ g' b c) := by cases a <;> cases b <;> cases c <;> simp [h_assoc] #align option.mapβ‚‚_assoc Option.mapβ‚‚_assoc theorem mapβ‚‚_comm {g : Ξ² β†’ Ξ± β†’ Ξ³} (h_comm : βˆ€ a b, f a b = g b a) : mapβ‚‚ f a b = mapβ‚‚ g b a := by cases a <;> cases b <;> simp [h_comm] #align option.mapβ‚‚_comm Option.mapβ‚‚_comm theorem mapβ‚‚_left_comm {f : Ξ± β†’ Ξ΄ β†’ Ξ΅} {g : Ξ² β†’ Ξ³ β†’ Ξ΄} {f' : Ξ± β†’ Ξ³ β†’ Ξ΄'} {g' : Ξ² β†’ Ξ΄' β†’ Ξ΅} (h_left_comm : βˆ€ a b c, f a (g b c) = g' b (f' a c)) : mapβ‚‚ f a (mapβ‚‚ g b c) = mapβ‚‚ g' b (mapβ‚‚ f' a c) := by cases a <;> cases b <;> cases c <;> simp [h_left_comm] #align option.mapβ‚‚_left_comm Option.mapβ‚‚_left_comm
Mathlib/Data/Option/NAry.lean
140
143
theorem mapβ‚‚_right_comm {f : Ξ΄ β†’ Ξ³ β†’ Ξ΅} {g : Ξ± β†’ Ξ² β†’ Ξ΄} {f' : Ξ± β†’ Ξ³ β†’ Ξ΄'} {g' : Ξ΄' β†’ Ξ² β†’ Ξ΅} (h_right_comm : βˆ€ a b c, f (g a b) c = g' (f' a c) b) : mapβ‚‚ f (mapβ‚‚ g a b) c = mapβ‚‚ g' (mapβ‚‚ f' a c) b := by
cases a <;> cases b <;> cases c <;> simp [h_right_comm]
1
2.718282
0
0
14
191
import Mathlib.Data.Bool.Set import Mathlib.Data.Nat.Set import Mathlib.Data.Set.Prod import Mathlib.Data.ULift import Mathlib.Order.Bounds.Basic import Mathlib.Order.Hom.Set import Mathlib.Order.SetNotation #align_import order.complete_lattice from "leanprover-community/mathlib"@"5709b0d8725255e76f47debca6400c07b5c2d8e6" open Function OrderDual Set variable {Ξ± Ξ² Ξ²β‚‚ Ξ³ : Type*} {ΞΉ ΞΉ' : Sort*} {ΞΊ : ΞΉ β†’ Sort*} {ΞΊ' : ΞΉ' β†’ Sort*} instance OrderDual.supSet (Ξ±) [InfSet Ξ±] : SupSet Ξ±α΅’α΅ˆ := ⟨(sInf : Set Ξ± β†’ Ξ±)⟩ instance OrderDual.infSet (Ξ±) [SupSet Ξ±] : InfSet Ξ±α΅’α΅ˆ := ⟨(sSup : Set Ξ± β†’ Ξ±)⟩ class CompleteSemilatticeSup (Ξ± : Type*) extends PartialOrder Ξ±, SupSet Ξ± where le_sSup : βˆ€ s, βˆ€ a ∈ s, a ≀ sSup s sSup_le : βˆ€ s a, (βˆ€ b ∈ s, b ≀ a) β†’ sSup s ≀ a #align complete_semilattice_Sup CompleteSemilatticeSup section variable [CompleteSemilatticeSup Ξ±] {s t : Set Ξ±} {a b : Ξ±} theorem le_sSup : a ∈ s β†’ a ≀ sSup s := CompleteSemilatticeSup.le_sSup s a #align le_Sup le_sSup theorem sSup_le : (βˆ€ b ∈ s, b ≀ a) β†’ sSup s ≀ a := CompleteSemilatticeSup.sSup_le s a #align Sup_le sSup_le theorem isLUB_sSup (s : Set Ξ±) : IsLUB s (sSup s) := ⟨fun _ ↦ le_sSup, fun _ ↦ sSup_le⟩ #align is_lub_Sup isLUB_sSup lemma isLUB_iff_sSup_eq : IsLUB s a ↔ sSup s = a := ⟨(isLUB_sSup s).unique, by rintro rfl; exact isLUB_sSup _⟩ alias ⟨IsLUB.sSup_eq, _⟩ := isLUB_iff_sSup_eq #align is_lub.Sup_eq IsLUB.sSup_eq theorem le_sSup_of_le (hb : b ∈ s) (h : a ≀ b) : a ≀ sSup s := le_trans h (le_sSup hb) #align le_Sup_of_le le_sSup_of_le @[gcongr] theorem sSup_le_sSup (h : s βŠ† t) : sSup s ≀ sSup t := (isLUB_sSup s).mono (isLUB_sSup t) h #align Sup_le_Sup sSup_le_sSup @[simp] theorem sSup_le_iff : sSup s ≀ a ↔ βˆ€ b ∈ s, b ≀ a := isLUB_le_iff (isLUB_sSup s) #align Sup_le_iff sSup_le_iff theorem le_sSup_iff : a ≀ sSup s ↔ βˆ€ b ∈ upperBounds s, a ≀ b := ⟨fun h _ hb => le_trans h (sSup_le hb), fun hb => hb _ fun _ => le_sSup⟩ #align le_Sup_iff le_sSup_iff
Mathlib/Order/CompleteLattice.lean
110
111
theorem le_iSup_iff {s : ΞΉ β†’ Ξ±} : a ≀ iSup s ↔ βˆ€ b, (βˆ€ i, s i ≀ b) β†’ a ≀ b := by
simp [iSup, le_sSup_iff, upperBounds]
1
2.718282
0
0
2
192
import Mathlib.Data.Bool.Set import Mathlib.Data.Nat.Set import Mathlib.Data.Set.Prod import Mathlib.Data.ULift import Mathlib.Order.Bounds.Basic import Mathlib.Order.Hom.Set import Mathlib.Order.SetNotation #align_import order.complete_lattice from "leanprover-community/mathlib"@"5709b0d8725255e76f47debca6400c07b5c2d8e6" open Function OrderDual Set variable {Ξ± Ξ² Ξ²β‚‚ Ξ³ : Type*} {ΞΉ ΞΉ' : Sort*} {ΞΊ : ΞΉ β†’ Sort*} {ΞΊ' : ΞΉ' β†’ Sort*} instance OrderDual.supSet (Ξ±) [InfSet Ξ±] : SupSet Ξ±α΅’α΅ˆ := ⟨(sInf : Set Ξ± β†’ Ξ±)⟩ instance OrderDual.infSet (Ξ±) [SupSet Ξ±] : InfSet Ξ±α΅’α΅ˆ := ⟨(sSup : Set Ξ± β†’ Ξ±)⟩ class CompleteSemilatticeSup (Ξ± : Type*) extends PartialOrder Ξ±, SupSet Ξ± where le_sSup : βˆ€ s, βˆ€ a ∈ s, a ≀ sSup s sSup_le : βˆ€ s a, (βˆ€ b ∈ s, b ≀ a) β†’ sSup s ≀ a #align complete_semilattice_Sup CompleteSemilatticeSup section variable [CompleteSemilatticeSup Ξ±] {s t : Set Ξ±} {a b : Ξ±} theorem le_sSup : a ∈ s β†’ a ≀ sSup s := CompleteSemilatticeSup.le_sSup s a #align le_Sup le_sSup theorem sSup_le : (βˆ€ b ∈ s, b ≀ a) β†’ sSup s ≀ a := CompleteSemilatticeSup.sSup_le s a #align Sup_le sSup_le theorem isLUB_sSup (s : Set Ξ±) : IsLUB s (sSup s) := ⟨fun _ ↦ le_sSup, fun _ ↦ sSup_le⟩ #align is_lub_Sup isLUB_sSup lemma isLUB_iff_sSup_eq : IsLUB s a ↔ sSup s = a := ⟨(isLUB_sSup s).unique, by rintro rfl; exact isLUB_sSup _⟩ alias ⟨IsLUB.sSup_eq, _⟩ := isLUB_iff_sSup_eq #align is_lub.Sup_eq IsLUB.sSup_eq theorem le_sSup_of_le (hb : b ∈ s) (h : a ≀ b) : a ≀ sSup s := le_trans h (le_sSup hb) #align le_Sup_of_le le_sSup_of_le @[gcongr] theorem sSup_le_sSup (h : s βŠ† t) : sSup s ≀ sSup t := (isLUB_sSup s).mono (isLUB_sSup t) h #align Sup_le_Sup sSup_le_sSup @[simp] theorem sSup_le_iff : sSup s ≀ a ↔ βˆ€ b ∈ s, b ≀ a := isLUB_le_iff (isLUB_sSup s) #align Sup_le_iff sSup_le_iff theorem le_sSup_iff : a ≀ sSup s ↔ βˆ€ b ∈ upperBounds s, a ≀ b := ⟨fun h _ hb => le_trans h (sSup_le hb), fun hb => hb _ fun _ => le_sSup⟩ #align le_Sup_iff le_sSup_iff theorem le_iSup_iff {s : ΞΉ β†’ Ξ±} : a ≀ iSup s ↔ βˆ€ b, (βˆ€ i, s i ≀ b) β†’ a ≀ b := by simp [iSup, le_sSup_iff, upperBounds] #align le_supr_iff le_iSup_iff theorem sSup_le_sSup_of_forall_exists_le (h : βˆ€ x ∈ s, βˆƒ y ∈ t, x ≀ y) : sSup s ≀ sSup t := le_sSup_iff.2 fun _ hb => sSup_le fun a ha => let ⟨_, hct, hac⟩ := h a ha hac.trans (hb hct) #align Sup_le_Sup_of_forall_exists_le sSup_le_sSup_of_forall_exists_le -- We will generalize this to conditionally complete lattices in `csSup_singleton`. theorem sSup_singleton {a : Ξ±} : sSup {a} = a := isLUB_singleton.sSup_eq #align Sup_singleton sSup_singleton end class CompleteSemilatticeInf (Ξ± : Type*) extends PartialOrder Ξ±, InfSet Ξ± where sInf_le : βˆ€ s, βˆ€ a ∈ s, sInf s ≀ a le_sInf : βˆ€ s a, (βˆ€ b ∈ s, a ≀ b) β†’ a ≀ sInf s #align complete_semilattice_Inf CompleteSemilatticeInf section variable [CompleteSemilatticeInf Ξ±] {s t : Set Ξ±} {a b : Ξ±} theorem sInf_le : a ∈ s β†’ sInf s ≀ a := CompleteSemilatticeInf.sInf_le s a #align Inf_le sInf_le theorem le_sInf : (βˆ€ b ∈ s, a ≀ b) β†’ a ≀ sInf s := CompleteSemilatticeInf.le_sInf s a #align le_Inf le_sInf theorem isGLB_sInf (s : Set Ξ±) : IsGLB s (sInf s) := ⟨fun _ => sInf_le, fun _ => le_sInf⟩ #align is_glb_Inf isGLB_sInf lemma isGLB_iff_sInf_eq : IsGLB s a ↔ sInf s = a := ⟨(isGLB_sInf s).unique, by rintro rfl; exact isGLB_sInf _⟩ alias ⟨IsGLB.sInf_eq, _⟩ := isGLB_iff_sInf_eq #align is_glb.Inf_eq IsGLB.sInf_eq theorem sInf_le_of_le (hb : b ∈ s) (h : b ≀ a) : sInf s ≀ a := le_trans (sInf_le hb) h #align Inf_le_of_le sInf_le_of_le @[gcongr] theorem sInf_le_sInf (h : s βŠ† t) : sInf t ≀ sInf s := (isGLB_sInf s).mono (isGLB_sInf t) h #align Inf_le_Inf sInf_le_sInf @[simp] theorem le_sInf_iff : a ≀ sInf s ↔ βˆ€ b ∈ s, a ≀ b := le_isGLB_iff (isGLB_sInf s) #align le_Inf_iff le_sInf_iff theorem sInf_le_iff : sInf s ≀ a ↔ βˆ€ b ∈ lowerBounds s, b ≀ a := ⟨fun h _ hb => le_trans (le_sInf hb) h, fun hb => hb _ fun _ => sInf_le⟩ #align Inf_le_iff sInf_le_iff
Mathlib/Order/CompleteLattice.lean
180
181
theorem iInf_le_iff {s : ΞΉ β†’ Ξ±} : iInf s ≀ a ↔ βˆ€ b, (βˆ€ i, b ≀ s i) β†’ b ≀ a := by
simp [iInf, sInf_le_iff, lowerBounds]
1
2.718282
0
0
2
192
import Mathlib.GroupTheory.Subgroup.Center import Mathlib.GroupTheory.Submonoid.Centralizer #align_import group_theory.subgroup.basic from "leanprover-community/mathlib"@"4be589053caf347b899a494da75410deb55fb3ef" open Function open Int variable {G : Type*} [Group G] namespace Subgroup variable {H K : Subgroup G} @[to_additive "The `centralizer` of `H` is the additive subgroup of `g : G` commuting with every `h : H`."] def centralizer (s : Set G) : Subgroup G := { Submonoid.centralizer s with carrier := Set.centralizer s inv_mem' := Set.inv_mem_centralizer } #align subgroup.centralizer Subgroup.centralizer #align add_subgroup.centralizer AddSubgroup.centralizer @[to_additive] theorem mem_centralizer_iff {g : G} {s : Set G} : g ∈ centralizer s ↔ βˆ€ h ∈ s, h * g = g * h := Iff.rfl #align subgroup.mem_centralizer_iff Subgroup.mem_centralizer_iff #align add_subgroup.mem_centralizer_iff AddSubgroup.mem_centralizer_iff @[to_additive]
Mathlib/GroupTheory/Subgroup/Centralizer.lean
42
44
theorem mem_centralizer_iff_commutator_eq_one {g : G} {s : Set G} : g ∈ centralizer s ↔ βˆ€ h ∈ s, h * g * h⁻¹ * g⁻¹ = 1 := by
simp only [mem_centralizer_iff, mul_inv_eq_iff_eq_mul, one_mul]
1
2.718282
0
0
1
193
import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.GroupTheory.Exponent import Mathlib.GroupTheory.OrderOfElement import Mathlib.GroupTheory.PGroup import Mathlib.GroupTheory.QuotientGroup #align_import group_theory.torsion from "leanprover-community/mathlib"@"1f4705ccdfe1e557fc54a0ce081a05e33d2e6240" variable {G H : Type*} namespace Monoid variable (G) [Monoid G] @[to_additive "A predicate on an additive monoid saying that all elements are of finite order."] def IsTorsion := βˆ€ g : G, IsOfFinOrder g #align monoid.is_torsion Monoid.IsTorsion #align add_monoid.is_torsion AddMonoid.IsTorsion @[to_additive (attr := simp) "An additive monoid is not a torsion monoid if it has an element of infinite order."]
Mathlib/GroupTheory/Torsion.lean
63
64
theorem not_isTorsion_iff : Β¬IsTorsion G ↔ βˆƒ g : G, Β¬IsOfFinOrder g := by
rw [IsTorsion, not_forall]
1
2.718282
0
0
1
194
import Mathlib.CategoryTheory.NatIso import Mathlib.CategoryTheory.EqToHom #align_import category_theory.quotient from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da" def HomRel (C) [Quiver C] := βˆ€ ⦃X Y : C⦄, (X ⟢ Y) β†’ (X ⟢ Y) β†’ Prop #align hom_rel HomRel -- Porting Note: `deriving Inhabited` was not able to deduce this typeclass instance (C) [Quiver C] : Inhabited (HomRel C) where default := fun _ _ _ _ ↦ PUnit namespace CategoryTheory variable {C : Type _} [Category C] (r : HomRel C) class Congruence : Prop where equivalence : βˆ€ {X Y}, _root_.Equivalence (@r X Y) compLeft : βˆ€ {X Y Z} (f : X ⟢ Y) {g g' : Y ⟢ Z}, r g g' β†’ r (f ≫ g) (f ≫ g') compRight : βˆ€ {X Y Z} {f f' : X ⟢ Y} (g : Y ⟢ Z), r f f' β†’ r (f ≫ g) (f' ≫ g) #align category_theory.congruence CategoryTheory.Congruence @[ext] structure Quotient (r : HomRel C) where as : C #align category_theory.quotient CategoryTheory.Quotient instance [Inhabited C] : Inhabited (Quotient r) := ⟨{ as := default }⟩ namespace Quotient inductive CompClosure (r : HomRel C) ⦃s t : C⦄ : (s ⟢ t) β†’ (s ⟢ t) β†’ Prop | intro {a b : C} (f : s ⟢ a) (m₁ mβ‚‚ : a ⟢ b) (g : b ⟢ t) (h : r m₁ mβ‚‚) : CompClosure r (f ≫ m₁ ≫ g) (f ≫ mβ‚‚ ≫ g) #align category_theory.quotient.comp_closure CategoryTheory.Quotient.CompClosure
Mathlib/CategoryTheory/Quotient.lean
65
66
theorem CompClosure.of {a b : C} (m₁ mβ‚‚ : a ⟢ b) (h : r m₁ mβ‚‚) : CompClosure r m₁ mβ‚‚ := by
simpa using CompClosure.intro (πŸ™ _) m₁ mβ‚‚ (πŸ™ _) h
1
2.718282
0
0
1
195
import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Data.Rat.Cast.Defs #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441" variable {F ΞΉ Ξ± Ξ² : Type*} namespace Rat open Rat section WithDivRing variable [DivisionRing Ξ±] @[simp, norm_cast] theorem cast_inj [CharZero Ξ±] : βˆ€ {m n : β„š}, (m : Ξ±) = n ↔ m = n | ⟨n₁, d₁, d₁0, cβ‚βŸ©, ⟨nβ‚‚, dβ‚‚, dβ‚‚0, cβ‚‚βŸ© => by refine ⟨fun h => ?_, congr_arg _⟩ have d₁a : (d₁ : Ξ±) β‰  0 := Nat.cast_ne_zero.2 d₁0 have dβ‚‚a : (dβ‚‚ : Ξ±) β‰  0 := Nat.cast_ne_zero.2 dβ‚‚0 rw [mk'_eq_divInt, mk'_eq_divInt] at h ⊒ rw [cast_divInt_of_ne_zero, cast_divInt_of_ne_zero] at h <;> simp [d₁0, dβ‚‚0] at h ⊒ rwa [eq_div_iff_mul_eq dβ‚‚a, division_def, mul_assoc, (d₁.cast_commute (dβ‚‚ : Ξ±)).inv_leftβ‚€.eq, ← mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_natCast d₁, ← Int.cast_mul, ← Int.cast_natCast dβ‚‚, ← Int.cast_mul, Int.cast_inj, ← mkRat_eq_iff d₁0 dβ‚‚0] at h #align rat.cast_inj Rat.cast_inj theorem cast_injective [CharZero Ξ±] : Function.Injective ((↑) : β„š β†’ Ξ±) | _, _ => cast_inj.1 #align rat.cast_injective Rat.cast_injective @[simp]
Mathlib/Data/Rat/Cast/CharZero.lean
46
46
theorem cast_eq_zero [CharZero Ξ±] {n : β„š} : (n : Ξ±) = 0 ↔ n = 0 := by
rw [← cast_zero, cast_inj]
1
2.718282
0
0
3
196
import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Data.Rat.Cast.Defs #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441" variable {F ΞΉ Ξ± Ξ² : Type*} namespace Rat open Rat section WithDivRing variable [DivisionRing Ξ±] @[simp, norm_cast] theorem cast_inj [CharZero Ξ±] : βˆ€ {m n : β„š}, (m : Ξ±) = n ↔ m = n | ⟨n₁, d₁, d₁0, cβ‚βŸ©, ⟨nβ‚‚, dβ‚‚, dβ‚‚0, cβ‚‚βŸ© => by refine ⟨fun h => ?_, congr_arg _⟩ have d₁a : (d₁ : Ξ±) β‰  0 := Nat.cast_ne_zero.2 d₁0 have dβ‚‚a : (dβ‚‚ : Ξ±) β‰  0 := Nat.cast_ne_zero.2 dβ‚‚0 rw [mk'_eq_divInt, mk'_eq_divInt] at h ⊒ rw [cast_divInt_of_ne_zero, cast_divInt_of_ne_zero] at h <;> simp [d₁0, dβ‚‚0] at h ⊒ rwa [eq_div_iff_mul_eq dβ‚‚a, division_def, mul_assoc, (d₁.cast_commute (dβ‚‚ : Ξ±)).inv_leftβ‚€.eq, ← mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_natCast d₁, ← Int.cast_mul, ← Int.cast_natCast dβ‚‚, ← Int.cast_mul, Int.cast_inj, ← mkRat_eq_iff d₁0 dβ‚‚0] at h #align rat.cast_inj Rat.cast_inj theorem cast_injective [CharZero Ξ±] : Function.Injective ((↑) : β„š β†’ Ξ±) | _, _ => cast_inj.1 #align rat.cast_injective Rat.cast_injective @[simp] theorem cast_eq_zero [CharZero Ξ±] {n : β„š} : (n : Ξ±) = 0 ↔ n = 0 := by rw [← cast_zero, cast_inj] #align rat.cast_eq_zero Rat.cast_eq_zero theorem cast_ne_zero [CharZero Ξ±] {n : β„š} : (n : Ξ±) β‰  0 ↔ n β‰  0 := not_congr cast_eq_zero #align rat.cast_ne_zero Rat.cast_ne_zero @[simp, norm_cast] theorem cast_add [CharZero Ξ±] (m n) : ((m + n : β„š) : Ξ±) = m + n := cast_add_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.pos) #align rat.cast_add Rat.cast_add @[simp, norm_cast] theorem cast_sub [CharZero Ξ±] (m n) : ((m - n : β„š) : Ξ±) = m - n := cast_sub_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.pos) #align rat.cast_sub Rat.cast_sub @[simp, norm_cast] theorem cast_mul [CharZero Ξ±] (m n) : ((m * n : β„š) : Ξ±) = m * n := cast_mul_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.pos) #align rat.cast_mul Rat.cast_mul section set_option linter.deprecated false @[simp, norm_cast] theorem cast_bit0 [CharZero Ξ±] (n : β„š) : ((bit0 n : β„š) : Ξ±) = (bit0 n : Ξ±) := cast_add _ _ #align rat.cast_bit0 Rat.cast_bit0 @[simp, norm_cast]
Mathlib/Data/Rat/Cast/CharZero.lean
78
79
theorem cast_bit1 [CharZero Ξ±] (n : β„š) : ((bit1 n : β„š) : Ξ±) = (bit1 n : Ξ±) := by
rw [bit1, cast_add, cast_one, cast_bit0]; rfl
1
2.718282
0
0
3
196
import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Data.Rat.Cast.Defs #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441" variable {F ΞΉ Ξ± Ξ² : Type*} namespace Rat open Rat section WithDivRing variable [DivisionRing Ξ±] @[simp, norm_cast] theorem cast_inj [CharZero Ξ±] : βˆ€ {m n : β„š}, (m : Ξ±) = n ↔ m = n | ⟨n₁, d₁, d₁0, cβ‚βŸ©, ⟨nβ‚‚, dβ‚‚, dβ‚‚0, cβ‚‚βŸ© => by refine ⟨fun h => ?_, congr_arg _⟩ have d₁a : (d₁ : Ξ±) β‰  0 := Nat.cast_ne_zero.2 d₁0 have dβ‚‚a : (dβ‚‚ : Ξ±) β‰  0 := Nat.cast_ne_zero.2 dβ‚‚0 rw [mk'_eq_divInt, mk'_eq_divInt] at h ⊒ rw [cast_divInt_of_ne_zero, cast_divInt_of_ne_zero] at h <;> simp [d₁0, dβ‚‚0] at h ⊒ rwa [eq_div_iff_mul_eq dβ‚‚a, division_def, mul_assoc, (d₁.cast_commute (dβ‚‚ : Ξ±)).inv_leftβ‚€.eq, ← mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_natCast d₁, ← Int.cast_mul, ← Int.cast_natCast dβ‚‚, ← Int.cast_mul, Int.cast_inj, ← mkRat_eq_iff d₁0 dβ‚‚0] at h #align rat.cast_inj Rat.cast_inj theorem cast_injective [CharZero Ξ±] : Function.Injective ((↑) : β„š β†’ Ξ±) | _, _ => cast_inj.1 #align rat.cast_injective Rat.cast_injective @[simp] theorem cast_eq_zero [CharZero Ξ±] {n : β„š} : (n : Ξ±) = 0 ↔ n = 0 := by rw [← cast_zero, cast_inj] #align rat.cast_eq_zero Rat.cast_eq_zero theorem cast_ne_zero [CharZero Ξ±] {n : β„š} : (n : Ξ±) β‰  0 ↔ n β‰  0 := not_congr cast_eq_zero #align rat.cast_ne_zero Rat.cast_ne_zero @[simp, norm_cast] theorem cast_add [CharZero Ξ±] (m n) : ((m + n : β„š) : Ξ±) = m + n := cast_add_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.pos) #align rat.cast_add Rat.cast_add @[simp, norm_cast] theorem cast_sub [CharZero Ξ±] (m n) : ((m - n : β„š) : Ξ±) = m - n := cast_sub_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.pos) #align rat.cast_sub Rat.cast_sub @[simp, norm_cast] theorem cast_mul [CharZero Ξ±] (m n) : ((m * n : β„š) : Ξ±) = m * n := cast_mul_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.pos) #align rat.cast_mul Rat.cast_mul section set_option linter.deprecated false @[simp, norm_cast] theorem cast_bit0 [CharZero Ξ±] (n : β„š) : ((bit0 n : β„š) : Ξ±) = (bit0 n : Ξ±) := cast_add _ _ #align rat.cast_bit0 Rat.cast_bit0 @[simp, norm_cast] theorem cast_bit1 [CharZero Ξ±] (n : β„š) : ((bit1 n : β„š) : Ξ±) = (bit1 n : Ξ±) := by rw [bit1, cast_add, cast_one, cast_bit0]; rfl #align rat.cast_bit1 Rat.cast_bit1 end variable (Ξ±) variable [CharZero Ξ±] def castHom : β„š β†’+* Ξ± where toFun := (↑) map_one' := cast_one map_mul' := cast_mul map_zero' := cast_zero map_add' := cast_add #align rat.cast_hom Rat.castHom variable {Ξ±} @[simp] theorem coe_cast_hom : ⇑(castHom Ξ±) = ((↑) : β„š β†’ Ξ±) := rfl #align rat.coe_cast_hom Rat.coe_cast_hom @[simp, norm_cast] theorem cast_inv (n) : ((n⁻¹ : β„š) : Ξ±) = (n : Ξ±)⁻¹ := map_invβ‚€ (castHom Ξ±) _ #align rat.cast_inv Rat.cast_inv @[simp, norm_cast] theorem cast_div (m n) : ((m / n : β„š) : Ξ±) = m / n := map_divβ‚€ (castHom Ξ±) _ _ #align rat.cast_div Rat.cast_div @[simp, norm_cast] theorem cast_zpow (q : β„š) (n : β„€) : ((q ^ n : β„š) : Ξ±) = (q : Ξ±) ^ n := map_zpowβ‚€ (castHom Ξ±) q n #align rat.cast_zpow Rat.cast_zpow @[norm_cast]
Mathlib/Data/Rat/Cast/CharZero.lean
119
120
theorem cast_mk (a b : β„€) : (a /. b : Ξ±) = a / b := by
simp only [divInt_eq_div, cast_div, cast_intCast]
1
2.718282
0
0
3
196
import Mathlib.Algebra.Polynomial.FieldDivision import Mathlib.Algebra.Polynomial.Lifts import Mathlib.Data.List.Prime #align_import data.polynomial.splits from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" noncomputable section open Polynomial universe u v w variable {R : Type*} {F : Type u} {K : Type v} {L : Type w} namespace Polynomial open Polynomial section Splits section CommRing variable [CommRing K] [Field L] [Field F] variable (i : K β†’+* L) def Splits (f : K[X]) : Prop := f.map i = 0 ∨ βˆ€ {g : L[X]}, Irreducible g β†’ g ∣ f.map i β†’ degree g = 1 #align polynomial.splits Polynomial.Splits @[simp] theorem splits_zero : Splits i (0 : K[X]) := Or.inl (Polynomial.map_zero i) #align polynomial.splits_zero Polynomial.splits_zero theorem splits_of_map_eq_C {f : K[X]} {a : L} (h : f.map i = C a) : Splits i f := letI := Classical.decEq L if ha : a = 0 then Or.inl (h.trans (ha.symm β–Έ C_0)) else Or.inr fun hg ⟨p, hp⟩ => absurd hg.1 <| Classical.not_not.2 <| isUnit_iff_degree_eq_zero.2 <| by have := congr_arg degree hp rw [h, degree_C ha, degree_mul, @eq_comm (WithBot β„•) 0, Nat.WithBot.add_eq_zero_iff] at this exact this.1 set_option linter.uppercaseLean3 false in #align polynomial.splits_of_map_eq_C Polynomial.splits_of_map_eq_C @[simp] theorem splits_C (a : K) : Splits i (C a) := splits_of_map_eq_C i (map_C i) set_option linter.uppercaseLean3 false in #align polynomial.splits_C Polynomial.splits_C theorem splits_of_map_degree_eq_one {f : K[X]} (hf : degree (f.map i) = 1) : Splits i f := Or.inr fun hg ⟨p, hp⟩ => by have := congr_arg degree hp simp [Nat.WithBot.add_eq_one_iff, hf, @eq_comm (WithBot β„•) 1, mt isUnit_iff_degree_eq_zero.2 hg.1] at this tauto #align polynomial.splits_of_map_degree_eq_one Polynomial.splits_of_map_degree_eq_one theorem splits_of_degree_le_one {f : K[X]} (hf : degree f ≀ 1) : Splits i f := if hif : degree (f.map i) ≀ 0 then splits_of_map_eq_C i (degree_le_zero_iff.mp hif) else by push_neg at hif rw [← Order.succ_le_iff, ← WithBot.coe_zero, WithBot.succ_coe, Nat.succ_eq_succ] at hif exact splits_of_map_degree_eq_one i (le_antisymm ((degree_map_le i _).trans hf) hif) #align polynomial.splits_of_degree_le_one Polynomial.splits_of_degree_le_one theorem splits_of_degree_eq_one {f : K[X]} (hf : degree f = 1) : Splits i f := splits_of_degree_le_one i hf.le #align polynomial.splits_of_degree_eq_one Polynomial.splits_of_degree_eq_one theorem splits_of_natDegree_le_one {f : K[X]} (hf : natDegree f ≀ 1) : Splits i f := splits_of_degree_le_one i (degree_le_of_natDegree_le hf) #align polynomial.splits_of_nat_degree_le_one Polynomial.splits_of_natDegree_le_one theorem splits_of_natDegree_eq_one {f : K[X]} (hf : natDegree f = 1) : Splits i f := splits_of_natDegree_le_one i (le_of_eq hf) #align polynomial.splits_of_nat_degree_eq_one Polynomial.splits_of_natDegree_eq_one theorem splits_mul {f g : K[X]} (hf : Splits i f) (hg : Splits i g) : Splits i (f * g) := letI := Classical.decEq L if h : (f * g).map i = 0 then Or.inl h else Or.inr @fun p hp hpf => ((irreducible_iff_prime.1 hp).2.2 _ _ (show p ∣ map i f * map i g by convert hpf; rw [Polynomial.map_mul])).elim (hf.resolve_left (fun hf => by simp [hf] at h) hp) (hg.resolve_left (fun hg => by simp [hg] at h) hp) #align polynomial.splits_mul Polynomial.splits_mul theorem splits_of_splits_mul' {f g : K[X]} (hfg : (f * g).map i β‰  0) (h : Splits i (f * g)) : Splits i f ∧ Splits i g := ⟨Or.inr @fun g hgi hg => Or.resolve_left h hfg hgi (by rw [Polynomial.map_mul]; exact hg.trans (dvd_mul_right _ _)), Or.inr @fun g hgi hg => Or.resolve_left h hfg hgi (by rw [Polynomial.map_mul]; exact hg.trans (dvd_mul_left _ _))⟩ #align polynomial.splits_of_splits_mul' Polynomial.splits_of_splits_mul'
Mathlib/Algebra/Polynomial/Splits.lean
124
125
theorem splits_map_iff (j : L β†’+* F) {f : K[X]} : Splits j (f.map i) ↔ Splits (j.comp i) f := by
simp [Splits, Polynomial.map_map]
1
2.718282
0
0
1
197
import Mathlib.Data.Fin.Fin2 import Mathlib.Data.PFun import Mathlib.Data.Vector3 import Mathlib.NumberTheory.PellMatiyasevic #align_import number_theory.dioph from "leanprover-community/mathlib"@"a66d07e27d5b5b8ac1147cacfe353478e5c14002" open Fin2 Function Nat Sum local infixr:67 " ::β‚’ " => Option.elim' local infixr:65 " βŠ— " => Sum.elim universe u section Polynomials variable {Ξ± Ξ² Ξ³ : Type*} inductive IsPoly : ((Ξ± β†’ β„•) β†’ β„€) β†’ Prop | proj : βˆ€ i, IsPoly fun x : Ξ± β†’ β„• => x i | const : βˆ€ n : β„€, IsPoly fun _ : Ξ± β†’ β„• => n | sub : βˆ€ {f g : (Ξ± β†’ β„•) β†’ β„€}, IsPoly f β†’ IsPoly g β†’ IsPoly fun x => f x - g x | mul : βˆ€ {f g : (Ξ± β†’ β„•) β†’ β„€}, IsPoly f β†’ IsPoly g β†’ IsPoly fun x => f x * g x #align is_poly IsPoly
Mathlib/NumberTheory/Dioph.lean
85
86
theorem IsPoly.neg {f : (Ξ± β†’ β„•) β†’ β„€} : IsPoly f β†’ IsPoly (-f) := by
rw [← zero_sub]; exact (IsPoly.const 0).sub
1
2.718282
0
0
2
198