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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.