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.Init.Function
import Mathlib.Logic.Function.Basic
#align_import data.sigma.basic from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64"
open Function
namespace PSigma
variable {Ξ± : Sort*} {Ξ² : Ξ± β Sort*}
def elim {Ξ³} (f : β a, Ξ² a β Ξ³) (a : PSigma Ξ²) : Ξ³ :=
PSigma.casesOn a f
#align psigma.elim PSigma.elim
@[simp]
theorem elim_val {Ξ³} (f : β a, Ξ² a β Ξ³) (a b) : PSigma.elim f β¨a, bβ© = f a b :=
rfl
#align psigma.elim_val PSigma.elim_val
instance [Inhabited Ξ±] [Inhabited (Ξ² default)] : Inhabited (PSigma Ξ²) :=
β¨β¨default, defaultβ©β©
instance decidableEq [hβ : DecidableEq Ξ±] [hβ : β a, DecidableEq (Ξ² a)] : DecidableEq (PSigma Ξ²)
| β¨aβ, bββ©, β¨aβ, bββ© =>
match aβ, bβ, aβ, bβ, hβ aβ aβ with
| _, bβ, _, bβ, isTrue (Eq.refl _) =>
match bβ, bβ, hβ _ bβ bβ with
| _, _, isTrue (Eq.refl _) => isTrue rfl
| _, _, isFalse n => isFalse fun h β¦ PSigma.noConfusion h fun _ eβ β¦ n <| eq_of_heq eβ
| _, _, _, _, isFalse n => isFalse fun h β¦ PSigma.noConfusion h fun eβ _ β¦ n eβ
-- See https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/porting.20data.2Esigma.2Ebasic/near/304855864
-- for an explanation of why this is currently needed. It generates `PSigma.mk.inj`.
-- This could be done elsewhere.
gen_injective_theorems% PSigma
theorem mk.inj_iff {aβ aβ : Ξ±} {bβ : Ξ² aβ} {bβ : Ξ² aβ} :
@PSigma.mk Ξ± Ξ² aβ bβ = @PSigma.mk Ξ± Ξ² aβ bβ β aβ = aβ β§ HEq bβ bβ :=
(Iff.intro PSigma.mk.inj) fun β¨hβ, hββ© β¦
match aβ, aβ, bβ, bβ, hβ, hβ with
| _, _, _, _, Eq.refl _, HEq.refl _ => rfl
#align psigma.mk.inj_iff PSigma.mk.inj_iff
#align psigma.ext PSigma.ext
| Mathlib/Data/Sigma/Basic.lean | 273 | 274 | theorem ext_iff {xβ xβ : PSigma Ξ²} : xβ = xβ β xβ.1 = xβ.1 β§ HEq xβ.2 xβ.2 := by |
cases xβ; cases xβ; exact PSigma.mk.inj_iff
| 1 | 2.718282 | 0 | 0.5 | 4 | 421 |
import Mathlib.Algebra.Group.Equiv.Basic
import Mathlib.Algebra.Ring.Basic
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Order.Hom.Basic
#align_import algebra.order.sub.basic from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
variable {Ξ± Ξ² : Type*}
section Add
variable [Preorder Ξ±] [Add Ξ±] [Sub Ξ±] [OrderedSub Ξ±] {a b c d : Ξ±}
| Mathlib/Algebra/Order/Sub/Basic.lean | 25 | 28 | theorem AddHom.le_map_tsub [Preorder Ξ²] [Add Ξ²] [Sub Ξ²] [OrderedSub Ξ²] (f : AddHom Ξ± Ξ²)
(hf : Monotone f) (a b : Ξ±) : f a - f b β€ f (a - b) := by |
rw [tsub_le_iff_right, β f.map_add]
exact hf le_tsub_add
| 2 | 7.389056 | 1 | 0.5 | 2 | 422 |
import Mathlib.Algebra.Group.Equiv.Basic
import Mathlib.Algebra.Ring.Basic
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Order.Hom.Basic
#align_import algebra.order.sub.basic from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
variable {Ξ± Ξ² : Type*}
section Add
variable [Preorder Ξ±] [Add Ξ±] [Sub Ξ±] [OrderedSub Ξ±] {a b c d : Ξ±}
theorem AddHom.le_map_tsub [Preorder Ξ²] [Add Ξ²] [Sub Ξ²] [OrderedSub Ξ²] (f : AddHom Ξ± Ξ²)
(hf : Monotone f) (a b : Ξ±) : f a - f b β€ f (a - b) := by
rw [tsub_le_iff_right, β f.map_add]
exact hf le_tsub_add
#align add_hom.le_map_tsub AddHom.le_map_tsub
theorem le_mul_tsub {R : Type*} [Distrib R] [Preorder R] [Sub R] [OrderedSub R]
[CovariantClass R R (Β· * Β·) (Β· β€ Β·)] {a b c : R} : a * b - a * c β€ a * (b - c) :=
(AddHom.mulLeft a).le_map_tsub (monotone_id.const_mul' a) _ _
#align le_mul_tsub le_mul_tsub
| Mathlib/Algebra/Order/Sub/Basic.lean | 36 | 38 | theorem le_tsub_mul {R : Type*} [CommSemiring R] [Preorder R] [Sub R] [OrderedSub R]
[CovariantClass R R (Β· * Β·) (Β· β€ Β·)] {a b c : R} : a * c - b * c β€ (a - b) * c := by |
simpa only [mul_comm _ c] using le_mul_tsub
| 1 | 2.718282 | 0 | 0.5 | 2 | 422 |
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Finset.Card
import Mathlib.Data.List.NodupEquivFin
import Mathlib.Data.Set.Image
#align_import data.fintype.card from "leanprover-community/mathlib"@"bf2428c9486c407ca38b5b3fb10b87dad0bc99fa"
assert_not_exists MonoidWithZero
assert_not_exists MulAction
open Function
open Nat
universe u v
variable {Ξ± Ξ² Ξ³ : Type*}
open Finset Function
namespace Fintype
def card (Ξ±) [Fintype Ξ±] : β :=
(@univ Ξ± _).card
#align fintype.card Fintype.card
def truncEquivFin (Ξ±) [DecidableEq Ξ±] [Fintype Ξ±] : Trunc (Ξ± β Fin (card Ξ±)) := by
unfold card Finset.card
exact
Quot.recOnSubsingleton'
(motive := fun s : Multiset Ξ± =>
(β x : Ξ±, x β s) β s.Nodup β Trunc (Ξ± β Fin (Multiset.card s)))
univ.val
(fun l (h : β x : Ξ±, x β l) (nd : l.Nodup) => Trunc.mk (nd.getEquivOfForallMemList _ h).symm)
mem_univ_val univ.2
#align fintype.trunc_equiv_fin Fintype.truncEquivFin
noncomputable def equivFin (Ξ±) [Fintype Ξ±] : Ξ± β Fin (card Ξ±) :=
letI := Classical.decEq Ξ±
(truncEquivFin Ξ±).out
#align fintype.equiv_fin Fintype.equivFin
def truncFinBijection (Ξ±) [Fintype Ξ±] : Trunc { f : Fin (card Ξ±) β Ξ± // Bijective f } := by
unfold card Finset.card
refine
Quot.recOnSubsingleton'
(motive := fun s : Multiset Ξ± =>
(β x : Ξ±, x β s) β s.Nodup β Trunc {f : Fin (Multiset.card s) β Ξ± // Bijective f})
univ.val
(fun l (h : β x : Ξ±, x β l) (nd : l.Nodup) => Trunc.mk (nd.getBijectionOfForallMemList _ h))
mem_univ_val univ.2
#align fintype.trunc_fin_bijection Fintype.truncFinBijection
theorem subtype_card {p : Ξ± β Prop} (s : Finset Ξ±) (H : β x : Ξ±, x β s β p x) :
@card { x // p x } (Fintype.subtype s H) = s.card :=
Multiset.card_pmap _ _ _
#align fintype.subtype_card Fintype.subtype_card
| Mathlib/Data/Fintype/Card.lean | 126 | 130 | theorem card_of_subtype {p : Ξ± β Prop} (s : Finset Ξ±) (H : β x : Ξ±, x β s β p x)
[Fintype { x // p x }] : card { x // p x } = s.card := by |
rw [β subtype_card s H]
congr
apply Subsingleton.elim
| 3 | 20.085537 | 1 | 0.5 | 2 | 423 |
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Finset.Card
import Mathlib.Data.List.NodupEquivFin
import Mathlib.Data.Set.Image
#align_import data.fintype.card from "leanprover-community/mathlib"@"bf2428c9486c407ca38b5b3fb10b87dad0bc99fa"
assert_not_exists MonoidWithZero
assert_not_exists MulAction
open Function
open Nat
universe u v
variable {Ξ± Ξ² Ξ³ : Type*}
open Finset Function
namespace Fintype
def card (Ξ±) [Fintype Ξ±] : β :=
(@univ Ξ± _).card
#align fintype.card Fintype.card
def truncEquivFin (Ξ±) [DecidableEq Ξ±] [Fintype Ξ±] : Trunc (Ξ± β Fin (card Ξ±)) := by
unfold card Finset.card
exact
Quot.recOnSubsingleton'
(motive := fun s : Multiset Ξ± =>
(β x : Ξ±, x β s) β s.Nodup β Trunc (Ξ± β Fin (Multiset.card s)))
univ.val
(fun l (h : β x : Ξ±, x β l) (nd : l.Nodup) => Trunc.mk (nd.getEquivOfForallMemList _ h).symm)
mem_univ_val univ.2
#align fintype.trunc_equiv_fin Fintype.truncEquivFin
noncomputable def equivFin (Ξ±) [Fintype Ξ±] : Ξ± β Fin (card Ξ±) :=
letI := Classical.decEq Ξ±
(truncEquivFin Ξ±).out
#align fintype.equiv_fin Fintype.equivFin
def truncFinBijection (Ξ±) [Fintype Ξ±] : Trunc { f : Fin (card Ξ±) β Ξ± // Bijective f } := by
unfold card Finset.card
refine
Quot.recOnSubsingleton'
(motive := fun s : Multiset Ξ± =>
(β x : Ξ±, x β s) β s.Nodup β Trunc {f : Fin (Multiset.card s) β Ξ± // Bijective f})
univ.val
(fun l (h : β x : Ξ±, x β l) (nd : l.Nodup) => Trunc.mk (nd.getBijectionOfForallMemList _ h))
mem_univ_val univ.2
#align fintype.trunc_fin_bijection Fintype.truncFinBijection
theorem subtype_card {p : Ξ± β Prop} (s : Finset Ξ±) (H : β x : Ξ±, x β s β p x) :
@card { x // p x } (Fintype.subtype s H) = s.card :=
Multiset.card_pmap _ _ _
#align fintype.subtype_card Fintype.subtype_card
theorem card_of_subtype {p : Ξ± β Prop} (s : Finset Ξ±) (H : β x : Ξ±, x β s β p x)
[Fintype { x // p x }] : card { x // p x } = s.card := by
rw [β subtype_card s H]
congr
apply Subsingleton.elim
#align fintype.card_of_subtype Fintype.card_of_subtype
@[simp]
theorem card_ofFinset {p : Set Ξ±} (s : Finset Ξ±) (H : β x, x β s β x β p) :
@Fintype.card p (ofFinset s H) = s.card :=
Fintype.subtype_card s H
#align fintype.card_of_finset Fintype.card_ofFinset
| Mathlib/Data/Fintype/Card.lean | 139 | 140 | theorem card_of_finset' {p : Set Ξ±} (s : Finset Ξ±) (H : β x, x β s β x β p) [Fintype p] :
Fintype.card p = s.card := by | rw [β card_ofFinset s H]; congr; apply Subsingleton.elim
| 1 | 2.718282 | 0 | 0.5 | 2 | 423 |
import Mathlib.Algebra.Group.Support
import Mathlib.Data.Int.Cast.Field
import Mathlib.Data.Int.Cast.Lemmas
#align_import data.int.char_zero from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
open Nat Set
variable {Ξ± Ξ² : Type*}
namespace Int
@[simp, norm_cast]
| Mathlib/Data/Int/CharZero.lean | 24 | 28 | theorem cast_div_charZero {k : Type*} [DivisionRing k] [CharZero k] {m n : β€} (n_dvd : n β£ m) :
((m / n : β€) : k) = m / n := by |
rcases eq_or_ne n 0 with (rfl | hn)
Β· simp [Int.ediv_zero]
Β· exact cast_div n_dvd (cast_ne_zero.mpr hn)
| 3 | 20.085537 | 1 | 0.5 | 2 | 424 |
import Mathlib.Algebra.Group.Support
import Mathlib.Data.Int.Cast.Field
import Mathlib.Data.Int.Cast.Lemmas
#align_import data.int.char_zero from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
open Nat Set
variable {Ξ± Ξ² : Type*}
namespace Int
@[simp, norm_cast]
theorem cast_div_charZero {k : Type*} [DivisionRing k] [CharZero k] {m n : β€} (n_dvd : n β£ m) :
((m / n : β€) : k) = m / n := by
rcases eq_or_ne n 0 with (rfl | hn)
Β· simp [Int.ediv_zero]
Β· exact cast_div n_dvd (cast_ne_zero.mpr hn)
#align int.cast_div_char_zero Int.cast_div_charZero
-- Necessary for confluence with `ofNat_ediv` and `cast_div_charZero`.
@[simp, norm_cast]
| Mathlib/Data/Int/CharZero.lean | 33 | 35 | theorem cast_div_ofNat_charZero {k : Type*} [DivisionRing k] [CharZero k] {m n : β}
(n_dvd : n β£ m) : (((m : β€) / (n : β€) : β€) : k) = m / n := by |
rw [cast_div_charZero (Int.ofNat_dvd.mpr n_dvd), cast_natCast, cast_natCast]
| 1 | 2.718282 | 0 | 0.5 | 2 | 424 |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Analysis.Normed.Group.AddCircle
import Mathlib.Algebra.CharZero.Quotient
import Mathlib.Topology.Instances.Sign
#align_import analysis.special_functions.trigonometric.angle from "leanprover-community/mathlib"@"213b0cff7bc5ab6696ee07cceec80829ce42efec"
open Real
noncomputable section
namespace Real
-- Porting note: can't derive `NormedAddCommGroup, Inhabited`
def Angle : Type :=
AddCircle (2 * Ο)
#align real.angle Real.Angle
namespace Angle
-- Porting note (#10754): added due to missing instances due to no deriving
instance : NormedAddCommGroup Angle :=
inferInstanceAs (NormedAddCommGroup (AddCircle (2 * Ο)))
-- Porting note (#10754): added due to missing instances due to no deriving
instance : Inhabited Angle :=
inferInstanceAs (Inhabited (AddCircle (2 * Ο)))
-- Porting note (#10754): added due to missing instances due to no deriving
-- also, without this, a plain `QuotientAddGroup.mk`
-- causes coerced terms to be of type `β β§Έ AddSubgroup.zmultiples (2 * Ο)`
@[coe]
protected def coe (r : β) : Angle := QuotientAddGroup.mk r
instance : Coe β Angle := β¨Angle.coeβ©
instance : CircularOrder Real.Angle :=
QuotientAddGroup.circularOrder (hp' := β¨by norm_num [pi_pos]β©)
@[continuity]
theorem continuous_coe : Continuous ((β) : β β Angle) :=
continuous_quotient_mk'
#align real.angle.continuous_coe Real.Angle.continuous_coe
def coeHom : β β+ Angle :=
QuotientAddGroup.mk' _
#align real.angle.coe_hom Real.Angle.coeHom
@[simp]
theorem coe_coeHom : (coeHom : β β Angle) = ((β) : β β Angle) :=
rfl
#align real.angle.coe_coe_hom Real.Angle.coe_coeHom
@[elab_as_elim]
protected theorem induction_on {p : Angle β Prop} (ΞΈ : Angle) (h : β x : β, p x) : p ΞΈ :=
Quotient.inductionOn' ΞΈ h
#align real.angle.induction_on Real.Angle.induction_on
@[simp]
theorem coe_zero : β(0 : β) = (0 : Angle) :=
rfl
#align real.angle.coe_zero Real.Angle.coe_zero
@[simp]
theorem coe_add (x y : β) : β(x + y : β) = (βx + βy : Angle) :=
rfl
#align real.angle.coe_add Real.Angle.coe_add
@[simp]
theorem coe_neg (x : β) : β(-x : β) = -(βx : Angle) :=
rfl
#align real.angle.coe_neg Real.Angle.coe_neg
@[simp]
theorem coe_sub (x y : β) : β(x - y : β) = (βx - βy : Angle) :=
rfl
#align real.angle.coe_sub Real.Angle.coe_sub
theorem coe_nsmul (n : β) (x : β) : β(n β’ x : β) = n β’ (βx : Angle) :=
rfl
#align real.angle.coe_nsmul Real.Angle.coe_nsmul
theorem coe_zsmul (z : β€) (x : β) : β(z β’ x : β) = z β’ (βx : Angle) :=
rfl
#align real.angle.coe_zsmul Real.Angle.coe_zsmul
@[simp, norm_cast]
| Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean | 107 | 108 | theorem natCast_mul_eq_nsmul (x : β) (n : β) : β((n : β) * x) = n β’ (βx : Angle) := by |
simpa only [nsmul_eq_mul] using coeHom.map_nsmul x n
| 1 | 2.718282 | 0 | 0.5 | 6 | 425 |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Analysis.Normed.Group.AddCircle
import Mathlib.Algebra.CharZero.Quotient
import Mathlib.Topology.Instances.Sign
#align_import analysis.special_functions.trigonometric.angle from "leanprover-community/mathlib"@"213b0cff7bc5ab6696ee07cceec80829ce42efec"
open Real
noncomputable section
namespace Real
-- Porting note: can't derive `NormedAddCommGroup, Inhabited`
def Angle : Type :=
AddCircle (2 * Ο)
#align real.angle Real.Angle
namespace Angle
-- Porting note (#10754): added due to missing instances due to no deriving
instance : NormedAddCommGroup Angle :=
inferInstanceAs (NormedAddCommGroup (AddCircle (2 * Ο)))
-- Porting note (#10754): added due to missing instances due to no deriving
instance : Inhabited Angle :=
inferInstanceAs (Inhabited (AddCircle (2 * Ο)))
-- Porting note (#10754): added due to missing instances due to no deriving
-- also, without this, a plain `QuotientAddGroup.mk`
-- causes coerced terms to be of type `β β§Έ AddSubgroup.zmultiples (2 * Ο)`
@[coe]
protected def coe (r : β) : Angle := QuotientAddGroup.mk r
instance : Coe β Angle := β¨Angle.coeβ©
instance : CircularOrder Real.Angle :=
QuotientAddGroup.circularOrder (hp' := β¨by norm_num [pi_pos]β©)
@[continuity]
theorem continuous_coe : Continuous ((β) : β β Angle) :=
continuous_quotient_mk'
#align real.angle.continuous_coe Real.Angle.continuous_coe
def coeHom : β β+ Angle :=
QuotientAddGroup.mk' _
#align real.angle.coe_hom Real.Angle.coeHom
@[simp]
theorem coe_coeHom : (coeHom : β β Angle) = ((β) : β β Angle) :=
rfl
#align real.angle.coe_coe_hom Real.Angle.coe_coeHom
@[elab_as_elim]
protected theorem induction_on {p : Angle β Prop} (ΞΈ : Angle) (h : β x : β, p x) : p ΞΈ :=
Quotient.inductionOn' ΞΈ h
#align real.angle.induction_on Real.Angle.induction_on
@[simp]
theorem coe_zero : β(0 : β) = (0 : Angle) :=
rfl
#align real.angle.coe_zero Real.Angle.coe_zero
@[simp]
theorem coe_add (x y : β) : β(x + y : β) = (βx + βy : Angle) :=
rfl
#align real.angle.coe_add Real.Angle.coe_add
@[simp]
theorem coe_neg (x : β) : β(-x : β) = -(βx : Angle) :=
rfl
#align real.angle.coe_neg Real.Angle.coe_neg
@[simp]
theorem coe_sub (x y : β) : β(x - y : β) = (βx - βy : Angle) :=
rfl
#align real.angle.coe_sub Real.Angle.coe_sub
theorem coe_nsmul (n : β) (x : β) : β(n β’ x : β) = n β’ (βx : Angle) :=
rfl
#align real.angle.coe_nsmul Real.Angle.coe_nsmul
theorem coe_zsmul (z : β€) (x : β) : β(z β’ x : β) = z β’ (βx : Angle) :=
rfl
#align real.angle.coe_zsmul Real.Angle.coe_zsmul
@[simp, norm_cast]
theorem natCast_mul_eq_nsmul (x : β) (n : β) : β((n : β) * x) = n β’ (βx : Angle) := by
simpa only [nsmul_eq_mul] using coeHom.map_nsmul x n
#align real.angle.coe_nat_mul_eq_nsmul Real.Angle.natCast_mul_eq_nsmul
@[simp, norm_cast]
| Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean | 112 | 113 | theorem intCast_mul_eq_zsmul (x : β) (n : β€) : β((n : β) * x : β) = n β’ (βx : Angle) := by |
simpa only [zsmul_eq_mul] using coeHom.map_zsmul x n
| 1 | 2.718282 | 0 | 0.5 | 6 | 425 |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Analysis.Normed.Group.AddCircle
import Mathlib.Algebra.CharZero.Quotient
import Mathlib.Topology.Instances.Sign
#align_import analysis.special_functions.trigonometric.angle from "leanprover-community/mathlib"@"213b0cff7bc5ab6696ee07cceec80829ce42efec"
open Real
noncomputable section
namespace Real
-- Porting note: can't derive `NormedAddCommGroup, Inhabited`
def Angle : Type :=
AddCircle (2 * Ο)
#align real.angle Real.Angle
namespace Angle
-- Porting note (#10754): added due to missing instances due to no deriving
instance : NormedAddCommGroup Angle :=
inferInstanceAs (NormedAddCommGroup (AddCircle (2 * Ο)))
-- Porting note (#10754): added due to missing instances due to no deriving
instance : Inhabited Angle :=
inferInstanceAs (Inhabited (AddCircle (2 * Ο)))
-- Porting note (#10754): added due to missing instances due to no deriving
-- also, without this, a plain `QuotientAddGroup.mk`
-- causes coerced terms to be of type `β β§Έ AddSubgroup.zmultiples (2 * Ο)`
@[coe]
protected def coe (r : β) : Angle := QuotientAddGroup.mk r
instance : Coe β Angle := β¨Angle.coeβ©
instance : CircularOrder Real.Angle :=
QuotientAddGroup.circularOrder (hp' := β¨by norm_num [pi_pos]β©)
@[continuity]
theorem continuous_coe : Continuous ((β) : β β Angle) :=
continuous_quotient_mk'
#align real.angle.continuous_coe Real.Angle.continuous_coe
def coeHom : β β+ Angle :=
QuotientAddGroup.mk' _
#align real.angle.coe_hom Real.Angle.coeHom
@[simp]
theorem coe_coeHom : (coeHom : β β Angle) = ((β) : β β Angle) :=
rfl
#align real.angle.coe_coe_hom Real.Angle.coe_coeHom
@[elab_as_elim]
protected theorem induction_on {p : Angle β Prop} (ΞΈ : Angle) (h : β x : β, p x) : p ΞΈ :=
Quotient.inductionOn' ΞΈ h
#align real.angle.induction_on Real.Angle.induction_on
@[simp]
theorem coe_zero : β(0 : β) = (0 : Angle) :=
rfl
#align real.angle.coe_zero Real.Angle.coe_zero
@[simp]
theorem coe_add (x y : β) : β(x + y : β) = (βx + βy : Angle) :=
rfl
#align real.angle.coe_add Real.Angle.coe_add
@[simp]
theorem coe_neg (x : β) : β(-x : β) = -(βx : Angle) :=
rfl
#align real.angle.coe_neg Real.Angle.coe_neg
@[simp]
theorem coe_sub (x y : β) : β(x - y : β) = (βx - βy : Angle) :=
rfl
#align real.angle.coe_sub Real.Angle.coe_sub
theorem coe_nsmul (n : β) (x : β) : β(n β’ x : β) = n β’ (βx : Angle) :=
rfl
#align real.angle.coe_nsmul Real.Angle.coe_nsmul
theorem coe_zsmul (z : β€) (x : β) : β(z β’ x : β) = z β’ (βx : Angle) :=
rfl
#align real.angle.coe_zsmul Real.Angle.coe_zsmul
@[simp, norm_cast]
theorem natCast_mul_eq_nsmul (x : β) (n : β) : β((n : β) * x) = n β’ (βx : Angle) := by
simpa only [nsmul_eq_mul] using coeHom.map_nsmul x n
#align real.angle.coe_nat_mul_eq_nsmul Real.Angle.natCast_mul_eq_nsmul
@[simp, norm_cast]
theorem intCast_mul_eq_zsmul (x : β) (n : β€) : β((n : β) * x : β) = n β’ (βx : Angle) := by
simpa only [zsmul_eq_mul] using coeHom.map_zsmul x n
#align real.angle.coe_int_mul_eq_zsmul Real.Angle.intCast_mul_eq_zsmul
@[deprecated (since := "2024-05-25")] alias coe_nat_mul_eq_nsmul := natCast_mul_eq_nsmul
@[deprecated (since := "2024-05-25")] alias coe_int_mul_eq_zsmul := intCast_mul_eq_zsmul
| Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean | 119 | 125 | theorem angle_eq_iff_two_pi_dvd_sub {Ο ΞΈ : β} : (ΞΈ : Angle) = Ο β β k : β€, ΞΈ - Ο = 2 * Ο * k := by |
simp only [QuotientAddGroup.eq, AddSubgroup.zmultiples_eq_closure,
AddSubgroup.mem_closure_singleton, zsmul_eq_mul', (sub_eq_neg_add _ _).symm, eq_comm]
-- Porting note: added `rw`, `simp [Angle.coe, QuotientAddGroup.eq]` doesn't fire otherwise
rw [Angle.coe, Angle.coe, QuotientAddGroup.eq]
simp only [AddSubgroup.zmultiples_eq_closure,
AddSubgroup.mem_closure_singleton, zsmul_eq_mul', (sub_eq_neg_add _ _).symm, eq_comm]
| 6 | 403.428793 | 2 | 0.5 | 6 | 425 |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Analysis.Normed.Group.AddCircle
import Mathlib.Algebra.CharZero.Quotient
import Mathlib.Topology.Instances.Sign
#align_import analysis.special_functions.trigonometric.angle from "leanprover-community/mathlib"@"213b0cff7bc5ab6696ee07cceec80829ce42efec"
open Real
noncomputable section
namespace Real
-- Porting note: can't derive `NormedAddCommGroup, Inhabited`
def Angle : Type :=
AddCircle (2 * Ο)
#align real.angle Real.Angle
namespace Angle
-- Porting note (#10754): added due to missing instances due to no deriving
instance : NormedAddCommGroup Angle :=
inferInstanceAs (NormedAddCommGroup (AddCircle (2 * Ο)))
-- Porting note (#10754): added due to missing instances due to no deriving
instance : Inhabited Angle :=
inferInstanceAs (Inhabited (AddCircle (2 * Ο)))
-- Porting note (#10754): added due to missing instances due to no deriving
-- also, without this, a plain `QuotientAddGroup.mk`
-- causes coerced terms to be of type `β β§Έ AddSubgroup.zmultiples (2 * Ο)`
@[coe]
protected def coe (r : β) : Angle := QuotientAddGroup.mk r
instance : Coe β Angle := β¨Angle.coeβ©
instance : CircularOrder Real.Angle :=
QuotientAddGroup.circularOrder (hp' := β¨by norm_num [pi_pos]β©)
@[continuity]
theorem continuous_coe : Continuous ((β) : β β Angle) :=
continuous_quotient_mk'
#align real.angle.continuous_coe Real.Angle.continuous_coe
def coeHom : β β+ Angle :=
QuotientAddGroup.mk' _
#align real.angle.coe_hom Real.Angle.coeHom
@[simp]
theorem coe_coeHom : (coeHom : β β Angle) = ((β) : β β Angle) :=
rfl
#align real.angle.coe_coe_hom Real.Angle.coe_coeHom
@[elab_as_elim]
protected theorem induction_on {p : Angle β Prop} (ΞΈ : Angle) (h : β x : β, p x) : p ΞΈ :=
Quotient.inductionOn' ΞΈ h
#align real.angle.induction_on Real.Angle.induction_on
@[simp]
theorem coe_zero : β(0 : β) = (0 : Angle) :=
rfl
#align real.angle.coe_zero Real.Angle.coe_zero
@[simp]
theorem coe_add (x y : β) : β(x + y : β) = (βx + βy : Angle) :=
rfl
#align real.angle.coe_add Real.Angle.coe_add
@[simp]
theorem coe_neg (x : β) : β(-x : β) = -(βx : Angle) :=
rfl
#align real.angle.coe_neg Real.Angle.coe_neg
@[simp]
theorem coe_sub (x y : β) : β(x - y : β) = (βx - βy : Angle) :=
rfl
#align real.angle.coe_sub Real.Angle.coe_sub
theorem coe_nsmul (n : β) (x : β) : β(n β’ x : β) = n β’ (βx : Angle) :=
rfl
#align real.angle.coe_nsmul Real.Angle.coe_nsmul
theorem coe_zsmul (z : β€) (x : β) : β(z β’ x : β) = z β’ (βx : Angle) :=
rfl
#align real.angle.coe_zsmul Real.Angle.coe_zsmul
@[simp, norm_cast]
theorem natCast_mul_eq_nsmul (x : β) (n : β) : β((n : β) * x) = n β’ (βx : Angle) := by
simpa only [nsmul_eq_mul] using coeHom.map_nsmul x n
#align real.angle.coe_nat_mul_eq_nsmul Real.Angle.natCast_mul_eq_nsmul
@[simp, norm_cast]
theorem intCast_mul_eq_zsmul (x : β) (n : β€) : β((n : β) * x : β) = n β’ (βx : Angle) := by
simpa only [zsmul_eq_mul] using coeHom.map_zsmul x n
#align real.angle.coe_int_mul_eq_zsmul Real.Angle.intCast_mul_eq_zsmul
@[deprecated (since := "2024-05-25")] alias coe_nat_mul_eq_nsmul := natCast_mul_eq_nsmul
@[deprecated (since := "2024-05-25")] alias coe_int_mul_eq_zsmul := intCast_mul_eq_zsmul
theorem angle_eq_iff_two_pi_dvd_sub {Ο ΞΈ : β} : (ΞΈ : Angle) = Ο β β k : β€, ΞΈ - Ο = 2 * Ο * k := by
simp only [QuotientAddGroup.eq, AddSubgroup.zmultiples_eq_closure,
AddSubgroup.mem_closure_singleton, zsmul_eq_mul', (sub_eq_neg_add _ _).symm, eq_comm]
-- Porting note: added `rw`, `simp [Angle.coe, QuotientAddGroup.eq]` doesn't fire otherwise
rw [Angle.coe, Angle.coe, QuotientAddGroup.eq]
simp only [AddSubgroup.zmultiples_eq_closure,
AddSubgroup.mem_closure_singleton, zsmul_eq_mul', (sub_eq_neg_add _ _).symm, eq_comm]
#align real.angle.angle_eq_iff_two_pi_dvd_sub Real.Angle.angle_eq_iff_two_pi_dvd_sub
@[simp]
theorem coe_two_pi : β(2 * Ο : β) = (0 : Angle) :=
angle_eq_iff_two_pi_dvd_sub.2 β¨1, by rw [sub_zero, Int.cast_one, mul_one]β©
#align real.angle.coe_two_pi Real.Angle.coe_two_pi
@[simp]
| Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean | 134 | 137 | theorem neg_coe_pi : -(Ο : Angle) = Ο := by |
rw [β coe_neg, angle_eq_iff_two_pi_dvd_sub]
use -1
simp [two_mul, sub_eq_add_neg]
| 3 | 20.085537 | 1 | 0.5 | 6 | 425 |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Analysis.Normed.Group.AddCircle
import Mathlib.Algebra.CharZero.Quotient
import Mathlib.Topology.Instances.Sign
#align_import analysis.special_functions.trigonometric.angle from "leanprover-community/mathlib"@"213b0cff7bc5ab6696ee07cceec80829ce42efec"
open Real
noncomputable section
namespace Real
-- Porting note: can't derive `NormedAddCommGroup, Inhabited`
def Angle : Type :=
AddCircle (2 * Ο)
#align real.angle Real.Angle
namespace Angle
-- Porting note (#10754): added due to missing instances due to no deriving
instance : NormedAddCommGroup Angle :=
inferInstanceAs (NormedAddCommGroup (AddCircle (2 * Ο)))
-- Porting note (#10754): added due to missing instances due to no deriving
instance : Inhabited Angle :=
inferInstanceAs (Inhabited (AddCircle (2 * Ο)))
-- Porting note (#10754): added due to missing instances due to no deriving
-- also, without this, a plain `QuotientAddGroup.mk`
-- causes coerced terms to be of type `β β§Έ AddSubgroup.zmultiples (2 * Ο)`
@[coe]
protected def coe (r : β) : Angle := QuotientAddGroup.mk r
instance : Coe β Angle := β¨Angle.coeβ©
instance : CircularOrder Real.Angle :=
QuotientAddGroup.circularOrder (hp' := β¨by norm_num [pi_pos]β©)
@[continuity]
theorem continuous_coe : Continuous ((β) : β β Angle) :=
continuous_quotient_mk'
#align real.angle.continuous_coe Real.Angle.continuous_coe
def coeHom : β β+ Angle :=
QuotientAddGroup.mk' _
#align real.angle.coe_hom Real.Angle.coeHom
@[simp]
theorem coe_coeHom : (coeHom : β β Angle) = ((β) : β β Angle) :=
rfl
#align real.angle.coe_coe_hom Real.Angle.coe_coeHom
@[elab_as_elim]
protected theorem induction_on {p : Angle β Prop} (ΞΈ : Angle) (h : β x : β, p x) : p ΞΈ :=
Quotient.inductionOn' ΞΈ h
#align real.angle.induction_on Real.Angle.induction_on
@[simp]
theorem coe_zero : β(0 : β) = (0 : Angle) :=
rfl
#align real.angle.coe_zero Real.Angle.coe_zero
@[simp]
theorem coe_add (x y : β) : β(x + y : β) = (βx + βy : Angle) :=
rfl
#align real.angle.coe_add Real.Angle.coe_add
@[simp]
theorem coe_neg (x : β) : β(-x : β) = -(βx : Angle) :=
rfl
#align real.angle.coe_neg Real.Angle.coe_neg
@[simp]
theorem coe_sub (x y : β) : β(x - y : β) = (βx - βy : Angle) :=
rfl
#align real.angle.coe_sub Real.Angle.coe_sub
theorem coe_nsmul (n : β) (x : β) : β(n β’ x : β) = n β’ (βx : Angle) :=
rfl
#align real.angle.coe_nsmul Real.Angle.coe_nsmul
theorem coe_zsmul (z : β€) (x : β) : β(z β’ x : β) = z β’ (βx : Angle) :=
rfl
#align real.angle.coe_zsmul Real.Angle.coe_zsmul
@[simp, norm_cast]
theorem natCast_mul_eq_nsmul (x : β) (n : β) : β((n : β) * x) = n β’ (βx : Angle) := by
simpa only [nsmul_eq_mul] using coeHom.map_nsmul x n
#align real.angle.coe_nat_mul_eq_nsmul Real.Angle.natCast_mul_eq_nsmul
@[simp, norm_cast]
theorem intCast_mul_eq_zsmul (x : β) (n : β€) : β((n : β) * x : β) = n β’ (βx : Angle) := by
simpa only [zsmul_eq_mul] using coeHom.map_zsmul x n
#align real.angle.coe_int_mul_eq_zsmul Real.Angle.intCast_mul_eq_zsmul
@[deprecated (since := "2024-05-25")] alias coe_nat_mul_eq_nsmul := natCast_mul_eq_nsmul
@[deprecated (since := "2024-05-25")] alias coe_int_mul_eq_zsmul := intCast_mul_eq_zsmul
theorem angle_eq_iff_two_pi_dvd_sub {Ο ΞΈ : β} : (ΞΈ : Angle) = Ο β β k : β€, ΞΈ - Ο = 2 * Ο * k := by
simp only [QuotientAddGroup.eq, AddSubgroup.zmultiples_eq_closure,
AddSubgroup.mem_closure_singleton, zsmul_eq_mul', (sub_eq_neg_add _ _).symm, eq_comm]
-- Porting note: added `rw`, `simp [Angle.coe, QuotientAddGroup.eq]` doesn't fire otherwise
rw [Angle.coe, Angle.coe, QuotientAddGroup.eq]
simp only [AddSubgroup.zmultiples_eq_closure,
AddSubgroup.mem_closure_singleton, zsmul_eq_mul', (sub_eq_neg_add _ _).symm, eq_comm]
#align real.angle.angle_eq_iff_two_pi_dvd_sub Real.Angle.angle_eq_iff_two_pi_dvd_sub
@[simp]
theorem coe_two_pi : β(2 * Ο : β) = (0 : Angle) :=
angle_eq_iff_two_pi_dvd_sub.2 β¨1, by rw [sub_zero, Int.cast_one, mul_one]β©
#align real.angle.coe_two_pi Real.Angle.coe_two_pi
@[simp]
theorem neg_coe_pi : -(Ο : Angle) = Ο := by
rw [β coe_neg, angle_eq_iff_two_pi_dvd_sub]
use -1
simp [two_mul, sub_eq_add_neg]
#align real.angle.neg_coe_pi Real.Angle.neg_coe_pi
@[simp]
| Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean | 141 | 142 | theorem two_nsmul_coe_div_two (ΞΈ : β) : (2 : β) β’ (β(ΞΈ / 2) : Angle) = ΞΈ := by |
rw [β coe_nsmul, two_nsmul, add_halves]
| 1 | 2.718282 | 0 | 0.5 | 6 | 425 |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Analysis.Normed.Group.AddCircle
import Mathlib.Algebra.CharZero.Quotient
import Mathlib.Topology.Instances.Sign
#align_import analysis.special_functions.trigonometric.angle from "leanprover-community/mathlib"@"213b0cff7bc5ab6696ee07cceec80829ce42efec"
open Real
noncomputable section
namespace Real
-- Porting note: can't derive `NormedAddCommGroup, Inhabited`
def Angle : Type :=
AddCircle (2 * Ο)
#align real.angle Real.Angle
namespace Angle
-- Porting note (#10754): added due to missing instances due to no deriving
instance : NormedAddCommGroup Angle :=
inferInstanceAs (NormedAddCommGroup (AddCircle (2 * Ο)))
-- Porting note (#10754): added due to missing instances due to no deriving
instance : Inhabited Angle :=
inferInstanceAs (Inhabited (AddCircle (2 * Ο)))
-- Porting note (#10754): added due to missing instances due to no deriving
-- also, without this, a plain `QuotientAddGroup.mk`
-- causes coerced terms to be of type `β β§Έ AddSubgroup.zmultiples (2 * Ο)`
@[coe]
protected def coe (r : β) : Angle := QuotientAddGroup.mk r
instance : Coe β Angle := β¨Angle.coeβ©
instance : CircularOrder Real.Angle :=
QuotientAddGroup.circularOrder (hp' := β¨by norm_num [pi_pos]β©)
@[continuity]
theorem continuous_coe : Continuous ((β) : β β Angle) :=
continuous_quotient_mk'
#align real.angle.continuous_coe Real.Angle.continuous_coe
def coeHom : β β+ Angle :=
QuotientAddGroup.mk' _
#align real.angle.coe_hom Real.Angle.coeHom
@[simp]
theorem coe_coeHom : (coeHom : β β Angle) = ((β) : β β Angle) :=
rfl
#align real.angle.coe_coe_hom Real.Angle.coe_coeHom
@[elab_as_elim]
protected theorem induction_on {p : Angle β Prop} (ΞΈ : Angle) (h : β x : β, p x) : p ΞΈ :=
Quotient.inductionOn' ΞΈ h
#align real.angle.induction_on Real.Angle.induction_on
@[simp]
theorem coe_zero : β(0 : β) = (0 : Angle) :=
rfl
#align real.angle.coe_zero Real.Angle.coe_zero
@[simp]
theorem coe_add (x y : β) : β(x + y : β) = (βx + βy : Angle) :=
rfl
#align real.angle.coe_add Real.Angle.coe_add
@[simp]
theorem coe_neg (x : β) : β(-x : β) = -(βx : Angle) :=
rfl
#align real.angle.coe_neg Real.Angle.coe_neg
@[simp]
theorem coe_sub (x y : β) : β(x - y : β) = (βx - βy : Angle) :=
rfl
#align real.angle.coe_sub Real.Angle.coe_sub
theorem coe_nsmul (n : β) (x : β) : β(n β’ x : β) = n β’ (βx : Angle) :=
rfl
#align real.angle.coe_nsmul Real.Angle.coe_nsmul
theorem coe_zsmul (z : β€) (x : β) : β(z β’ x : β) = z β’ (βx : Angle) :=
rfl
#align real.angle.coe_zsmul Real.Angle.coe_zsmul
@[simp, norm_cast]
theorem natCast_mul_eq_nsmul (x : β) (n : β) : β((n : β) * x) = n β’ (βx : Angle) := by
simpa only [nsmul_eq_mul] using coeHom.map_nsmul x n
#align real.angle.coe_nat_mul_eq_nsmul Real.Angle.natCast_mul_eq_nsmul
@[simp, norm_cast]
theorem intCast_mul_eq_zsmul (x : β) (n : β€) : β((n : β) * x : β) = n β’ (βx : Angle) := by
simpa only [zsmul_eq_mul] using coeHom.map_zsmul x n
#align real.angle.coe_int_mul_eq_zsmul Real.Angle.intCast_mul_eq_zsmul
@[deprecated (since := "2024-05-25")] alias coe_nat_mul_eq_nsmul := natCast_mul_eq_nsmul
@[deprecated (since := "2024-05-25")] alias coe_int_mul_eq_zsmul := intCast_mul_eq_zsmul
theorem angle_eq_iff_two_pi_dvd_sub {Ο ΞΈ : β} : (ΞΈ : Angle) = Ο β β k : β€, ΞΈ - Ο = 2 * Ο * k := by
simp only [QuotientAddGroup.eq, AddSubgroup.zmultiples_eq_closure,
AddSubgroup.mem_closure_singleton, zsmul_eq_mul', (sub_eq_neg_add _ _).symm, eq_comm]
-- Porting note: added `rw`, `simp [Angle.coe, QuotientAddGroup.eq]` doesn't fire otherwise
rw [Angle.coe, Angle.coe, QuotientAddGroup.eq]
simp only [AddSubgroup.zmultiples_eq_closure,
AddSubgroup.mem_closure_singleton, zsmul_eq_mul', (sub_eq_neg_add _ _).symm, eq_comm]
#align real.angle.angle_eq_iff_two_pi_dvd_sub Real.Angle.angle_eq_iff_two_pi_dvd_sub
@[simp]
theorem coe_two_pi : β(2 * Ο : β) = (0 : Angle) :=
angle_eq_iff_two_pi_dvd_sub.2 β¨1, by rw [sub_zero, Int.cast_one, mul_one]β©
#align real.angle.coe_two_pi Real.Angle.coe_two_pi
@[simp]
theorem neg_coe_pi : -(Ο : Angle) = Ο := by
rw [β coe_neg, angle_eq_iff_two_pi_dvd_sub]
use -1
simp [two_mul, sub_eq_add_neg]
#align real.angle.neg_coe_pi Real.Angle.neg_coe_pi
@[simp]
theorem two_nsmul_coe_div_two (ΞΈ : β) : (2 : β) β’ (β(ΞΈ / 2) : Angle) = ΞΈ := by
rw [β coe_nsmul, two_nsmul, add_halves]
#align real.angle.two_nsmul_coe_div_two Real.Angle.two_nsmul_coe_div_two
@[simp]
| Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean | 146 | 147 | theorem two_zsmul_coe_div_two (ΞΈ : β) : (2 : β€) β’ (β(ΞΈ / 2) : Angle) = ΞΈ := by |
rw [β coe_zsmul, two_zsmul, add_halves]
| 1 | 2.718282 | 0 | 0.5 | 6 | 425 |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
namespace Nat
variable {R : Type*} [AddMonoidWithOne R] [CharZero R]
@[simps]
def castEmbedding : β βͺ R :=
β¨Nat.cast, cast_injectiveβ©
#align nat.cast_embedding Nat.castEmbedding
#align nat.cast_embedding_apply Nat.castEmbedding_apply
@[simp]
| Mathlib/Algebra/CharZero/Lemmas.lean | 39 | 42 | theorem cast_pow_eq_one {R : Type*} [Semiring R] [CharZero R] (q : β) (n : β) (hn : n β 0) :
(q : R) ^ n = 1 β q = 1 := by |
rw [β cast_pow, cast_eq_one]
exact pow_eq_one_iff hn
| 2 | 7.389056 | 1 | 0.5 | 12 | 426 |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
namespace Nat
variable {R : Type*} [AddMonoidWithOne R] [CharZero R]
@[simps]
def castEmbedding : β βͺ R :=
β¨Nat.cast, cast_injectiveβ©
#align nat.cast_embedding Nat.castEmbedding
#align nat.cast_embedding_apply Nat.castEmbedding_apply
@[simp]
theorem cast_pow_eq_one {R : Type*} [Semiring R] [CharZero R] (q : β) (n : β) (hn : n β 0) :
(q : R) ^ n = 1 β q = 1 := by
rw [β cast_pow, cast_eq_one]
exact pow_eq_one_iff hn
#align nat.cast_pow_eq_one Nat.cast_pow_eq_one
@[simp, norm_cast]
| Mathlib/Algebra/CharZero/Lemmas.lean | 46 | 50 | theorem cast_div_charZero {k : Type*} [DivisionSemiring k] [CharZero k] {m n : β} (n_dvd : n β£ m) :
((m / n : β) : k) = m / n := by |
rcases eq_or_ne n 0 with (rfl | hn)
Β· simp
Β· exact cast_div n_dvd (cast_ne_zero.2 hn)
| 3 | 20.085537 | 1 | 0.5 | 12 | 426 |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
section AddMonoidWithOne
variable {Ξ± M : Type*} [AddMonoidWithOne M] [CharZero M] {n : β}
instance CharZero.NeZero.two : NeZero (2 : M) :=
β¨by
have : ((2 : β) : M) β 0 := Nat.cast_ne_zero.2 (by decide)
rwa [Nat.cast_two] at thisβ©
#align char_zero.ne_zero.two CharZero.NeZero.two
section
variable {R : Type*} [NonAssocSemiring R] [NoZeroDivisors R] [CharZero R] {a : R}
@[simp]
| Mathlib/Algebra/CharZero/Lemmas.lean | 88 | 89 | theorem add_self_eq_zero {a : R} : a + a = 0 β a = 0 := by |
simp only [(two_mul a).symm, mul_eq_zero, two_ne_zero, false_or_iff]
| 1 | 2.718282 | 0 | 0.5 | 12 | 426 |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
section AddMonoidWithOne
variable {Ξ± M : Type*} [AddMonoidWithOne M] [CharZero M] {n : β}
instance CharZero.NeZero.two : NeZero (2 : M) :=
β¨by
have : ((2 : β) : M) β 0 := Nat.cast_ne_zero.2 (by decide)
rwa [Nat.cast_two] at thisβ©
#align char_zero.ne_zero.two CharZero.NeZero.two
section
variable {R : Type*} [NonAssocSemiring R] [NoZeroDivisors R] [CharZero R] {a : R}
@[simp]
theorem add_self_eq_zero {a : R} : a + a = 0 β a = 0 := by
simp only [(two_mul a).symm, mul_eq_zero, two_ne_zero, false_or_iff]
#align add_self_eq_zero add_self_eq_zero
set_option linter.deprecated false
@[simp]
theorem bit0_eq_zero {a : R} : bit0 a = 0 β a = 0 :=
add_self_eq_zero
#align bit0_eq_zero bit0_eq_zero
@[simp]
| Mathlib/Algebra/CharZero/Lemmas.lean | 100 | 102 | theorem zero_eq_bit0 {a : R} : 0 = bit0 a β a = 0 := by |
rw [eq_comm]
exact bit0_eq_zero
| 2 | 7.389056 | 1 | 0.5 | 12 | 426 |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
section AddMonoidWithOne
variable {Ξ± M : Type*} [AddMonoidWithOne M] [CharZero M] {n : β}
instance CharZero.NeZero.two : NeZero (2 : M) :=
β¨by
have : ((2 : β) : M) β 0 := Nat.cast_ne_zero.2 (by decide)
rwa [Nat.cast_two] at thisβ©
#align char_zero.ne_zero.two CharZero.NeZero.two
section
variable {R : Type*} [NonAssocSemiring R] [NoZeroDivisors R] [CharZero R] {a : R}
@[simp]
theorem add_self_eq_zero {a : R} : a + a = 0 β a = 0 := by
simp only [(two_mul a).symm, mul_eq_zero, two_ne_zero, false_or_iff]
#align add_self_eq_zero add_self_eq_zero
set_option linter.deprecated false
@[simp]
theorem bit0_eq_zero {a : R} : bit0 a = 0 β a = 0 :=
add_self_eq_zero
#align bit0_eq_zero bit0_eq_zero
@[simp]
theorem zero_eq_bit0 {a : R} : 0 = bit0 a β a = 0 := by
rw [eq_comm]
exact bit0_eq_zero
#align zero_eq_bit0 zero_eq_bit0
theorem bit0_ne_zero : bit0 a β 0 β a β 0 :=
bit0_eq_zero.not
#align bit0_ne_zero bit0_ne_zero
theorem zero_ne_bit0 : 0 β bit0 a β a β 0 :=
zero_eq_bit0.not
#align zero_ne_bit0 zero_ne_bit0
end
section
variable {R : Type*} [NonAssocRing R] [NoZeroDivisors R] [CharZero R]
@[simp] theorem neg_eq_self_iff {a : R} : -a = a β a = 0 :=
neg_eq_iff_add_eq_zero.trans add_self_eq_zero
#align neg_eq_self_iff neg_eq_self_iff
@[simp] theorem eq_neg_self_iff {a : R} : a = -a β a = 0 :=
eq_neg_iff_add_eq_zero.trans add_self_eq_zero
#align eq_neg_self_iff eq_neg_self_iff
| Mathlib/Algebra/CharZero/Lemmas.lean | 127 | 129 | theorem nat_mul_inj {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) : n = 0 β¨ a = b := by |
rw [β sub_eq_zero, β mul_sub, mul_eq_zero, sub_eq_zero] at h
exact mod_cast h
| 2 | 7.389056 | 1 | 0.5 | 12 | 426 |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
section AddMonoidWithOne
variable {Ξ± M : Type*} [AddMonoidWithOne M] [CharZero M] {n : β}
instance CharZero.NeZero.two : NeZero (2 : M) :=
β¨by
have : ((2 : β) : M) β 0 := Nat.cast_ne_zero.2 (by decide)
rwa [Nat.cast_two] at thisβ©
#align char_zero.ne_zero.two CharZero.NeZero.two
section
variable {R : Type*} [NonAssocSemiring R] [NoZeroDivisors R] [CharZero R] {a : R}
@[simp]
theorem add_self_eq_zero {a : R} : a + a = 0 β a = 0 := by
simp only [(two_mul a).symm, mul_eq_zero, two_ne_zero, false_or_iff]
#align add_self_eq_zero add_self_eq_zero
set_option linter.deprecated false
@[simp]
theorem bit0_eq_zero {a : R} : bit0 a = 0 β a = 0 :=
add_self_eq_zero
#align bit0_eq_zero bit0_eq_zero
@[simp]
theorem zero_eq_bit0 {a : R} : 0 = bit0 a β a = 0 := by
rw [eq_comm]
exact bit0_eq_zero
#align zero_eq_bit0 zero_eq_bit0
theorem bit0_ne_zero : bit0 a β 0 β a β 0 :=
bit0_eq_zero.not
#align bit0_ne_zero bit0_ne_zero
theorem zero_ne_bit0 : 0 β bit0 a β a β 0 :=
zero_eq_bit0.not
#align zero_ne_bit0 zero_ne_bit0
end
section
variable {R : Type*} [NonAssocRing R] [NoZeroDivisors R] [CharZero R]
@[simp] theorem neg_eq_self_iff {a : R} : -a = a β a = 0 :=
neg_eq_iff_add_eq_zero.trans add_self_eq_zero
#align neg_eq_self_iff neg_eq_self_iff
@[simp] theorem eq_neg_self_iff {a : R} : a = -a β a = 0 :=
eq_neg_iff_add_eq_zero.trans add_self_eq_zero
#align eq_neg_self_iff eq_neg_self_iff
theorem nat_mul_inj {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) : n = 0 β¨ a = b := by
rw [β sub_eq_zero, β mul_sub, mul_eq_zero, sub_eq_zero] at h
exact mod_cast h
#align nat_mul_inj nat_mul_inj
| Mathlib/Algebra/CharZero/Lemmas.lean | 132 | 133 | theorem nat_mul_inj' {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) (w : n β 0) : a = b := by |
simpa [w] using nat_mul_inj h
| 1 | 2.718282 | 0 | 0.5 | 12 | 426 |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
section AddMonoidWithOne
variable {Ξ± M : Type*} [AddMonoidWithOne M] [CharZero M] {n : β}
instance CharZero.NeZero.two : NeZero (2 : M) :=
β¨by
have : ((2 : β) : M) β 0 := Nat.cast_ne_zero.2 (by decide)
rwa [Nat.cast_two] at thisβ©
#align char_zero.ne_zero.two CharZero.NeZero.two
section
variable {R : Type*} [NonAssocSemiring R] [NoZeroDivisors R] [CharZero R] {a : R}
@[simp]
theorem add_self_eq_zero {a : R} : a + a = 0 β a = 0 := by
simp only [(two_mul a).symm, mul_eq_zero, two_ne_zero, false_or_iff]
#align add_self_eq_zero add_self_eq_zero
set_option linter.deprecated false
@[simp]
theorem bit0_eq_zero {a : R} : bit0 a = 0 β a = 0 :=
add_self_eq_zero
#align bit0_eq_zero bit0_eq_zero
@[simp]
theorem zero_eq_bit0 {a : R} : 0 = bit0 a β a = 0 := by
rw [eq_comm]
exact bit0_eq_zero
#align zero_eq_bit0 zero_eq_bit0
theorem bit0_ne_zero : bit0 a β 0 β a β 0 :=
bit0_eq_zero.not
#align bit0_ne_zero bit0_ne_zero
theorem zero_ne_bit0 : 0 β bit0 a β a β 0 :=
zero_eq_bit0.not
#align zero_ne_bit0 zero_ne_bit0
end
section
variable {R : Type*} [NonAssocRing R] [NoZeroDivisors R] [CharZero R]
@[simp] theorem neg_eq_self_iff {a : R} : -a = a β a = 0 :=
neg_eq_iff_add_eq_zero.trans add_self_eq_zero
#align neg_eq_self_iff neg_eq_self_iff
@[simp] theorem eq_neg_self_iff {a : R} : a = -a β a = 0 :=
eq_neg_iff_add_eq_zero.trans add_self_eq_zero
#align eq_neg_self_iff eq_neg_self_iff
theorem nat_mul_inj {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) : n = 0 β¨ a = b := by
rw [β sub_eq_zero, β mul_sub, mul_eq_zero, sub_eq_zero] at h
exact mod_cast h
#align nat_mul_inj nat_mul_inj
theorem nat_mul_inj' {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) (w : n β 0) : a = b := by
simpa [w] using nat_mul_inj h
#align nat_mul_inj' nat_mul_inj'
set_option linter.deprecated false
theorem bit0_injective : Function.Injective (bit0 : R β R) := fun a b h => by
dsimp [bit0] at h
simp only [(two_mul a).symm, (two_mul b).symm] at h
refine nat_mul_inj' ?_ two_ne_zero
exact mod_cast h
#align bit0_injective bit0_injective
theorem bit1_injective : Function.Injective (bit1 : R β R) := fun a b h => by
simp only [bit1, add_left_inj] at h
exact bit0_injective h
#align bit1_injective bit1_injective
@[simp]
theorem bit0_eq_bit0 {a b : R} : bit0 a = bit0 b β a = b :=
bit0_injective.eq_iff
#align bit0_eq_bit0 bit0_eq_bit0
@[simp]
theorem bit1_eq_bit1 {a b : R} : bit1 a = bit1 b β a = b :=
bit1_injective.eq_iff
#align bit1_eq_bit1 bit1_eq_bit1
@[simp]
| Mathlib/Algebra/CharZero/Lemmas.lean | 161 | 162 | theorem bit1_eq_one {a : R} : bit1 a = 1 β a = 0 := by |
rw [show (1 : R) = bit1 0 by simp, bit1_eq_bit1]
| 1 | 2.718282 | 0 | 0.5 | 12 | 426 |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
section AddMonoidWithOne
variable {Ξ± M : Type*} [AddMonoidWithOne M] [CharZero M] {n : β}
instance CharZero.NeZero.two : NeZero (2 : M) :=
β¨by
have : ((2 : β) : M) β 0 := Nat.cast_ne_zero.2 (by decide)
rwa [Nat.cast_two] at thisβ©
#align char_zero.ne_zero.two CharZero.NeZero.two
section
variable {R : Type*} [NonAssocSemiring R] [NoZeroDivisors R] [CharZero R] {a : R}
@[simp]
theorem add_self_eq_zero {a : R} : a + a = 0 β a = 0 := by
simp only [(two_mul a).symm, mul_eq_zero, two_ne_zero, false_or_iff]
#align add_self_eq_zero add_self_eq_zero
set_option linter.deprecated false
@[simp]
theorem bit0_eq_zero {a : R} : bit0 a = 0 β a = 0 :=
add_self_eq_zero
#align bit0_eq_zero bit0_eq_zero
@[simp]
theorem zero_eq_bit0 {a : R} : 0 = bit0 a β a = 0 := by
rw [eq_comm]
exact bit0_eq_zero
#align zero_eq_bit0 zero_eq_bit0
theorem bit0_ne_zero : bit0 a β 0 β a β 0 :=
bit0_eq_zero.not
#align bit0_ne_zero bit0_ne_zero
theorem zero_ne_bit0 : 0 β bit0 a β a β 0 :=
zero_eq_bit0.not
#align zero_ne_bit0 zero_ne_bit0
end
section
variable {R : Type*} [NonAssocRing R] [NoZeroDivisors R] [CharZero R]
@[simp] theorem neg_eq_self_iff {a : R} : -a = a β a = 0 :=
neg_eq_iff_add_eq_zero.trans add_self_eq_zero
#align neg_eq_self_iff neg_eq_self_iff
@[simp] theorem eq_neg_self_iff {a : R} : a = -a β a = 0 :=
eq_neg_iff_add_eq_zero.trans add_self_eq_zero
#align eq_neg_self_iff eq_neg_self_iff
theorem nat_mul_inj {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) : n = 0 β¨ a = b := by
rw [β sub_eq_zero, β mul_sub, mul_eq_zero, sub_eq_zero] at h
exact mod_cast h
#align nat_mul_inj nat_mul_inj
theorem nat_mul_inj' {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) (w : n β 0) : a = b := by
simpa [w] using nat_mul_inj h
#align nat_mul_inj' nat_mul_inj'
set_option linter.deprecated false
theorem bit0_injective : Function.Injective (bit0 : R β R) := fun a b h => by
dsimp [bit0] at h
simp only [(two_mul a).symm, (two_mul b).symm] at h
refine nat_mul_inj' ?_ two_ne_zero
exact mod_cast h
#align bit0_injective bit0_injective
theorem bit1_injective : Function.Injective (bit1 : R β R) := fun a b h => by
simp only [bit1, add_left_inj] at h
exact bit0_injective h
#align bit1_injective bit1_injective
@[simp]
theorem bit0_eq_bit0 {a b : R} : bit0 a = bit0 b β a = b :=
bit0_injective.eq_iff
#align bit0_eq_bit0 bit0_eq_bit0
@[simp]
theorem bit1_eq_bit1 {a b : R} : bit1 a = bit1 b β a = b :=
bit1_injective.eq_iff
#align bit1_eq_bit1 bit1_eq_bit1
@[simp]
theorem bit1_eq_one {a : R} : bit1 a = 1 β a = 0 := by
rw [show (1 : R) = bit1 0 by simp, bit1_eq_bit1]
#align bit1_eq_one bit1_eq_one
@[simp]
| Mathlib/Algebra/CharZero/Lemmas.lean | 166 | 168 | theorem one_eq_bit1 {a : R} : 1 = bit1 a β a = 0 := by |
rw [eq_comm]
exact bit1_eq_one
| 2 | 7.389056 | 1 | 0.5 | 12 | 426 |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
section AddMonoidWithOne
variable {Ξ± M : Type*} [AddMonoidWithOne M] [CharZero M] {n : β}
instance CharZero.NeZero.two : NeZero (2 : M) :=
β¨by
have : ((2 : β) : M) β 0 := Nat.cast_ne_zero.2 (by decide)
rwa [Nat.cast_two] at thisβ©
#align char_zero.ne_zero.two CharZero.NeZero.two
section
variable {R : Type*} [NonAssocSemiring R] [NoZeroDivisors R] [CharZero R] {a : R}
@[simp]
theorem add_self_eq_zero {a : R} : a + a = 0 β a = 0 := by
simp only [(two_mul a).symm, mul_eq_zero, two_ne_zero, false_or_iff]
#align add_self_eq_zero add_self_eq_zero
set_option linter.deprecated false
@[simp]
theorem bit0_eq_zero {a : R} : bit0 a = 0 β a = 0 :=
add_self_eq_zero
#align bit0_eq_zero bit0_eq_zero
@[simp]
theorem zero_eq_bit0 {a : R} : 0 = bit0 a β a = 0 := by
rw [eq_comm]
exact bit0_eq_zero
#align zero_eq_bit0 zero_eq_bit0
theorem bit0_ne_zero : bit0 a β 0 β a β 0 :=
bit0_eq_zero.not
#align bit0_ne_zero bit0_ne_zero
theorem zero_ne_bit0 : 0 β bit0 a β a β 0 :=
zero_eq_bit0.not
#align zero_ne_bit0 zero_ne_bit0
end
section
variable {R : Type*} [NonAssocRing R] [NoZeroDivisors R] [CharZero R]
@[simp] theorem neg_eq_self_iff {a : R} : -a = a β a = 0 :=
neg_eq_iff_add_eq_zero.trans add_self_eq_zero
#align neg_eq_self_iff neg_eq_self_iff
@[simp] theorem eq_neg_self_iff {a : R} : a = -a β a = 0 :=
eq_neg_iff_add_eq_zero.trans add_self_eq_zero
#align eq_neg_self_iff eq_neg_self_iff
theorem nat_mul_inj {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) : n = 0 β¨ a = b := by
rw [β sub_eq_zero, β mul_sub, mul_eq_zero, sub_eq_zero] at h
exact mod_cast h
#align nat_mul_inj nat_mul_inj
theorem nat_mul_inj' {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) (w : n β 0) : a = b := by
simpa [w] using nat_mul_inj h
#align nat_mul_inj' nat_mul_inj'
set_option linter.deprecated false
theorem bit0_injective : Function.Injective (bit0 : R β R) := fun a b h => by
dsimp [bit0] at h
simp only [(two_mul a).symm, (two_mul b).symm] at h
refine nat_mul_inj' ?_ two_ne_zero
exact mod_cast h
#align bit0_injective bit0_injective
theorem bit1_injective : Function.Injective (bit1 : R β R) := fun a b h => by
simp only [bit1, add_left_inj] at h
exact bit0_injective h
#align bit1_injective bit1_injective
@[simp]
theorem bit0_eq_bit0 {a b : R} : bit0 a = bit0 b β a = b :=
bit0_injective.eq_iff
#align bit0_eq_bit0 bit0_eq_bit0
@[simp]
theorem bit1_eq_bit1 {a b : R} : bit1 a = bit1 b β a = b :=
bit1_injective.eq_iff
#align bit1_eq_bit1 bit1_eq_bit1
@[simp]
theorem bit1_eq_one {a : R} : bit1 a = 1 β a = 0 := by
rw [show (1 : R) = bit1 0 by simp, bit1_eq_bit1]
#align bit1_eq_one bit1_eq_one
@[simp]
theorem one_eq_bit1 {a : R} : 1 = bit1 a β a = 0 := by
rw [eq_comm]
exact bit1_eq_one
#align one_eq_bit1 one_eq_bit1
end
section
variable {R : Type*} [DivisionRing R] [CharZero R]
@[simp] lemma half_add_self (a : R) : (a + a) / 2 = a := by
rw [β mul_two, mul_div_cancel_rightβ a two_ne_zero]
#align half_add_self half_add_self
@[simp]
| Mathlib/Algebra/CharZero/Lemmas.lean | 182 | 182 | theorem add_halves' (a : R) : a / 2 + a / 2 = a := by | rw [β add_div, half_add_self]
| 1 | 2.718282 | 0 | 0.5 | 12 | 426 |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
section AddMonoidWithOne
variable {Ξ± M : Type*} [AddMonoidWithOne M] [CharZero M] {n : β}
instance CharZero.NeZero.two : NeZero (2 : M) :=
β¨by
have : ((2 : β) : M) β 0 := Nat.cast_ne_zero.2 (by decide)
rwa [Nat.cast_two] at thisβ©
#align char_zero.ne_zero.two CharZero.NeZero.two
section
variable {R : Type*} [NonAssocSemiring R] [NoZeroDivisors R] [CharZero R] {a : R}
@[simp]
theorem add_self_eq_zero {a : R} : a + a = 0 β a = 0 := by
simp only [(two_mul a).symm, mul_eq_zero, two_ne_zero, false_or_iff]
#align add_self_eq_zero add_self_eq_zero
set_option linter.deprecated false
@[simp]
theorem bit0_eq_zero {a : R} : bit0 a = 0 β a = 0 :=
add_self_eq_zero
#align bit0_eq_zero bit0_eq_zero
@[simp]
theorem zero_eq_bit0 {a : R} : 0 = bit0 a β a = 0 := by
rw [eq_comm]
exact bit0_eq_zero
#align zero_eq_bit0 zero_eq_bit0
theorem bit0_ne_zero : bit0 a β 0 β a β 0 :=
bit0_eq_zero.not
#align bit0_ne_zero bit0_ne_zero
theorem zero_ne_bit0 : 0 β bit0 a β a β 0 :=
zero_eq_bit0.not
#align zero_ne_bit0 zero_ne_bit0
end
section
variable {R : Type*} [NonAssocRing R] [NoZeroDivisors R] [CharZero R]
@[simp] theorem neg_eq_self_iff {a : R} : -a = a β a = 0 :=
neg_eq_iff_add_eq_zero.trans add_self_eq_zero
#align neg_eq_self_iff neg_eq_self_iff
@[simp] theorem eq_neg_self_iff {a : R} : a = -a β a = 0 :=
eq_neg_iff_add_eq_zero.trans add_self_eq_zero
#align eq_neg_self_iff eq_neg_self_iff
theorem nat_mul_inj {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) : n = 0 β¨ a = b := by
rw [β sub_eq_zero, β mul_sub, mul_eq_zero, sub_eq_zero] at h
exact mod_cast h
#align nat_mul_inj nat_mul_inj
theorem nat_mul_inj' {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) (w : n β 0) : a = b := by
simpa [w] using nat_mul_inj h
#align nat_mul_inj' nat_mul_inj'
set_option linter.deprecated false
theorem bit0_injective : Function.Injective (bit0 : R β R) := fun a b h => by
dsimp [bit0] at h
simp only [(two_mul a).symm, (two_mul b).symm] at h
refine nat_mul_inj' ?_ two_ne_zero
exact mod_cast h
#align bit0_injective bit0_injective
theorem bit1_injective : Function.Injective (bit1 : R β R) := fun a b h => by
simp only [bit1, add_left_inj] at h
exact bit0_injective h
#align bit1_injective bit1_injective
@[simp]
theorem bit0_eq_bit0 {a b : R} : bit0 a = bit0 b β a = b :=
bit0_injective.eq_iff
#align bit0_eq_bit0 bit0_eq_bit0
@[simp]
theorem bit1_eq_bit1 {a b : R} : bit1 a = bit1 b β a = b :=
bit1_injective.eq_iff
#align bit1_eq_bit1 bit1_eq_bit1
@[simp]
theorem bit1_eq_one {a : R} : bit1 a = 1 β a = 0 := by
rw [show (1 : R) = bit1 0 by simp, bit1_eq_bit1]
#align bit1_eq_one bit1_eq_one
@[simp]
theorem one_eq_bit1 {a : R} : 1 = bit1 a β a = 0 := by
rw [eq_comm]
exact bit1_eq_one
#align one_eq_bit1 one_eq_bit1
end
section
variable {R : Type*} [DivisionRing R] [CharZero R]
@[simp] lemma half_add_self (a : R) : (a + a) / 2 = a := by
rw [β mul_two, mul_div_cancel_rightβ a two_ne_zero]
#align half_add_self half_add_self
@[simp]
theorem add_halves' (a : R) : a / 2 + a / 2 = a := by rw [β add_div, half_add_self]
#align add_halves' add_halves'
| Mathlib/Algebra/CharZero/Lemmas.lean | 185 | 185 | theorem sub_half (a : R) : a - a / 2 = a / 2 := by | rw [sub_eq_iff_eq_add, add_halves']
| 1 | 2.718282 | 0 | 0.5 | 12 | 426 |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
section AddMonoidWithOne
variable {Ξ± M : Type*} [AddMonoidWithOne M] [CharZero M] {n : β}
instance CharZero.NeZero.two : NeZero (2 : M) :=
β¨by
have : ((2 : β) : M) β 0 := Nat.cast_ne_zero.2 (by decide)
rwa [Nat.cast_two] at thisβ©
#align char_zero.ne_zero.two CharZero.NeZero.two
section
variable {R : Type*} [NonAssocSemiring R] [NoZeroDivisors R] [CharZero R] {a : R}
@[simp]
theorem add_self_eq_zero {a : R} : a + a = 0 β a = 0 := by
simp only [(two_mul a).symm, mul_eq_zero, two_ne_zero, false_or_iff]
#align add_self_eq_zero add_self_eq_zero
set_option linter.deprecated false
@[simp]
theorem bit0_eq_zero {a : R} : bit0 a = 0 β a = 0 :=
add_self_eq_zero
#align bit0_eq_zero bit0_eq_zero
@[simp]
theorem zero_eq_bit0 {a : R} : 0 = bit0 a β a = 0 := by
rw [eq_comm]
exact bit0_eq_zero
#align zero_eq_bit0 zero_eq_bit0
theorem bit0_ne_zero : bit0 a β 0 β a β 0 :=
bit0_eq_zero.not
#align bit0_ne_zero bit0_ne_zero
theorem zero_ne_bit0 : 0 β bit0 a β a β 0 :=
zero_eq_bit0.not
#align zero_ne_bit0 zero_ne_bit0
end
section
variable {R : Type*} [NonAssocRing R] [NoZeroDivisors R] [CharZero R]
@[simp] theorem neg_eq_self_iff {a : R} : -a = a β a = 0 :=
neg_eq_iff_add_eq_zero.trans add_self_eq_zero
#align neg_eq_self_iff neg_eq_self_iff
@[simp] theorem eq_neg_self_iff {a : R} : a = -a β a = 0 :=
eq_neg_iff_add_eq_zero.trans add_self_eq_zero
#align eq_neg_self_iff eq_neg_self_iff
theorem nat_mul_inj {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) : n = 0 β¨ a = b := by
rw [β sub_eq_zero, β mul_sub, mul_eq_zero, sub_eq_zero] at h
exact mod_cast h
#align nat_mul_inj nat_mul_inj
theorem nat_mul_inj' {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) (w : n β 0) : a = b := by
simpa [w] using nat_mul_inj h
#align nat_mul_inj' nat_mul_inj'
set_option linter.deprecated false
theorem bit0_injective : Function.Injective (bit0 : R β R) := fun a b h => by
dsimp [bit0] at h
simp only [(two_mul a).symm, (two_mul b).symm] at h
refine nat_mul_inj' ?_ two_ne_zero
exact mod_cast h
#align bit0_injective bit0_injective
theorem bit1_injective : Function.Injective (bit1 : R β R) := fun a b h => by
simp only [bit1, add_left_inj] at h
exact bit0_injective h
#align bit1_injective bit1_injective
@[simp]
theorem bit0_eq_bit0 {a b : R} : bit0 a = bit0 b β a = b :=
bit0_injective.eq_iff
#align bit0_eq_bit0 bit0_eq_bit0
@[simp]
theorem bit1_eq_bit1 {a b : R} : bit1 a = bit1 b β a = b :=
bit1_injective.eq_iff
#align bit1_eq_bit1 bit1_eq_bit1
@[simp]
theorem bit1_eq_one {a : R} : bit1 a = 1 β a = 0 := by
rw [show (1 : R) = bit1 0 by simp, bit1_eq_bit1]
#align bit1_eq_one bit1_eq_one
@[simp]
theorem one_eq_bit1 {a : R} : 1 = bit1 a β a = 0 := by
rw [eq_comm]
exact bit1_eq_one
#align one_eq_bit1 one_eq_bit1
end
section
variable {R : Type*} [DivisionRing R] [CharZero R]
@[simp] lemma half_add_self (a : R) : (a + a) / 2 = a := by
rw [β mul_two, mul_div_cancel_rightβ a two_ne_zero]
#align half_add_self half_add_self
@[simp]
theorem add_halves' (a : R) : a / 2 + a / 2 = a := by rw [β add_div, half_add_self]
#align add_halves' add_halves'
theorem sub_half (a : R) : a - a / 2 = a / 2 := by rw [sub_eq_iff_eq_add, add_halves']
#align sub_half sub_half
| Mathlib/Algebra/CharZero/Lemmas.lean | 188 | 188 | theorem half_sub (a : R) : a / 2 - a = -(a / 2) := by | rw [β neg_sub, sub_half]
| 1 | 2.718282 | 0 | 0.5 | 12 | 426 |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
section AddMonoidWithOne
variable {Ξ± M : Type*} [AddMonoidWithOne M] [CharZero M] {n : β}
instance CharZero.NeZero.two : NeZero (2 : M) :=
β¨by
have : ((2 : β) : M) β 0 := Nat.cast_ne_zero.2 (by decide)
rwa [Nat.cast_two] at thisβ©
#align char_zero.ne_zero.two CharZero.NeZero.two
section
variable {R : Type*} [NonAssocSemiring R] [NoZeroDivisors R] [CharZero R] {a : R}
@[simp]
theorem add_self_eq_zero {a : R} : a + a = 0 β a = 0 := by
simp only [(two_mul a).symm, mul_eq_zero, two_ne_zero, false_or_iff]
#align add_self_eq_zero add_self_eq_zero
set_option linter.deprecated false
@[simp]
theorem bit0_eq_zero {a : R} : bit0 a = 0 β a = 0 :=
add_self_eq_zero
#align bit0_eq_zero bit0_eq_zero
@[simp]
theorem zero_eq_bit0 {a : R} : 0 = bit0 a β a = 0 := by
rw [eq_comm]
exact bit0_eq_zero
#align zero_eq_bit0 zero_eq_bit0
theorem bit0_ne_zero : bit0 a β 0 β a β 0 :=
bit0_eq_zero.not
#align bit0_ne_zero bit0_ne_zero
theorem zero_ne_bit0 : 0 β bit0 a β a β 0 :=
zero_eq_bit0.not
#align zero_ne_bit0 zero_ne_bit0
end
section
variable {R : Type*} [NonAssocRing R] [NoZeroDivisors R] [CharZero R]
@[simp] theorem neg_eq_self_iff {a : R} : -a = a β a = 0 :=
neg_eq_iff_add_eq_zero.trans add_self_eq_zero
#align neg_eq_self_iff neg_eq_self_iff
@[simp] theorem eq_neg_self_iff {a : R} : a = -a β a = 0 :=
eq_neg_iff_add_eq_zero.trans add_self_eq_zero
#align eq_neg_self_iff eq_neg_self_iff
theorem nat_mul_inj {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) : n = 0 β¨ a = b := by
rw [β sub_eq_zero, β mul_sub, mul_eq_zero, sub_eq_zero] at h
exact mod_cast h
#align nat_mul_inj nat_mul_inj
theorem nat_mul_inj' {n : β} {a b : R} (h : (n : R) * a = (n : R) * b) (w : n β 0) : a = b := by
simpa [w] using nat_mul_inj h
#align nat_mul_inj' nat_mul_inj'
set_option linter.deprecated false
theorem bit0_injective : Function.Injective (bit0 : R β R) := fun a b h => by
dsimp [bit0] at h
simp only [(two_mul a).symm, (two_mul b).symm] at h
refine nat_mul_inj' ?_ two_ne_zero
exact mod_cast h
#align bit0_injective bit0_injective
theorem bit1_injective : Function.Injective (bit1 : R β R) := fun a b h => by
simp only [bit1, add_left_inj] at h
exact bit0_injective h
#align bit1_injective bit1_injective
@[simp]
theorem bit0_eq_bit0 {a b : R} : bit0 a = bit0 b β a = b :=
bit0_injective.eq_iff
#align bit0_eq_bit0 bit0_eq_bit0
@[simp]
theorem bit1_eq_bit1 {a b : R} : bit1 a = bit1 b β a = b :=
bit1_injective.eq_iff
#align bit1_eq_bit1 bit1_eq_bit1
@[simp]
theorem bit1_eq_one {a : R} : bit1 a = 1 β a = 0 := by
rw [show (1 : R) = bit1 0 by simp, bit1_eq_bit1]
#align bit1_eq_one bit1_eq_one
@[simp]
theorem one_eq_bit1 {a : R} : 1 = bit1 a β a = 0 := by
rw [eq_comm]
exact bit1_eq_one
#align one_eq_bit1 one_eq_bit1
end
section
variable {R : Type*} [DivisionRing R] [CharZero R]
@[simp] lemma half_add_self (a : R) : (a + a) / 2 = a := by
rw [β mul_two, mul_div_cancel_rightβ a two_ne_zero]
#align half_add_self half_add_self
@[simp]
theorem add_halves' (a : R) : a / 2 + a / 2 = a := by rw [β add_div, half_add_self]
#align add_halves' add_halves'
theorem sub_half (a : R) : a - a / 2 = a / 2 := by rw [sub_eq_iff_eq_add, add_halves']
#align sub_half sub_half
theorem half_sub (a : R) : a / 2 - a = -(a / 2) := by rw [β neg_sub, sub_half]
#align half_sub half_sub
end
section Units
variable {R : Type*} [Ring R] [CharZero R]
@[simp]
| Mathlib/Algebra/CharZero/Lemmas.lean | 236 | 238 | theorem units_ne_neg_self (u : RΛ£) : u β -u := by |
simp_rw [ne_eq, Units.ext_iff, Units.val_neg, eq_neg_iff_add_eq_zero, β two_mul,
Units.mul_left_eq_zero, two_ne_zero, not_false_iff]
| 2 | 7.389056 | 1 | 0.5 | 12 | 426 |
import Mathlib.Algebra.Group.Center
#align_import group_theory.subsemigroup.centralizer from "leanprover-community/mathlib"@"cc67cd75b4e54191e13c2e8d722289a89e67e4fa"
variable {M : Type*} {S T : Set M}
namespace Set
variable (S)
@[to_additive addCentralizer " The centralizer of a subset of an additive magma. "]
def centralizer [Mul M] : Set M :=
{ c | β m β S, m * c = c * m }
#align set.centralizer Set.centralizer
#align set.add_centralizer Set.addCentralizer
variable {S}
@[to_additive mem_addCentralizer]
theorem mem_centralizer_iff [Mul M] {c : M} : c β centralizer S β β m β S, m * c = c * m :=
Iff.rfl
#align set.mem_centralizer_iff Set.mem_centralizer_iff
#align set.mem_add_centralizer Set.mem_addCentralizer
@[to_additive decidableMemAddCentralizer]
instance decidableMemCentralizer [Mul M] [β a : M, Decidable <| β b β S, b * a = a * b] :
DecidablePred (Β· β centralizer S) := fun _ => decidable_of_iff' _ mem_centralizer_iff
#align set.decidable_mem_centralizer Set.decidableMemCentralizer
#align set.decidable_mem_add_centralizer Set.decidableMemAddCentralizer
variable (S)
@[to_additive (attr := simp) zero_mem_addCentralizer]
| Mathlib/Algebra/Group/Centralizer.lean | 58 | 59 | theorem one_mem_centralizer [MulOneClass M] : (1 : M) β centralizer S := by |
simp [mem_centralizer_iff]
| 1 | 2.718282 | 0 | 0.5 | 4 | 427 |
import Mathlib.Algebra.Group.Center
#align_import group_theory.subsemigroup.centralizer from "leanprover-community/mathlib"@"cc67cd75b4e54191e13c2e8d722289a89e67e4fa"
variable {M : Type*} {S T : Set M}
namespace Set
variable (S)
@[to_additive addCentralizer " The centralizer of a subset of an additive magma. "]
def centralizer [Mul M] : Set M :=
{ c | β m β S, m * c = c * m }
#align set.centralizer Set.centralizer
#align set.add_centralizer Set.addCentralizer
variable {S}
@[to_additive mem_addCentralizer]
theorem mem_centralizer_iff [Mul M] {c : M} : c β centralizer S β β m β S, m * c = c * m :=
Iff.rfl
#align set.mem_centralizer_iff Set.mem_centralizer_iff
#align set.mem_add_centralizer Set.mem_addCentralizer
@[to_additive decidableMemAddCentralizer]
instance decidableMemCentralizer [Mul M] [β a : M, Decidable <| β b β S, b * a = a * b] :
DecidablePred (Β· β centralizer S) := fun _ => decidable_of_iff' _ mem_centralizer_iff
#align set.decidable_mem_centralizer Set.decidableMemCentralizer
#align set.decidable_mem_add_centralizer Set.decidableMemAddCentralizer
variable (S)
@[to_additive (attr := simp) zero_mem_addCentralizer]
theorem one_mem_centralizer [MulOneClass M] : (1 : M) β centralizer S := by
simp [mem_centralizer_iff]
#align set.one_mem_centralizer Set.one_mem_centralizer
#align set.zero_mem_add_centralizer Set.zero_mem_addCentralizer
@[simp]
| Mathlib/Algebra/Group/Centralizer.lean | 64 | 65 | theorem zero_mem_centralizer [MulZeroClass M] : (0 : M) β centralizer S := by |
simp [mem_centralizer_iff]
| 1 | 2.718282 | 0 | 0.5 | 4 | 427 |
import Mathlib.Algebra.Group.Center
#align_import group_theory.subsemigroup.centralizer from "leanprover-community/mathlib"@"cc67cd75b4e54191e13c2e8d722289a89e67e4fa"
variable {M : Type*} {S T : Set M}
namespace Set
variable (S)
@[to_additive addCentralizer " The centralizer of a subset of an additive magma. "]
def centralizer [Mul M] : Set M :=
{ c | β m β S, m * c = c * m }
#align set.centralizer Set.centralizer
#align set.add_centralizer Set.addCentralizer
variable {S}
@[to_additive mem_addCentralizer]
theorem mem_centralizer_iff [Mul M] {c : M} : c β centralizer S β β m β S, m * c = c * m :=
Iff.rfl
#align set.mem_centralizer_iff Set.mem_centralizer_iff
#align set.mem_add_centralizer Set.mem_addCentralizer
@[to_additive decidableMemAddCentralizer]
instance decidableMemCentralizer [Mul M] [β a : M, Decidable <| β b β S, b * a = a * b] :
DecidablePred (Β· β centralizer S) := fun _ => decidable_of_iff' _ mem_centralizer_iff
#align set.decidable_mem_centralizer Set.decidableMemCentralizer
#align set.decidable_mem_add_centralizer Set.decidableMemAddCentralizer
variable (S)
@[to_additive (attr := simp) zero_mem_addCentralizer]
theorem one_mem_centralizer [MulOneClass M] : (1 : M) β centralizer S := by
simp [mem_centralizer_iff]
#align set.one_mem_centralizer Set.one_mem_centralizer
#align set.zero_mem_add_centralizer Set.zero_mem_addCentralizer
@[simp]
theorem zero_mem_centralizer [MulZeroClass M] : (0 : M) β centralizer S := by
simp [mem_centralizer_iff]
#align set.zero_mem_centralizer Set.zero_mem_centralizer
variable {S} {a b : M}
@[to_additive (attr := simp) add_mem_addCentralizer]
theorem mul_mem_centralizer [Semigroup M] (ha : a β centralizer S) (hb : b β centralizer S) :
a * b β centralizer S := fun g hg => by
rw [mul_assoc, β hb g hg, β mul_assoc, ha g hg, mul_assoc]
#align set.mul_mem_centralizer Set.mul_mem_centralizer
#align set.add_mem_add_centralizer Set.add_mem_addCentralizer
@[to_additive (attr := simp) neg_mem_addCentralizer]
theorem inv_mem_centralizer [Group M] (ha : a β centralizer S) : aβ»ΒΉ β centralizer S :=
fun g hg => by rw [mul_inv_eq_iff_eq_mul, mul_assoc, eq_inv_mul_iff_mul_eq, ha g hg]
#align set.inv_mem_centralizer Set.inv_mem_centralizer
#align set.neg_mem_add_centralizer Set.neg_mem_addCentralizer
@[simp]
theorem inv_mem_centralizerβ [GroupWithZero M] (ha : a β centralizer S) : aβ»ΒΉ β centralizer S :=
(eq_or_ne a 0).elim
(fun h => by
rw [h, inv_zero]
exact zero_mem_centralizer S)
fun ha0 c hc => by
rw [mul_inv_eq_iff_eq_mulβ ha0, mul_assoc, eq_inv_mul_iff_mul_eqβ ha0, ha c hc]
#align set.inv_mem_centralizerβ Set.inv_mem_centralizerβ
@[to_additive (attr := simp) sub_mem_addCentralizer]
| Mathlib/Algebra/Group/Centralizer.lean | 94 | 97 | theorem div_mem_centralizer [Group M] (ha : a β centralizer S) (hb : b β centralizer S) :
a / b β centralizer S := by |
rw [div_eq_mul_inv]
exact mul_mem_centralizer ha (inv_mem_centralizer hb)
| 2 | 7.389056 | 1 | 0.5 | 4 | 427 |
import Mathlib.Algebra.Group.Center
#align_import group_theory.subsemigroup.centralizer from "leanprover-community/mathlib"@"cc67cd75b4e54191e13c2e8d722289a89e67e4fa"
variable {M : Type*} {S T : Set M}
namespace Set
variable (S)
@[to_additive addCentralizer " The centralizer of a subset of an additive magma. "]
def centralizer [Mul M] : Set M :=
{ c | β m β S, m * c = c * m }
#align set.centralizer Set.centralizer
#align set.add_centralizer Set.addCentralizer
variable {S}
@[to_additive mem_addCentralizer]
theorem mem_centralizer_iff [Mul M] {c : M} : c β centralizer S β β m β S, m * c = c * m :=
Iff.rfl
#align set.mem_centralizer_iff Set.mem_centralizer_iff
#align set.mem_add_centralizer Set.mem_addCentralizer
@[to_additive decidableMemAddCentralizer]
instance decidableMemCentralizer [Mul M] [β a : M, Decidable <| β b β S, b * a = a * b] :
DecidablePred (Β· β centralizer S) := fun _ => decidable_of_iff' _ mem_centralizer_iff
#align set.decidable_mem_centralizer Set.decidableMemCentralizer
#align set.decidable_mem_add_centralizer Set.decidableMemAddCentralizer
variable (S)
@[to_additive (attr := simp) zero_mem_addCentralizer]
theorem one_mem_centralizer [MulOneClass M] : (1 : M) β centralizer S := by
simp [mem_centralizer_iff]
#align set.one_mem_centralizer Set.one_mem_centralizer
#align set.zero_mem_add_centralizer Set.zero_mem_addCentralizer
@[simp]
theorem zero_mem_centralizer [MulZeroClass M] : (0 : M) β centralizer S := by
simp [mem_centralizer_iff]
#align set.zero_mem_centralizer Set.zero_mem_centralizer
variable {S} {a b : M}
@[to_additive (attr := simp) add_mem_addCentralizer]
theorem mul_mem_centralizer [Semigroup M] (ha : a β centralizer S) (hb : b β centralizer S) :
a * b β centralizer S := fun g hg => by
rw [mul_assoc, β hb g hg, β mul_assoc, ha g hg, mul_assoc]
#align set.mul_mem_centralizer Set.mul_mem_centralizer
#align set.add_mem_add_centralizer Set.add_mem_addCentralizer
@[to_additive (attr := simp) neg_mem_addCentralizer]
theorem inv_mem_centralizer [Group M] (ha : a β centralizer S) : aβ»ΒΉ β centralizer S :=
fun g hg => by rw [mul_inv_eq_iff_eq_mul, mul_assoc, eq_inv_mul_iff_mul_eq, ha g hg]
#align set.inv_mem_centralizer Set.inv_mem_centralizer
#align set.neg_mem_add_centralizer Set.neg_mem_addCentralizer
@[simp]
theorem inv_mem_centralizerβ [GroupWithZero M] (ha : a β centralizer S) : aβ»ΒΉ β centralizer S :=
(eq_or_ne a 0).elim
(fun h => by
rw [h, inv_zero]
exact zero_mem_centralizer S)
fun ha0 c hc => by
rw [mul_inv_eq_iff_eq_mulβ ha0, mul_assoc, eq_inv_mul_iff_mul_eqβ ha0, ha c hc]
#align set.inv_mem_centralizerβ Set.inv_mem_centralizerβ
@[to_additive (attr := simp) sub_mem_addCentralizer]
theorem div_mem_centralizer [Group M] (ha : a β centralizer S) (hb : b β centralizer S) :
a / b β centralizer S := by
rw [div_eq_mul_inv]
exact mul_mem_centralizer ha (inv_mem_centralizer hb)
#align set.div_mem_centralizer Set.div_mem_centralizer
#align set.sub_mem_add_centralizer Set.sub_mem_addCentralizer
@[simp]
| Mathlib/Algebra/Group/Centralizer.lean | 102 | 105 | theorem div_mem_centralizerβ [GroupWithZero M] (ha : a β centralizer S) (hb : b β centralizer S) :
a / b β centralizer S := by |
rw [div_eq_mul_inv]
exact mul_mem_centralizer ha (inv_mem_centralizerβ hb)
| 2 | 7.389056 | 1 | 0.5 | 4 | 427 |
import Mathlib.MeasureTheory.MeasurableSpace.Defs
open Set Function
open scoped MeasureTheory
namespace MeasurableSpace
variable {Ξ± : Type*}
def invariants [m : MeasurableSpace Ξ±] (f : Ξ± β Ξ±) : MeasurableSpace Ξ± :=
{ m β β¨fun s β¦ f β»ΒΉ' s = s, by simp, by simp, fun f hf β¦ by simp [hf]β© with
MeasurableSet' := fun s β¦ MeasurableSet[m] s β§ f β»ΒΉ' s = s }
variable [MeasurableSpace Ξ±]
theorem measurableSet_invariants {f : Ξ± β Ξ±} {s : Set Ξ±} :
MeasurableSet[invariants f] s β MeasurableSet s β§ f β»ΒΉ' s = s :=
.rfl
@[simp]
theorem invariants_id : invariants (id : Ξ± β Ξ±) = βΉMeasurableSpace Ξ±βΊ :=
ext fun _ β¦ β¨And.left, fun h β¦ β¨h, rflβ©β©
theorem invariants_le (f : Ξ± β Ξ±) : invariants f β€ βΉMeasurableSpace Ξ±βΊ := fun _ β¦ And.left
theorem inf_le_invariants_comp (f g : Ξ± β Ξ±) :
invariants f β invariants g β€ invariants (f β g) := fun s hs β¦
β¨hs.1.1, by rw [preimage_comp, hs.1.2, hs.2.2]β©
| Mathlib/MeasureTheory/MeasurableSpace/Invariants.lean | 50 | 54 | theorem le_invariants_iterate (f : Ξ± β Ξ±) (n : β) :
invariants f β€ invariants (f^[n]) := by |
induction n with
| zero => simp [invariants_le]
| succ n ihn => exact le_trans (le_inf ihn le_rfl) (inf_le_invariants_comp _ _)
| 3 | 20.085537 | 1 | 0.5 | 2 | 428 |
import Mathlib.MeasureTheory.MeasurableSpace.Defs
open Set Function
open scoped MeasureTheory
namespace MeasurableSpace
variable {Ξ± : Type*}
def invariants [m : MeasurableSpace Ξ±] (f : Ξ± β Ξ±) : MeasurableSpace Ξ± :=
{ m β β¨fun s β¦ f β»ΒΉ' s = s, by simp, by simp, fun f hf β¦ by simp [hf]β© with
MeasurableSet' := fun s β¦ MeasurableSet[m] s β§ f β»ΒΉ' s = s }
variable [MeasurableSpace Ξ±]
theorem measurableSet_invariants {f : Ξ± β Ξ±} {s : Set Ξ±} :
MeasurableSet[invariants f] s β MeasurableSet s β§ f β»ΒΉ' s = s :=
.rfl
@[simp]
theorem invariants_id : invariants (id : Ξ± β Ξ±) = βΉMeasurableSpace Ξ±βΊ :=
ext fun _ β¦ β¨And.left, fun h β¦ β¨h, rflβ©β©
theorem invariants_le (f : Ξ± β Ξ±) : invariants f β€ βΉMeasurableSpace Ξ±βΊ := fun _ β¦ And.left
theorem inf_le_invariants_comp (f g : Ξ± β Ξ±) :
invariants f β invariants g β€ invariants (f β g) := fun s hs β¦
β¨hs.1.1, by rw [preimage_comp, hs.1.2, hs.2.2]β©
theorem le_invariants_iterate (f : Ξ± β Ξ±) (n : β) :
invariants f β€ invariants (f^[n]) := by
induction n with
| zero => simp [invariants_le]
| succ n ihn => exact le_trans (le_inf ihn le_rfl) (inf_le_invariants_comp _ _)
variable {Ξ² : Type*} [MeasurableSpace Ξ²]
| Mathlib/MeasureTheory/MeasurableSpace/Invariants.lean | 58 | 60 | theorem measurable_invariants_dom {f : Ξ± β Ξ±} {g : Ξ± β Ξ²} :
Measurable[invariants f] g β Measurable g β§ β s, MeasurableSet s β (g β f) β»ΒΉ' s = g β»ΒΉ' s := by |
simp only [Measurable, β forall_and]; rfl
| 1 | 2.718282 | 0 | 0.5 | 2 | 428 |
import Mathlib.Algebra.FreeMonoid.Basic
#align_import algebra.free_monoid.count from "leanprover-community/mathlib"@"a2d2e18906e2b62627646b5d5be856e6a642062f"
variable {Ξ± : Type*} (p : Ξ± β Prop) [DecidablePred p]
namespace FreeAddMonoid
def countP : FreeAddMonoid Ξ± β+ β where
toFun := List.countP p
map_zero' := List.countP_nil _
map_add' := List.countP_append _
#align free_add_monoid.countp FreeAddMonoid.countP
| Mathlib/Algebra/FreeMonoid/Count.lean | 31 | 32 | theorem countP_of (x : Ξ±) : countP p (of x) = if p x = true then 1 else 0 := by |
simp [countP, List.countP, List.countP.go]
| 1 | 2.718282 | 0 | 0.5 | 2 | 429 |
import Mathlib.Algebra.FreeMonoid.Basic
#align_import algebra.free_monoid.count from "leanprover-community/mathlib"@"a2d2e18906e2b62627646b5d5be856e6a642062f"
variable {Ξ± : Type*} (p : Ξ± β Prop) [DecidablePred p]
namespace FreeAddMonoid
def countP : FreeAddMonoid Ξ± β+ β where
toFun := List.countP p
map_zero' := List.countP_nil _
map_add' := List.countP_append _
#align free_add_monoid.countp FreeAddMonoid.countP
theorem countP_of (x : Ξ±) : countP p (of x) = if p x = true then 1 else 0 := by
simp [countP, List.countP, List.countP.go]
#align free_add_monoid.countp_of FreeAddMonoid.countP_of
theorem countP_apply (l : FreeAddMonoid Ξ±) : countP p l = List.countP p l := rfl
#align free_add_monoid.countp_apply FreeAddMonoid.countP_apply
-- Porting note: was (x = Β·)
def count [DecidableEq Ξ±] (x : Ξ±) : FreeAddMonoid Ξ± β+ β := countP (Β· = x)
#align free_add_monoid.count FreeAddMonoid.count
| Mathlib/Algebra/FreeMonoid/Count.lean | 43 | 45 | theorem count_of [DecidableEq Ξ±] (x y : Ξ±) : count x (of y) = (Pi.single x 1 : Ξ± β β) y := by |
simp [Pi.single, Function.update, count, countP, List.countP, List.countP.go,
Bool.beq_eq_decide_eq]
| 2 | 7.389056 | 1 | 0.5 | 2 | 429 |
import Mathlib.Topology.Algebra.Constructions
import Mathlib.Topology.Bases
import Mathlib.Topology.UniformSpace.Basic
#align_import topology.uniform_space.cauchy from "leanprover-community/mathlib"@"22131150f88a2d125713ffa0f4693e3355b1eb49"
universe u v
open scoped Classical
open Filter TopologicalSpace Set UniformSpace Function
open scoped Classical
open Uniformity Topology Filter
variable {Ξ± : Type u} {Ξ² : Type v} [uniformSpace : UniformSpace Ξ±]
def Cauchy (f : Filter Ξ±) :=
NeBot f β§ f ΓΛ’ f β€ π€ Ξ±
#align cauchy Cauchy
def IsComplete (s : Set Ξ±) :=
β f, Cauchy f β f β€ π s β β x β s, f β€ π x
#align is_complete IsComplete
theorem Filter.HasBasis.cauchy_iff {ΞΉ} {p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)} (h : (π€ Ξ±).HasBasis p s)
{f : Filter Ξ±} :
Cauchy f β NeBot f β§ β i, p i β β t β f, β x β t, β y β t, (x, y) β s i :=
and_congr Iff.rfl <|
(f.basis_sets.prod_self.le_basis_iff h).trans <| by
simp only [subset_def, Prod.forall, mem_prod_eq, and_imp, id, forall_mem_comm]
#align filter.has_basis.cauchy_iff Filter.HasBasis.cauchy_iff
theorem cauchy_iff' {f : Filter Ξ±} :
Cauchy f β NeBot f β§ β s β π€ Ξ±, β t β f, β x β t, β y β t, (x, y) β s :=
(π€ Ξ±).basis_sets.cauchy_iff
#align cauchy_iff' cauchy_iff'
theorem cauchy_iff {f : Filter Ξ±} : Cauchy f β NeBot f β§ β s β π€ Ξ±, β t β f, t ΓΛ’ t β s :=
cauchy_iff'.trans <| by
simp only [subset_def, Prod.forall, mem_prod_eq, and_imp, id, forall_mem_comm]
#align cauchy_iff cauchy_iff
lemma cauchy_iff_le {l : Filter Ξ±} [hl : l.NeBot] :
Cauchy l β l ΓΛ’ l β€ π€ Ξ± := by
simp only [Cauchy, hl, true_and]
| Mathlib/Topology/UniformSpace/Cauchy.lean | 63 | 67 | theorem Cauchy.ultrafilter_of {l : Filter Ξ±} (h : Cauchy l) :
Cauchy (@Ultrafilter.of _ l h.1 : Filter Ξ±) := by |
haveI := h.1
have := Ultrafilter.of_le l
exact β¨Ultrafilter.neBot _, (Filter.prod_mono this this).trans h.2β©
| 3 | 20.085537 | 1 | 0.5 | 2 | 430 |
import Mathlib.Topology.Algebra.Constructions
import Mathlib.Topology.Bases
import Mathlib.Topology.UniformSpace.Basic
#align_import topology.uniform_space.cauchy from "leanprover-community/mathlib"@"22131150f88a2d125713ffa0f4693e3355b1eb49"
universe u v
open scoped Classical
open Filter TopologicalSpace Set UniformSpace Function
open scoped Classical
open Uniformity Topology Filter
variable {Ξ± : Type u} {Ξ² : Type v} [uniformSpace : UniformSpace Ξ±]
def Cauchy (f : Filter Ξ±) :=
NeBot f β§ f ΓΛ’ f β€ π€ Ξ±
#align cauchy Cauchy
def IsComplete (s : Set Ξ±) :=
β f, Cauchy f β f β€ π s β β x β s, f β€ π x
#align is_complete IsComplete
theorem Filter.HasBasis.cauchy_iff {ΞΉ} {p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)} (h : (π€ Ξ±).HasBasis p s)
{f : Filter Ξ±} :
Cauchy f β NeBot f β§ β i, p i β β t β f, β x β t, β y β t, (x, y) β s i :=
and_congr Iff.rfl <|
(f.basis_sets.prod_self.le_basis_iff h).trans <| by
simp only [subset_def, Prod.forall, mem_prod_eq, and_imp, id, forall_mem_comm]
#align filter.has_basis.cauchy_iff Filter.HasBasis.cauchy_iff
theorem cauchy_iff' {f : Filter Ξ±} :
Cauchy f β NeBot f β§ β s β π€ Ξ±, β t β f, β x β t, β y β t, (x, y) β s :=
(π€ Ξ±).basis_sets.cauchy_iff
#align cauchy_iff' cauchy_iff'
theorem cauchy_iff {f : Filter Ξ±} : Cauchy f β NeBot f β§ β s β π€ Ξ±, β t β f, t ΓΛ’ t β s :=
cauchy_iff'.trans <| by
simp only [subset_def, Prod.forall, mem_prod_eq, and_imp, id, forall_mem_comm]
#align cauchy_iff cauchy_iff
lemma cauchy_iff_le {l : Filter Ξ±} [hl : l.NeBot] :
Cauchy l β l ΓΛ’ l β€ π€ Ξ± := by
simp only [Cauchy, hl, true_and]
theorem Cauchy.ultrafilter_of {l : Filter Ξ±} (h : Cauchy l) :
Cauchy (@Ultrafilter.of _ l h.1 : Filter Ξ±) := by
haveI := h.1
have := Ultrafilter.of_le l
exact β¨Ultrafilter.neBot _, (Filter.prod_mono this this).trans h.2β©
#align cauchy.ultrafilter_of Cauchy.ultrafilter_of
| Mathlib/Topology/UniformSpace/Cauchy.lean | 70 | 72 | theorem cauchy_map_iff {l : Filter Ξ²} {f : Ξ² β Ξ±} :
Cauchy (l.map f) β NeBot l β§ Tendsto (fun p : Ξ² Γ Ξ² => (f p.1, f p.2)) (l ΓΛ’ l) (π€ Ξ±) := by |
rw [Cauchy, map_neBot_iff, prod_map_map_eq, Tendsto]
| 1 | 2.718282 | 0 | 0.5 | 2 | 430 |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.NormedSpace.WithLp
open Real Set Filter RCLike Bornology Uniformity Topology NNReal ENNReal
noncomputable section
variable (p : ββ₯0β) (π Ξ± Ξ² : Type*)
namespace WithLp
section DistNorm
section EDist
variable [EDist Ξ±] [EDist Ξ²]
open scoped Classical in
instance instProdEDist : EDist (WithLp p (Ξ± Γ Ξ²)) where
edist f g :=
if _hp : p = 0 then
(if edist f.fst g.fst = 0 then 0 else 1) + (if edist f.snd g.snd = 0 then 0 else 1)
else if p = β then
edist f.fst g.fst β edist f.snd g.snd
else
(edist f.fst g.fst ^ p.toReal + edist f.snd g.snd ^ p.toReal) ^ (1 / p.toReal)
variable {p Ξ± Ξ²}
variable (x y : WithLp p (Ξ± Γ Ξ²)) (x' : Ξ± Γ Ξ²)
@[simp]
| Mathlib/Analysis/NormedSpace/ProdLp.lean | 161 | 164 | theorem prod_edist_eq_card (f g : WithLp 0 (Ξ± Γ Ξ²)) :
edist f g =
(if edist f.fst g.fst = 0 then 0 else 1) + (if edist f.snd g.snd = 0 then 0 else 1) := by |
convert if_pos rfl
| 1 | 2.718282 | 0 | 0.5 | 6 | 431 |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.NormedSpace.WithLp
open Real Set Filter RCLike Bornology Uniformity Topology NNReal ENNReal
noncomputable section
variable (p : ββ₯0β) (π Ξ± Ξ² : Type*)
namespace WithLp
section DistNorm
section EDist
variable [EDist Ξ±] [EDist Ξ²]
open scoped Classical in
instance instProdEDist : EDist (WithLp p (Ξ± Γ Ξ²)) where
edist f g :=
if _hp : p = 0 then
(if edist f.fst g.fst = 0 then 0 else 1) + (if edist f.snd g.snd = 0 then 0 else 1)
else if p = β then
edist f.fst g.fst β edist f.snd g.snd
else
(edist f.fst g.fst ^ p.toReal + edist f.snd g.snd ^ p.toReal) ^ (1 / p.toReal)
variable {p Ξ± Ξ²}
variable (x y : WithLp p (Ξ± Γ Ξ²)) (x' : Ξ± Γ Ξ²)
@[simp]
theorem prod_edist_eq_card (f g : WithLp 0 (Ξ± Γ Ξ²)) :
edist f g =
(if edist f.fst g.fst = 0 then 0 else 1) + (if edist f.snd g.snd = 0 then 0 else 1) := by
convert if_pos rfl
theorem prod_edist_eq_add (hp : 0 < p.toReal) (f g : WithLp p (Ξ± Γ Ξ²)) :
edist f g = (edist f.fst g.fst ^ p.toReal + edist f.snd g.snd ^ p.toReal) ^ (1 / p.toReal) :=
let hp' := ENNReal.toReal_pos_iff.mp hp
(if_neg hp'.1.ne').trans (if_neg hp'.2.ne)
| Mathlib/Analysis/NormedSpace/ProdLp.lean | 171 | 174 | theorem prod_edist_eq_sup (f g : WithLp β (Ξ± Γ Ξ²)) :
edist f g = edist f.fst g.fst β edist f.snd g.snd := by |
dsimp [edist]
exact if_neg ENNReal.top_ne_zero
| 2 | 7.389056 | 1 | 0.5 | 6 | 431 |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.NormedSpace.WithLp
open Real Set Filter RCLike Bornology Uniformity Topology NNReal ENNReal
noncomputable section
variable (p : ββ₯0β) (π Ξ± Ξ² : Type*)
namespace WithLp
section DistNorm
section Dist
variable [Dist Ξ±] [Dist Ξ²]
open scoped Classical in
instance instProdDist : Dist (WithLp p (Ξ± Γ Ξ²)) where
dist f g :=
if _hp : p = 0 then
(if dist f.fst g.fst = 0 then 0 else 1) + (if dist f.snd g.snd = 0 then 0 else 1)
else if p = β then
dist f.fst g.fst β dist f.snd g.snd
else
(dist f.fst g.fst ^ p.toReal + dist f.snd g.snd ^ p.toReal) ^ (1 / p.toReal)
variable {p Ξ± Ξ²}
| Mathlib/Analysis/NormedSpace/ProdLp.lean | 231 | 233 | theorem prod_dist_eq_card (f g : WithLp 0 (Ξ± Γ Ξ²)) : dist f g =
(if dist f.fst g.fst = 0 then 0 else 1) + (if dist f.snd g.snd = 0 then 0 else 1) := by |
convert if_pos rfl
| 1 | 2.718282 | 0 | 0.5 | 6 | 431 |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.NormedSpace.WithLp
open Real Set Filter RCLike Bornology Uniformity Topology NNReal ENNReal
noncomputable section
variable (p : ββ₯0β) (π Ξ± Ξ² : Type*)
namespace WithLp
section DistNorm
section Dist
variable [Dist Ξ±] [Dist Ξ²]
open scoped Classical in
instance instProdDist : Dist (WithLp p (Ξ± Γ Ξ²)) where
dist f g :=
if _hp : p = 0 then
(if dist f.fst g.fst = 0 then 0 else 1) + (if dist f.snd g.snd = 0 then 0 else 1)
else if p = β then
dist f.fst g.fst β dist f.snd g.snd
else
(dist f.fst g.fst ^ p.toReal + dist f.snd g.snd ^ p.toReal) ^ (1 / p.toReal)
variable {p Ξ± Ξ²}
theorem prod_dist_eq_card (f g : WithLp 0 (Ξ± Γ Ξ²)) : dist f g =
(if dist f.fst g.fst = 0 then 0 else 1) + (if dist f.snd g.snd = 0 then 0 else 1) := by
convert if_pos rfl
theorem prod_dist_eq_add (hp : 0 < p.toReal) (f g : WithLp p (Ξ± Γ Ξ²)) :
dist f g = (dist f.fst g.fst ^ p.toReal + dist f.snd g.snd ^ p.toReal) ^ (1 / p.toReal) :=
let hp' := ENNReal.toReal_pos_iff.mp hp
(if_neg hp'.1.ne').trans (if_neg hp'.2.ne)
| Mathlib/Analysis/NormedSpace/ProdLp.lean | 240 | 243 | theorem prod_dist_eq_sup (f g : WithLp β (Ξ± Γ Ξ²)) :
dist f g = dist f.fst g.fst β dist f.snd g.snd := by |
dsimp [dist]
exact if_neg ENNReal.top_ne_zero
| 2 | 7.389056 | 1 | 0.5 | 6 | 431 |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.NormedSpace.WithLp
open Real Set Filter RCLike Bornology Uniformity Topology NNReal ENNReal
noncomputable section
variable (p : ββ₯0β) (π Ξ± Ξ² : Type*)
namespace WithLp
section DistNorm
section Norm
variable [Norm Ξ±] [Norm Ξ²]
open scoped Classical in
instance instProdNorm : Norm (WithLp p (Ξ± Γ Ξ²)) where
norm f :=
if _hp : p = 0 then
(if βf.fstβ = 0 then 0 else 1) + (if βf.sndβ = 0 then 0 else 1)
else if p = β then
βf.fstβ β βf.sndβ
else
(βf.fstβ ^ p.toReal + βf.sndβ ^ p.toReal) ^ (1 / p.toReal)
variable {p Ξ± Ξ²}
@[simp]
| Mathlib/Analysis/NormedSpace/ProdLp.lean | 270 | 272 | theorem prod_norm_eq_card (f : WithLp 0 (Ξ± Γ Ξ²)) :
βfβ = (if βf.fstβ = 0 then 0 else 1) + (if βf.sndβ = 0 then 0 else 1) := by |
convert if_pos rfl
| 1 | 2.718282 | 0 | 0.5 | 6 | 431 |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.NormedSpace.WithLp
open Real Set Filter RCLike Bornology Uniformity Topology NNReal ENNReal
noncomputable section
variable (p : ββ₯0β) (π Ξ± Ξ² : Type*)
namespace WithLp
section DistNorm
section Norm
variable [Norm Ξ±] [Norm Ξ²]
open scoped Classical in
instance instProdNorm : Norm (WithLp p (Ξ± Γ Ξ²)) where
norm f :=
if _hp : p = 0 then
(if βf.fstβ = 0 then 0 else 1) + (if βf.sndβ = 0 then 0 else 1)
else if p = β then
βf.fstβ β βf.sndβ
else
(βf.fstβ ^ p.toReal + βf.sndβ ^ p.toReal) ^ (1 / p.toReal)
variable {p Ξ± Ξ²}
@[simp]
theorem prod_norm_eq_card (f : WithLp 0 (Ξ± Γ Ξ²)) :
βfβ = (if βf.fstβ = 0 then 0 else 1) + (if βf.sndβ = 0 then 0 else 1) := by
convert if_pos rfl
| Mathlib/Analysis/NormedSpace/ProdLp.lean | 274 | 276 | theorem prod_norm_eq_sup (f : WithLp β (Ξ± Γ Ξ²)) : βfβ = βf.fstβ β βf.sndβ := by |
dsimp [Norm.norm]
exact if_neg ENNReal.top_ne_zero
| 2 | 7.389056 | 1 | 0.5 | 6 | 431 |
import Mathlib.CategoryTheory.Comma.Basic
import Mathlib.CategoryTheory.PUnit
import Mathlib.CategoryTheory.Limits.Shapes.Terminal
import Mathlib.CategoryTheory.EssentiallySmall
import Mathlib.Logic.Small.Set
#align_import category_theory.structured_arrow from "leanprover-community/mathlib"@"8a318021995877a44630c898d0b2bc376fceef3b"
namespace CategoryTheory
-- morphism levels before object levels. See note [CategoryTheory universes].
universe vβ vβ vβ vβ uβ uβ uβ uβ
variable {C : Type uβ} [Category.{vβ} C] {D : Type uβ} [Category.{vβ} D]
-- We explicitly come from `PUnit.{1}` here to obtain the correct universe for morphisms of
-- structured arrows.
-- Porting note(#5171): linter not ported yet
-- @[nolint has_nonempty_instance]
def StructuredArrow (S : D) (T : C β₯€ D) :=
Comma (Functor.fromPUnit.{0} S) T
#align category_theory.structured_arrow CategoryTheory.StructuredArrow
-- Porting note: not found by inferInstance
instance (S : D) (T : C β₯€ D) : Category (StructuredArrow S T) := commaCategory
namespace StructuredArrow
@[simps!]
def proj (S : D) (T : C β₯€ D) : StructuredArrow S T β₯€ C :=
Comma.snd _ _
#align category_theory.structured_arrow.proj CategoryTheory.StructuredArrow.proj
variable {S S' S'' : D} {Y Y' Y'' : C} {T T' : C β₯€ D}
-- Porting note: this lemma was added because `Comma.hom_ext`
-- was not triggered automatically
-- See https://github.com/leanprover-community/mathlib4/issues/5229
@[ext]
lemma hom_ext {X Y : StructuredArrow S T} (f g : X βΆ Y) (h : f.right = g.right) : f = g :=
CommaMorphism.ext _ _ (Subsingleton.elim _ _) h
@[simp]
theorem hom_eq_iff {X Y : StructuredArrow S T} (f g : X βΆ Y) : f = g β f.right = g.right :=
β¨fun h β¦ by rw [h], hom_ext _ _β©
def mk (f : S βΆ T.obj Y) : StructuredArrow S T :=
β¨β¨β¨β©β©, Y, fβ©
#align category_theory.structured_arrow.mk CategoryTheory.StructuredArrow.mk
@[simp]
theorem mk_left (f : S βΆ T.obj Y) : (mk f).left = β¨β¨β©β© :=
rfl
#align category_theory.structured_arrow.mk_left CategoryTheory.StructuredArrow.mk_left
@[simp]
theorem mk_right (f : S βΆ T.obj Y) : (mk f).right = Y :=
rfl
#align category_theory.structured_arrow.mk_right CategoryTheory.StructuredArrow.mk_right
@[simp]
theorem mk_hom_eq_self (f : S βΆ T.obj Y) : (mk f).hom = f :=
rfl
#align category_theory.structured_arrow.mk_hom_eq_self CategoryTheory.StructuredArrow.mk_hom_eq_self
@[reassoc (attr := simp)]
| Mathlib/CategoryTheory/Comma/StructuredArrow.lean | 90 | 91 | theorem w {A B : StructuredArrow S T} (f : A βΆ B) : A.hom β« T.map f.right = B.hom := by |
have := f.w; aesop_cat
| 1 | 2.718282 | 0 | 0.5 | 2 | 432 |
import Mathlib.CategoryTheory.Comma.Basic
import Mathlib.CategoryTheory.PUnit
import Mathlib.CategoryTheory.Limits.Shapes.Terminal
import Mathlib.CategoryTheory.EssentiallySmall
import Mathlib.Logic.Small.Set
#align_import category_theory.structured_arrow from "leanprover-community/mathlib"@"8a318021995877a44630c898d0b2bc376fceef3b"
namespace CategoryTheory
-- morphism levels before object levels. See note [CategoryTheory universes].
universe vβ vβ vβ vβ uβ uβ uβ uβ
variable {C : Type uβ} [Category.{vβ} C] {D : Type uβ} [Category.{vβ} D]
-- We explicitly come from `PUnit.{1}` here to obtain the correct universe for morphisms of
-- structured arrows.
-- Porting note(#5171): linter not ported yet
-- @[nolint has_nonempty_instance]
def StructuredArrow (S : D) (T : C β₯€ D) :=
Comma (Functor.fromPUnit.{0} S) T
#align category_theory.structured_arrow CategoryTheory.StructuredArrow
-- Porting note: not found by inferInstance
instance (S : D) (T : C β₯€ D) : Category (StructuredArrow S T) := commaCategory
namespace StructuredArrow
@[simps!]
def proj (S : D) (T : C β₯€ D) : StructuredArrow S T β₯€ C :=
Comma.snd _ _
#align category_theory.structured_arrow.proj CategoryTheory.StructuredArrow.proj
variable {S S' S'' : D} {Y Y' Y'' : C} {T T' : C β₯€ D}
-- Porting note: this lemma was added because `Comma.hom_ext`
-- was not triggered automatically
-- See https://github.com/leanprover-community/mathlib4/issues/5229
@[ext]
lemma hom_ext {X Y : StructuredArrow S T} (f g : X βΆ Y) (h : f.right = g.right) : f = g :=
CommaMorphism.ext _ _ (Subsingleton.elim _ _) h
@[simp]
theorem hom_eq_iff {X Y : StructuredArrow S T} (f g : X βΆ Y) : f = g β f.right = g.right :=
β¨fun h β¦ by rw [h], hom_ext _ _β©
def mk (f : S βΆ T.obj Y) : StructuredArrow S T :=
β¨β¨β¨β©β©, Y, fβ©
#align category_theory.structured_arrow.mk CategoryTheory.StructuredArrow.mk
@[simp]
theorem mk_left (f : S βΆ T.obj Y) : (mk f).left = β¨β¨β©β© :=
rfl
#align category_theory.structured_arrow.mk_left CategoryTheory.StructuredArrow.mk_left
@[simp]
theorem mk_right (f : S βΆ T.obj Y) : (mk f).right = Y :=
rfl
#align category_theory.structured_arrow.mk_right CategoryTheory.StructuredArrow.mk_right
@[simp]
theorem mk_hom_eq_self (f : S βΆ T.obj Y) : (mk f).hom = f :=
rfl
#align category_theory.structured_arrow.mk_hom_eq_self CategoryTheory.StructuredArrow.mk_hom_eq_self
@[reassoc (attr := simp)]
theorem w {A B : StructuredArrow S T} (f : A βΆ B) : A.hom β« T.map f.right = B.hom := by
have := f.w; aesop_cat
#align category_theory.structured_arrow.w CategoryTheory.StructuredArrow.w
@[simp]
theorem comp_right {X Y Z : StructuredArrow S T} (f : X βΆ Y) (g : Y βΆ Z) :
(f β« g).right = f.right β« g.right := rfl
@[simp]
theorem id_right (X : StructuredArrow S T) : (π X : X βΆ X).right = π X.right := rfl
@[simp]
| Mathlib/CategoryTheory/Comma/StructuredArrow.lean | 102 | 105 | theorem eqToHom_right {X Y : StructuredArrow S T} (h : X = Y) :
(eqToHom h).right = eqToHom (by rw [h]) := by |
subst h
simp only [eqToHom_refl, id_right]
| 2 | 7.389056 | 1 | 0.5 | 2 | 432 |
import Mathlib.Algebra.Module.Submodule.Ker
#align_import linear_algebra.basic from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb"
variable {R : Type*} {Rβ : Type*}
variable {M : Type*} {Mβ : Type*}
namespace LinearMap
section AddCommMonoid
variable [Semiring R] [Semiring Rβ]
variable [AddCommMonoid M] [AddCommMonoid Mβ]
variable [Module R M] [Module Rβ Mβ]
open Submodule
variable {Οββ : R β+* Rβ}
section
variable {F : Type*} [FunLike F M Mβ] [SemilinearMapClass F Οββ M Mβ]
def eqLocus (f g : F) : Submodule R M :=
{ (f : M β+ Mβ).eqLocusM g with
carrier := { x | f x = g x }
smul_mem' := fun {r} {x} (hx : _ = _) => show _ = _ by
-- Note: #8386 changed `map_smulββ` into `map_smulββ _`
simpa only [map_smulββ _] using congr_arg (Οββ r β’ Β·) hx }
#align linear_map.eq_locus LinearMap.eqLocus
@[simp]
theorem mem_eqLocus {x : M} {f g : F} : x β eqLocus f g β f x = g x :=
Iff.rfl
#align linear_map.mem_eq_locus LinearMap.mem_eqLocus
theorem eqLocus_toAddSubmonoid (f g : F) :
(eqLocus f g).toAddSubmonoid = (f : M β+ Mβ).eqLocusM g :=
rfl
#align linear_map.eq_locus_to_add_submonoid LinearMap.eqLocus_toAddSubmonoid
@[simp]
| Mathlib/Algebra/Module/Submodule/EqLocus.lean | 64 | 65 | theorem eqLocus_eq_top {f g : F} : eqLocus f g = β€ β f = g := by |
simp [SetLike.ext_iff, DFunLike.ext_iff]
| 1 | 2.718282 | 0 | 0.5 | 2 | 433 |
import Mathlib.Algebra.Module.Submodule.Ker
#align_import linear_algebra.basic from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb"
variable {R : Type*} {Rβ : Type*}
variable {M : Type*} {Mβ : Type*}
namespace LinearMap
section AddCommMonoid
variable [Semiring R] [Semiring Rβ]
variable [AddCommMonoid M] [AddCommMonoid Mβ]
variable [Module R M] [Module Rβ Mβ]
open Submodule
variable {Οββ : R β+* Rβ}
section
variable {F : Type*} [FunLike F M Mβ] [SemilinearMapClass F Οββ M Mβ]
def eqLocus (f g : F) : Submodule R M :=
{ (f : M β+ Mβ).eqLocusM g with
carrier := { x | f x = g x }
smul_mem' := fun {r} {x} (hx : _ = _) => show _ = _ by
-- Note: #8386 changed `map_smulββ` into `map_smulββ _`
simpa only [map_smulββ _] using congr_arg (Οββ r β’ Β·) hx }
#align linear_map.eq_locus LinearMap.eqLocus
@[simp]
theorem mem_eqLocus {x : M} {f g : F} : x β eqLocus f g β f x = g x :=
Iff.rfl
#align linear_map.mem_eq_locus LinearMap.mem_eqLocus
theorem eqLocus_toAddSubmonoid (f g : F) :
(eqLocus f g).toAddSubmonoid = (f : M β+ Mβ).eqLocusM g :=
rfl
#align linear_map.eq_locus_to_add_submonoid LinearMap.eqLocus_toAddSubmonoid
@[simp]
theorem eqLocus_eq_top {f g : F} : eqLocus f g = β€ β f = g := by
simp [SetLike.ext_iff, DFunLike.ext_iff]
@[simp]
theorem eqLocus_same (f : F) : eqLocus f f = β€ := eqLocus_eq_top.2 rfl
#align linear_map.eq_locus_same LinearMap.eqLocus_same
theorem le_eqLocus {f g : F} {S : Submodule R M} : S β€ eqLocus f g β Set.EqOn f g S := Iff.rfl
| Mathlib/Algebra/Module/Submodule/EqLocus.lean | 73 | 76 | theorem eqOn_sup {f g : F} {S T : Submodule R M} (hS : Set.EqOn f g S) (hT : Set.EqOn f g T) :
Set.EqOn f g β(S β T) := by |
rw [β le_eqLocus] at hS hT β’
exact sup_le hS hT
| 2 | 7.389056 | 1 | 0.5 | 2 | 433 |
import Mathlib.Analysis.Normed.Field.Basic
#align_import analysis.normed_space.int from "leanprover-community/mathlib"@"5cc2dfdd3e92f340411acea4427d701dc7ed26f8"
namespace Int
| Mathlib/Analysis/NormedSpace/Int.lean | 24 | 26 | theorem nnnorm_coe_units (e : β€Λ£) : β(e : β€)ββ = 1 := by |
obtain rfl | rfl := units_eq_one_or e <;>
simp only [Units.coe_neg_one, Units.val_one, nnnorm_neg, nnnorm_one]
| 2 | 7.389056 | 1 | 0.5 | 4 | 434 |
import Mathlib.Analysis.Normed.Field.Basic
#align_import analysis.normed_space.int from "leanprover-community/mathlib"@"5cc2dfdd3e92f340411acea4427d701dc7ed26f8"
namespace Int
theorem nnnorm_coe_units (e : β€Λ£) : β(e : β€)ββ = 1 := by
obtain rfl | rfl := units_eq_one_or e <;>
simp only [Units.coe_neg_one, Units.val_one, nnnorm_neg, nnnorm_one]
#align int.nnnorm_coe_units Int.nnnorm_coe_units
| Mathlib/Analysis/NormedSpace/Int.lean | 29 | 30 | theorem norm_coe_units (e : β€Λ£) : β(e : β€)β = 1 := by |
rw [β coe_nnnorm, nnnorm_coe_units, NNReal.coe_one]
| 1 | 2.718282 | 0 | 0.5 | 4 | 434 |
import Mathlib.Analysis.Normed.Field.Basic
#align_import analysis.normed_space.int from "leanprover-community/mathlib"@"5cc2dfdd3e92f340411acea4427d701dc7ed26f8"
namespace Int
theorem nnnorm_coe_units (e : β€Λ£) : β(e : β€)ββ = 1 := by
obtain rfl | rfl := units_eq_one_or e <;>
simp only [Units.coe_neg_one, Units.val_one, nnnorm_neg, nnnorm_one]
#align int.nnnorm_coe_units Int.nnnorm_coe_units
theorem norm_coe_units (e : β€Λ£) : β(e : β€)β = 1 := by
rw [β coe_nnnorm, nnnorm_coe_units, NNReal.coe_one]
#align int.norm_coe_units Int.norm_coe_units
@[simp]
theorem nnnorm_natCast (n : β) : β(n : β€)ββ = n :=
Real.nnnorm_natCast _
#align int.nnnorm_coe_nat Int.nnnorm_natCast
@[deprecated (since := "2024-04-05")] alias nnnorm_coe_nat := nnnorm_natCast
@[simp]
| Mathlib/Analysis/NormedSpace/Int.lean | 41 | 42 | theorem toNat_add_toNat_neg_eq_nnnorm (n : β€) : βn.toNat + β(-n).toNat = βnββ := by |
rw [β Nat.cast_add, toNat_add_toNat_neg_eq_natAbs, NNReal.natCast_natAbs]
| 1 | 2.718282 | 0 | 0.5 | 4 | 434 |
import Mathlib.Analysis.Normed.Field.Basic
#align_import analysis.normed_space.int from "leanprover-community/mathlib"@"5cc2dfdd3e92f340411acea4427d701dc7ed26f8"
namespace Int
theorem nnnorm_coe_units (e : β€Λ£) : β(e : β€)ββ = 1 := by
obtain rfl | rfl := units_eq_one_or e <;>
simp only [Units.coe_neg_one, Units.val_one, nnnorm_neg, nnnorm_one]
#align int.nnnorm_coe_units Int.nnnorm_coe_units
theorem norm_coe_units (e : β€Λ£) : β(e : β€)β = 1 := by
rw [β coe_nnnorm, nnnorm_coe_units, NNReal.coe_one]
#align int.norm_coe_units Int.norm_coe_units
@[simp]
theorem nnnorm_natCast (n : β) : β(n : β€)ββ = n :=
Real.nnnorm_natCast _
#align int.nnnorm_coe_nat Int.nnnorm_natCast
@[deprecated (since := "2024-04-05")] alias nnnorm_coe_nat := nnnorm_natCast
@[simp]
theorem toNat_add_toNat_neg_eq_nnnorm (n : β€) : βn.toNat + β(-n).toNat = βnββ := by
rw [β Nat.cast_add, toNat_add_toNat_neg_eq_natAbs, NNReal.natCast_natAbs]
#align int.to_nat_add_to_nat_neg_eq_nnnorm Int.toNat_add_toNat_neg_eq_nnnorm
@[simp]
| Mathlib/Analysis/NormedSpace/Int.lean | 46 | 48 | theorem toNat_add_toNat_neg_eq_norm (n : β€) : βn.toNat + β(-n).toNat = βnβ := by |
simpa only [NNReal.coe_natCast, NNReal.coe_add] using
congrArg NNReal.toReal (toNat_add_toNat_neg_eq_nnnorm n)
| 2 | 7.389056 | 1 | 0.5 | 4 | 434 |
import Mathlib.Data.Nat.Count
import Mathlib.Data.Nat.SuccPred
import Mathlib.Order.Interval.Set.Monotone
import Mathlib.Order.OrderIsoNat
#align_import data.nat.nth from "leanprover-community/mathlib"@"7fdd4f3746cb059edfdb5d52cba98f66fce418c0"
open Finset
namespace Nat
variable (p : β β Prop)
noncomputable def nth (p : β β Prop) (n : β) : β := by
classical exact
if h : Set.Finite (setOf p) then (h.toFinset.sort (Β· β€ Β·)).getD n 0
else @Nat.Subtype.orderIsoOfNat (setOf p) (Set.Infinite.to_subtype h) n
#align nat.nth Nat.nth
variable {p}
| Mathlib/Data/Nat/Nth.lean | 62 | 63 | theorem nth_of_card_le (hf : (setOf p).Finite) {n : β} (hn : hf.toFinset.card β€ n) :
nth p n = 0 := by | rw [nth, dif_pos hf, List.getD_eq_default]; rwa [Finset.length_sort]
| 1 | 2.718282 | 0 | 0.5 | 6 | 435 |
import Mathlib.Data.Nat.Count
import Mathlib.Data.Nat.SuccPred
import Mathlib.Order.Interval.Set.Monotone
import Mathlib.Order.OrderIsoNat
#align_import data.nat.nth from "leanprover-community/mathlib"@"7fdd4f3746cb059edfdb5d52cba98f66fce418c0"
open Finset
namespace Nat
variable (p : β β Prop)
noncomputable def nth (p : β β Prop) (n : β) : β := by
classical exact
if h : Set.Finite (setOf p) then (h.toFinset.sort (Β· β€ Β·)).getD n 0
else @Nat.Subtype.orderIsoOfNat (setOf p) (Set.Infinite.to_subtype h) n
#align nat.nth Nat.nth
variable {p}
theorem nth_of_card_le (hf : (setOf p).Finite) {n : β} (hn : hf.toFinset.card β€ n) :
nth p n = 0 := by rw [nth, dif_pos hf, List.getD_eq_default]; rwa [Finset.length_sort]
#align nat.nth_of_card_le Nat.nth_of_card_le
theorem nth_eq_getD_sort (h : (setOf p).Finite) (n : β) :
nth p n = (h.toFinset.sort (Β· β€ Β·)).getD n 0 :=
dif_pos h
#align nat.nth_eq_nthd_sort Nat.nth_eq_getD_sort
| Mathlib/Data/Nat/Nth.lean | 71 | 73 | theorem nth_eq_orderEmbOfFin (hf : (setOf p).Finite) {n : β} (hn : n < hf.toFinset.card) :
nth p n = hf.toFinset.orderEmbOfFin rfl β¨n, hnβ© := by |
rw [nth_eq_getD_sort hf, Finset.orderEmbOfFin_apply, List.getD_eq_get]
| 1 | 2.718282 | 0 | 0.5 | 6 | 435 |
import Mathlib.Data.Nat.Count
import Mathlib.Data.Nat.SuccPred
import Mathlib.Order.Interval.Set.Monotone
import Mathlib.Order.OrderIsoNat
#align_import data.nat.nth from "leanprover-community/mathlib"@"7fdd4f3746cb059edfdb5d52cba98f66fce418c0"
open Finset
namespace Nat
variable (p : β β Prop)
noncomputable def nth (p : β β Prop) (n : β) : β := by
classical exact
if h : Set.Finite (setOf p) then (h.toFinset.sort (Β· β€ Β·)).getD n 0
else @Nat.Subtype.orderIsoOfNat (setOf p) (Set.Infinite.to_subtype h) n
#align nat.nth Nat.nth
variable {p}
theorem nth_of_card_le (hf : (setOf p).Finite) {n : β} (hn : hf.toFinset.card β€ n) :
nth p n = 0 := by rw [nth, dif_pos hf, List.getD_eq_default]; rwa [Finset.length_sort]
#align nat.nth_of_card_le Nat.nth_of_card_le
theorem nth_eq_getD_sort (h : (setOf p).Finite) (n : β) :
nth p n = (h.toFinset.sort (Β· β€ Β·)).getD n 0 :=
dif_pos h
#align nat.nth_eq_nthd_sort Nat.nth_eq_getD_sort
theorem nth_eq_orderEmbOfFin (hf : (setOf p).Finite) {n : β} (hn : n < hf.toFinset.card) :
nth p n = hf.toFinset.orderEmbOfFin rfl β¨n, hnβ© := by
rw [nth_eq_getD_sort hf, Finset.orderEmbOfFin_apply, List.getD_eq_get]
#align nat.nth_eq_order_emb_of_fin Nat.nth_eq_orderEmbOfFin
| Mathlib/Data/Nat/Nth.lean | 76 | 80 | theorem nth_strictMonoOn (hf : (setOf p).Finite) :
StrictMonoOn (nth p) (Set.Iio hf.toFinset.card) := by |
rintro m (hm : m < _) n (hn : n < _) h
simp only [nth_eq_orderEmbOfFin, *]
exact OrderEmbedding.strictMono _ h
| 3 | 20.085537 | 1 | 0.5 | 6 | 435 |
import Mathlib.Data.Nat.Count
import Mathlib.Data.Nat.SuccPred
import Mathlib.Order.Interval.Set.Monotone
import Mathlib.Order.OrderIsoNat
#align_import data.nat.nth from "leanprover-community/mathlib"@"7fdd4f3746cb059edfdb5d52cba98f66fce418c0"
open Finset
namespace Nat
variable (p : β β Prop)
noncomputable def nth (p : β β Prop) (n : β) : β := by
classical exact
if h : Set.Finite (setOf p) then (h.toFinset.sort (Β· β€ Β·)).getD n 0
else @Nat.Subtype.orderIsoOfNat (setOf p) (Set.Infinite.to_subtype h) n
#align nat.nth Nat.nth
variable {p}
theorem nth_of_card_le (hf : (setOf p).Finite) {n : β} (hn : hf.toFinset.card β€ n) :
nth p n = 0 := by rw [nth, dif_pos hf, List.getD_eq_default]; rwa [Finset.length_sort]
#align nat.nth_of_card_le Nat.nth_of_card_le
theorem nth_eq_getD_sort (h : (setOf p).Finite) (n : β) :
nth p n = (h.toFinset.sort (Β· β€ Β·)).getD n 0 :=
dif_pos h
#align nat.nth_eq_nthd_sort Nat.nth_eq_getD_sort
theorem nth_eq_orderEmbOfFin (hf : (setOf p).Finite) {n : β} (hn : n < hf.toFinset.card) :
nth p n = hf.toFinset.orderEmbOfFin rfl β¨n, hnβ© := by
rw [nth_eq_getD_sort hf, Finset.orderEmbOfFin_apply, List.getD_eq_get]
#align nat.nth_eq_order_emb_of_fin Nat.nth_eq_orderEmbOfFin
theorem nth_strictMonoOn (hf : (setOf p).Finite) :
StrictMonoOn (nth p) (Set.Iio hf.toFinset.card) := by
rintro m (hm : m < _) n (hn : n < _) h
simp only [nth_eq_orderEmbOfFin, *]
exact OrderEmbedding.strictMono _ h
#align nat.nth_strict_mono_on Nat.nth_strictMonoOn
theorem nth_lt_nth_of_lt_card (hf : (setOf p).Finite) {m n : β} (h : m < n)
(hn : n < hf.toFinset.card) : nth p m < nth p n :=
nth_strictMonoOn hf (h.trans hn) hn h
#align nat.nth_lt_nth_of_lt_card Nat.nth_lt_nth_of_lt_card
theorem nth_le_nth_of_lt_card (hf : (setOf p).Finite) {m n : β} (h : m β€ n)
(hn : n < hf.toFinset.card) : nth p m β€ nth p n :=
(nth_strictMonoOn hf).monotoneOn (h.trans_lt hn) hn h
#align nat.nth_le_nth_of_lt_card Nat.nth_le_nth_of_lt_card
theorem lt_of_nth_lt_nth_of_lt_card (hf : (setOf p).Finite) {m n : β} (h : nth p m < nth p n)
(hm : m < hf.toFinset.card) : m < n :=
not_le.1 fun hle => h.not_le <| nth_le_nth_of_lt_card hf hle hm
#align nat.lt_of_nth_lt_nth_of_lt_card Nat.lt_of_nth_lt_nth_of_lt_card
theorem le_of_nth_le_nth_of_lt_card (hf : (setOf p).Finite) {m n : β} (h : nth p m β€ nth p n)
(hm : m < hf.toFinset.card) : m β€ n :=
not_lt.1 fun hlt => h.not_lt <| nth_lt_nth_of_lt_card hf hlt hm
#align nat.le_of_nth_le_nth_of_lt_card Nat.le_of_nth_le_nth_of_lt_card
theorem nth_injOn (hf : (setOf p).Finite) : (Set.Iio hf.toFinset.card).InjOn (nth p) :=
(nth_strictMonoOn hf).injOn
#align nat.nth_inj_on Nat.nth_injOn
theorem range_nth_of_finite (hf : (setOf p).Finite) : Set.range (nth p) = insert 0 (setOf p) := by
simpa only [β nth_eq_getD_sort hf, mem_sort, Set.Finite.mem_toFinset]
using Set.range_list_getD (hf.toFinset.sort (Β· β€ Β·)) 0
#align nat.range_nth_of_finite Nat.range_nth_of_finite
@[simp]
| Mathlib/Data/Nat/Nth.lean | 113 | 119 | theorem image_nth_Iio_card (hf : (setOf p).Finite) : nth p '' Set.Iio hf.toFinset.card = setOf p :=
calc
nth p '' Set.Iio hf.toFinset.card = Set.range (hf.toFinset.orderEmbOfFin rfl) := by |
ext x
simp only [Set.mem_image, Set.mem_range, Fin.exists_iff, β nth_eq_orderEmbOfFin hf,
Set.mem_Iio, exists_prop]
_ = setOf p := by rw [range_orderEmbOfFin, Set.Finite.coe_toFinset]
| 4 | 54.59815 | 2 | 0.5 | 6 | 435 |
import Mathlib.Data.Nat.Count
import Mathlib.Data.Nat.SuccPred
import Mathlib.Order.Interval.Set.Monotone
import Mathlib.Order.OrderIsoNat
#align_import data.nat.nth from "leanprover-community/mathlib"@"7fdd4f3746cb059edfdb5d52cba98f66fce418c0"
open Finset
namespace Nat
variable (p : β β Prop)
noncomputable def nth (p : β β Prop) (n : β) : β := by
classical exact
if h : Set.Finite (setOf p) then (h.toFinset.sort (Β· β€ Β·)).getD n 0
else @Nat.Subtype.orderIsoOfNat (setOf p) (Set.Infinite.to_subtype h) n
#align nat.nth Nat.nth
variable {p}
theorem nth_of_card_le (hf : (setOf p).Finite) {n : β} (hn : hf.toFinset.card β€ n) :
nth p n = 0 := by rw [nth, dif_pos hf, List.getD_eq_default]; rwa [Finset.length_sort]
#align nat.nth_of_card_le Nat.nth_of_card_le
theorem nth_eq_getD_sort (h : (setOf p).Finite) (n : β) :
nth p n = (h.toFinset.sort (Β· β€ Β·)).getD n 0 :=
dif_pos h
#align nat.nth_eq_nthd_sort Nat.nth_eq_getD_sort
theorem nth_eq_orderEmbOfFin (hf : (setOf p).Finite) {n : β} (hn : n < hf.toFinset.card) :
nth p n = hf.toFinset.orderEmbOfFin rfl β¨n, hnβ© := by
rw [nth_eq_getD_sort hf, Finset.orderEmbOfFin_apply, List.getD_eq_get]
#align nat.nth_eq_order_emb_of_fin Nat.nth_eq_orderEmbOfFin
theorem nth_strictMonoOn (hf : (setOf p).Finite) :
StrictMonoOn (nth p) (Set.Iio hf.toFinset.card) := by
rintro m (hm : m < _) n (hn : n < _) h
simp only [nth_eq_orderEmbOfFin, *]
exact OrderEmbedding.strictMono _ h
#align nat.nth_strict_mono_on Nat.nth_strictMonoOn
theorem nth_lt_nth_of_lt_card (hf : (setOf p).Finite) {m n : β} (h : m < n)
(hn : n < hf.toFinset.card) : nth p m < nth p n :=
nth_strictMonoOn hf (h.trans hn) hn h
#align nat.nth_lt_nth_of_lt_card Nat.nth_lt_nth_of_lt_card
theorem nth_le_nth_of_lt_card (hf : (setOf p).Finite) {m n : β} (h : m β€ n)
(hn : n < hf.toFinset.card) : nth p m β€ nth p n :=
(nth_strictMonoOn hf).monotoneOn (h.trans_lt hn) hn h
#align nat.nth_le_nth_of_lt_card Nat.nth_le_nth_of_lt_card
theorem lt_of_nth_lt_nth_of_lt_card (hf : (setOf p).Finite) {m n : β} (h : nth p m < nth p n)
(hm : m < hf.toFinset.card) : m < n :=
not_le.1 fun hle => h.not_le <| nth_le_nth_of_lt_card hf hle hm
#align nat.lt_of_nth_lt_nth_of_lt_card Nat.lt_of_nth_lt_nth_of_lt_card
theorem le_of_nth_le_nth_of_lt_card (hf : (setOf p).Finite) {m n : β} (h : nth p m β€ nth p n)
(hm : m < hf.toFinset.card) : m β€ n :=
not_lt.1 fun hlt => h.not_lt <| nth_lt_nth_of_lt_card hf hlt hm
#align nat.le_of_nth_le_nth_of_lt_card Nat.le_of_nth_le_nth_of_lt_card
theorem nth_injOn (hf : (setOf p).Finite) : (Set.Iio hf.toFinset.card).InjOn (nth p) :=
(nth_strictMonoOn hf).injOn
#align nat.nth_inj_on Nat.nth_injOn
theorem range_nth_of_finite (hf : (setOf p).Finite) : Set.range (nth p) = insert 0 (setOf p) := by
simpa only [β nth_eq_getD_sort hf, mem_sort, Set.Finite.mem_toFinset]
using Set.range_list_getD (hf.toFinset.sort (Β· β€ Β·)) 0
#align nat.range_nth_of_finite Nat.range_nth_of_finite
@[simp]
theorem image_nth_Iio_card (hf : (setOf p).Finite) : nth p '' Set.Iio hf.toFinset.card = setOf p :=
calc
nth p '' Set.Iio hf.toFinset.card = Set.range (hf.toFinset.orderEmbOfFin rfl) := by
ext x
simp only [Set.mem_image, Set.mem_range, Fin.exists_iff, β nth_eq_orderEmbOfFin hf,
Set.mem_Iio, exists_prop]
_ = setOf p := by rw [range_orderEmbOfFin, Set.Finite.coe_toFinset]
#align nat.image_nth_Iio_card Nat.image_nth_Iio_card
theorem nth_mem_of_lt_card {n : β} (hf : (setOf p).Finite) (hlt : n < hf.toFinset.card) :
p (nth p n) :=
(image_nth_Iio_card hf).subset <| Set.mem_image_of_mem _ hlt
#align nat.nth_mem_of_lt_card Nat.nth_mem_of_lt_card
| Mathlib/Data/Nat/Nth.lean | 127 | 129 | theorem exists_lt_card_finite_nth_eq (hf : (setOf p).Finite) {x} (h : p x) :
β n, n < hf.toFinset.card β§ nth p n = x := by |
rwa [β @Set.mem_setOf_eq _ _ p, β image_nth_Iio_card hf] at h
| 1 | 2.718282 | 0 | 0.5 | 6 | 435 |
import Mathlib.Data.Nat.Count
import Mathlib.Data.Nat.SuccPred
import Mathlib.Order.Interval.Set.Monotone
import Mathlib.Order.OrderIsoNat
#align_import data.nat.nth from "leanprover-community/mathlib"@"7fdd4f3746cb059edfdb5d52cba98f66fce418c0"
open Finset
namespace Nat
variable (p : β β Prop)
noncomputable def nth (p : β β Prop) (n : β) : β := by
classical exact
if h : Set.Finite (setOf p) then (h.toFinset.sort (Β· β€ Β·)).getD n 0
else @Nat.Subtype.orderIsoOfNat (setOf p) (Set.Infinite.to_subtype h) n
#align nat.nth Nat.nth
variable {p}
theorem nth_of_card_le (hf : (setOf p).Finite) {n : β} (hn : hf.toFinset.card β€ n) :
nth p n = 0 := by rw [nth, dif_pos hf, List.getD_eq_default]; rwa [Finset.length_sort]
#align nat.nth_of_card_le Nat.nth_of_card_le
theorem nth_eq_getD_sort (h : (setOf p).Finite) (n : β) :
nth p n = (h.toFinset.sort (Β· β€ Β·)).getD n 0 :=
dif_pos h
#align nat.nth_eq_nthd_sort Nat.nth_eq_getD_sort
theorem nth_eq_orderEmbOfFin (hf : (setOf p).Finite) {n : β} (hn : n < hf.toFinset.card) :
nth p n = hf.toFinset.orderEmbOfFin rfl β¨n, hnβ© := by
rw [nth_eq_getD_sort hf, Finset.orderEmbOfFin_apply, List.getD_eq_get]
#align nat.nth_eq_order_emb_of_fin Nat.nth_eq_orderEmbOfFin
theorem nth_strictMonoOn (hf : (setOf p).Finite) :
StrictMonoOn (nth p) (Set.Iio hf.toFinset.card) := by
rintro m (hm : m < _) n (hn : n < _) h
simp only [nth_eq_orderEmbOfFin, *]
exact OrderEmbedding.strictMono _ h
#align nat.nth_strict_mono_on Nat.nth_strictMonoOn
theorem nth_lt_nth_of_lt_card (hf : (setOf p).Finite) {m n : β} (h : m < n)
(hn : n < hf.toFinset.card) : nth p m < nth p n :=
nth_strictMonoOn hf (h.trans hn) hn h
#align nat.nth_lt_nth_of_lt_card Nat.nth_lt_nth_of_lt_card
theorem nth_le_nth_of_lt_card (hf : (setOf p).Finite) {m n : β} (h : m β€ n)
(hn : n < hf.toFinset.card) : nth p m β€ nth p n :=
(nth_strictMonoOn hf).monotoneOn (h.trans_lt hn) hn h
#align nat.nth_le_nth_of_lt_card Nat.nth_le_nth_of_lt_card
theorem lt_of_nth_lt_nth_of_lt_card (hf : (setOf p).Finite) {m n : β} (h : nth p m < nth p n)
(hm : m < hf.toFinset.card) : m < n :=
not_le.1 fun hle => h.not_le <| nth_le_nth_of_lt_card hf hle hm
#align nat.lt_of_nth_lt_nth_of_lt_card Nat.lt_of_nth_lt_nth_of_lt_card
theorem le_of_nth_le_nth_of_lt_card (hf : (setOf p).Finite) {m n : β} (h : nth p m β€ nth p n)
(hm : m < hf.toFinset.card) : m β€ n :=
not_lt.1 fun hlt => h.not_lt <| nth_lt_nth_of_lt_card hf hlt hm
#align nat.le_of_nth_le_nth_of_lt_card Nat.le_of_nth_le_nth_of_lt_card
theorem nth_injOn (hf : (setOf p).Finite) : (Set.Iio hf.toFinset.card).InjOn (nth p) :=
(nth_strictMonoOn hf).injOn
#align nat.nth_inj_on Nat.nth_injOn
theorem range_nth_of_finite (hf : (setOf p).Finite) : Set.range (nth p) = insert 0 (setOf p) := by
simpa only [β nth_eq_getD_sort hf, mem_sort, Set.Finite.mem_toFinset]
using Set.range_list_getD (hf.toFinset.sort (Β· β€ Β·)) 0
#align nat.range_nth_of_finite Nat.range_nth_of_finite
@[simp]
theorem image_nth_Iio_card (hf : (setOf p).Finite) : nth p '' Set.Iio hf.toFinset.card = setOf p :=
calc
nth p '' Set.Iio hf.toFinset.card = Set.range (hf.toFinset.orderEmbOfFin rfl) := by
ext x
simp only [Set.mem_image, Set.mem_range, Fin.exists_iff, β nth_eq_orderEmbOfFin hf,
Set.mem_Iio, exists_prop]
_ = setOf p := by rw [range_orderEmbOfFin, Set.Finite.coe_toFinset]
#align nat.image_nth_Iio_card Nat.image_nth_Iio_card
theorem nth_mem_of_lt_card {n : β} (hf : (setOf p).Finite) (hlt : n < hf.toFinset.card) :
p (nth p n) :=
(image_nth_Iio_card hf).subset <| Set.mem_image_of_mem _ hlt
#align nat.nth_mem_of_lt_card Nat.nth_mem_of_lt_card
theorem exists_lt_card_finite_nth_eq (hf : (setOf p).Finite) {x} (h : p x) :
β n, n < hf.toFinset.card β§ nth p n = x := by
rwa [β @Set.mem_setOf_eq _ _ p, β image_nth_Iio_card hf] at h
#align nat.exists_lt_card_finite_nth_eq Nat.exists_lt_card_finite_nth_eq
| Mathlib/Data/Nat/Nth.lean | 137 | 138 | theorem nth_apply_eq_orderIsoOfNat (hf : (setOf p).Infinite) (n : β) :
nth p n = @Nat.Subtype.orderIsoOfNat (setOf p) hf.to_subtype n := by | rw [nth, dif_neg hf]
| 1 | 2.718282 | 0 | 0.5 | 6 | 435 |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Data.ZMod.Basic
#align_import data.zmod.parity from "leanprover-community/mathlib"@"048240e809f04e2bde02482ab44bc230744cc6c9"
namespace ZMod
theorem eq_zero_iff_even {n : β} : (n : ZMod 2) = 0 β Even n :=
(CharP.cast_eq_zero_iff (ZMod 2) 2 n).trans even_iff_two_dvd.symm
#align zmod.eq_zero_iff_even ZMod.eq_zero_iff_even
| Mathlib/Data/ZMod/Parity.lean | 28 | 29 | theorem eq_one_iff_odd {n : β} : (n : ZMod 2) = 1 β Odd n := by |
rw [β @Nat.cast_one (ZMod 2), ZMod.eq_iff_modEq_nat, Nat.odd_iff, Nat.ModEq]
| 1 | 2.718282 | 0 | 0.5 | 2 | 436 |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Data.ZMod.Basic
#align_import data.zmod.parity from "leanprover-community/mathlib"@"048240e809f04e2bde02482ab44bc230744cc6c9"
namespace ZMod
theorem eq_zero_iff_even {n : β} : (n : ZMod 2) = 0 β Even n :=
(CharP.cast_eq_zero_iff (ZMod 2) 2 n).trans even_iff_two_dvd.symm
#align zmod.eq_zero_iff_even ZMod.eq_zero_iff_even
theorem eq_one_iff_odd {n : β} : (n : ZMod 2) = 1 β Odd n := by
rw [β @Nat.cast_one (ZMod 2), ZMod.eq_iff_modEq_nat, Nat.odd_iff, Nat.ModEq]
#align zmod.eq_one_iff_odd ZMod.eq_one_iff_odd
| Mathlib/Data/ZMod/Parity.lean | 32 | 35 | theorem ne_zero_iff_odd {n : β} : (n : ZMod 2) β 0 β Odd n := by |
constructor <;>
Β· contrapose
simp [eq_zero_iff_even]
| 3 | 20.085537 | 1 | 0.5 | 2 | 436 |
import Mathlib.Algebra.Ring.Divisibility.Basic
import Mathlib.Init.Data.Ordering.Lemmas
import Mathlib.SetTheory.Ordinal.Principal
import Mathlib.Tactic.NormNum
#align_import set_theory.ordinal.notation from "leanprover-community/mathlib"@"b67044ba53af18680e1dd246861d9584e968495d"
set_option linter.uppercaseLean3 false
open Ordinal Order
-- Porting note: the generated theorem is warned by `simpNF`.
set_option genSizeOfSpec false in
inductive ONote : Type
| zero : ONote
| oadd : ONote β β+ β ONote β ONote
deriving DecidableEq
#align onote ONote
compile_inductive% ONote
namespace ONote
instance : Zero ONote :=
β¨zeroβ©
@[simp]
theorem zero_def : zero = 0 :=
rfl
#align onote.zero_def ONote.zero_def
instance : Inhabited ONote :=
β¨0β©
instance : One ONote :=
β¨oadd 0 1 0β©
def omega : ONote :=
oadd 1 1 0
#align onote.omega ONote.omega
@[simp]
noncomputable def repr : ONote β Ordinal.{0}
| 0 => 0
| oadd e n a => Ο ^ repr e * n + repr a
#align onote.repr ONote.repr
def toStringAux1 (e : ONote) (n : β) (s : String) : String :=
if e = 0 then toString n
else (if e = 1 then "Ο" else "Ο^(" ++ s ++ ")") ++ if n = 1 then "" else "*" ++ toString n
#align onote.to_string_aux1 ONote.toStringAux1
def toString : ONote β String
| zero => "0"
| oadd e n 0 => toStringAux1 e n (toString e)
| oadd e n a => toStringAux1 e n (toString e) ++ " + " ++ toString a
#align onote.to_string ONote.toString
open Lean in
def repr' (prec : β) : ONote β Format
| zero => "0"
| oadd e n a =>
Repr.addAppParen
("oadd " ++ (repr' max_prec e) ++ " " ++ Nat.repr (n : β) ++ " " ++ (repr' max_prec a))
prec
#align onote.repr' ONote.repr
instance : ToString ONote :=
β¨toStringβ©
instance : Repr ONote where
reprPrec o prec := repr' prec o
instance : Preorder ONote where
le x y := repr x β€ repr y
lt x y := repr x < repr y
le_refl _ := @le_refl Ordinal _ _
le_trans _ _ _ := @le_trans Ordinal _ _ _ _
lt_iff_le_not_le _ _ := @lt_iff_le_not_le Ordinal _ _ _
theorem lt_def {x y : ONote} : x < y β repr x < repr y :=
Iff.rfl
#align onote.lt_def ONote.lt_def
theorem le_def {x y : ONote} : x β€ y β repr x β€ repr y :=
Iff.rfl
#align onote.le_def ONote.le_def
instance : WellFoundedRelation ONote :=
β¨(Β· < Β·), InvImage.wf repr Ordinal.lt_wfβ©
@[coe]
def ofNat : β β ONote
| 0 => 0
| Nat.succ n => oadd 0 n.succPNat 0
#align onote.of_nat ONote.ofNat
-- Porting note (#11467): during the port we marked these lemmas with `@[eqns]`
-- to emulate the old Lean 3 behaviour.
@[simp] theorem ofNat_zero : ofNat 0 = 0 :=
rfl
@[simp] theorem ofNat_succ (n) : ofNat (Nat.succ n) = oadd 0 n.succPNat 0 :=
rfl
instance nat (n : β) : OfNat ONote n where
ofNat := ofNat n
@[simp 1200]
theorem ofNat_one : ofNat 1 = 1 :=
rfl
#align onote.of_nat_one ONote.ofNat_one
@[simp]
| Mathlib/SetTheory/Ordinal/Notation.lean | 150 | 150 | theorem repr_ofNat (n : β) : repr (ofNat n) = n := by | cases n <;> simp
| 1 | 2.718282 | 0 | 0.5 | 2 | 437 |
import Mathlib.Algebra.Ring.Divisibility.Basic
import Mathlib.Init.Data.Ordering.Lemmas
import Mathlib.SetTheory.Ordinal.Principal
import Mathlib.Tactic.NormNum
#align_import set_theory.ordinal.notation from "leanprover-community/mathlib"@"b67044ba53af18680e1dd246861d9584e968495d"
set_option linter.uppercaseLean3 false
open Ordinal Order
-- Porting note: the generated theorem is warned by `simpNF`.
set_option genSizeOfSpec false in
inductive ONote : Type
| zero : ONote
| oadd : ONote β β+ β ONote β ONote
deriving DecidableEq
#align onote ONote
compile_inductive% ONote
namespace ONote
instance : Zero ONote :=
β¨zeroβ©
@[simp]
theorem zero_def : zero = 0 :=
rfl
#align onote.zero_def ONote.zero_def
instance : Inhabited ONote :=
β¨0β©
instance : One ONote :=
β¨oadd 0 1 0β©
def omega : ONote :=
oadd 1 1 0
#align onote.omega ONote.omega
@[simp]
noncomputable def repr : ONote β Ordinal.{0}
| 0 => 0
| oadd e n a => Ο ^ repr e * n + repr a
#align onote.repr ONote.repr
def toStringAux1 (e : ONote) (n : β) (s : String) : String :=
if e = 0 then toString n
else (if e = 1 then "Ο" else "Ο^(" ++ s ++ ")") ++ if n = 1 then "" else "*" ++ toString n
#align onote.to_string_aux1 ONote.toStringAux1
def toString : ONote β String
| zero => "0"
| oadd e n 0 => toStringAux1 e n (toString e)
| oadd e n a => toStringAux1 e n (toString e) ++ " + " ++ toString a
#align onote.to_string ONote.toString
open Lean in
def repr' (prec : β) : ONote β Format
| zero => "0"
| oadd e n a =>
Repr.addAppParen
("oadd " ++ (repr' max_prec e) ++ " " ++ Nat.repr (n : β) ++ " " ++ (repr' max_prec a))
prec
#align onote.repr' ONote.repr
instance : ToString ONote :=
β¨toStringβ©
instance : Repr ONote where
reprPrec o prec := repr' prec o
instance : Preorder ONote where
le x y := repr x β€ repr y
lt x y := repr x < repr y
le_refl _ := @le_refl Ordinal _ _
le_trans _ _ _ := @le_trans Ordinal _ _ _ _
lt_iff_le_not_le _ _ := @lt_iff_le_not_le Ordinal _ _ _
theorem lt_def {x y : ONote} : x < y β repr x < repr y :=
Iff.rfl
#align onote.lt_def ONote.lt_def
theorem le_def {x y : ONote} : x β€ y β repr x β€ repr y :=
Iff.rfl
#align onote.le_def ONote.le_def
instance : WellFoundedRelation ONote :=
β¨(Β· < Β·), InvImage.wf repr Ordinal.lt_wfβ©
@[coe]
def ofNat : β β ONote
| 0 => 0
| Nat.succ n => oadd 0 n.succPNat 0
#align onote.of_nat ONote.ofNat
-- Porting note (#11467): during the port we marked these lemmas with `@[eqns]`
-- to emulate the old Lean 3 behaviour.
@[simp] theorem ofNat_zero : ofNat 0 = 0 :=
rfl
@[simp] theorem ofNat_succ (n) : ofNat (Nat.succ n) = oadd 0 n.succPNat 0 :=
rfl
instance nat (n : β) : OfNat ONote n where
ofNat := ofNat n
@[simp 1200]
theorem ofNat_one : ofNat 1 = 1 :=
rfl
#align onote.of_nat_one ONote.ofNat_one
@[simp]
theorem repr_ofNat (n : β) : repr (ofNat n) = n := by cases n <;> simp
#align onote.repr_of_nat ONote.repr_ofNat
-- @[simp] -- Porting note (#10618): simp can prove this
theorem repr_one : repr (ofNat 1) = (1 : β) := repr_ofNat 1
#align onote.repr_one ONote.repr_one
| Mathlib/SetTheory/Ordinal/Notation.lean | 157 | 159 | theorem omega_le_oadd (e n a) : Ο ^ repr e β€ repr (oadd e n a) := by |
refine le_trans ?_ (le_add_right _ _)
simpa using (Ordinal.mul_le_mul_iff_left <| opow_pos (repr e) omega_pos).2 (natCast_le.2 n.2)
| 2 | 7.389056 | 1 | 0.5 | 2 | 437 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
universe uD uE uF uG
variable {π : Type*} [NontriviallyNormedField π] {D : Type uD} [NormedAddCommGroup D]
[NormedSpace π D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π E] {F : Type uF}
[NormedAddCommGroup F] [NormedSpace π F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π G]
section FiniteDimensional
open Function FiniteDimensional
variable [CompleteSpace π]
| Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean | 35 | 43 | theorem contDiffOn_clm_apply {n : ββ} {f : E β F βL[π] G} {s : Set E} [FiniteDimensional π F] :
ContDiffOn π n f s β β y, ContDiffOn π n (fun x => f x y) s := by |
refine β¨fun h y => h.clm_apply contDiffOn_const, fun h => ?_β©
let d := finrank π F
have hd : d = finrank π (Fin d β π) := (finrank_fin_fun π).symm
let eβ := ContinuousLinearEquiv.ofFinrankEq hd
let eβ := (eβ.arrowCongr (1 : G βL[π] G)).trans (ContinuousLinearEquiv.piRing (Fin d))
rw [β id_comp f, β eβ.symm_comp_self]
exact eβ.symm.contDiff.comp_contDiffOn (contDiffOn_pi.mpr fun i => h _)
| 7 | 1,096.633158 | 2 | 0.5 | 4 | 438 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
universe uD uE uF uG
variable {π : Type*} [NontriviallyNormedField π] {D : Type uD} [NormedAddCommGroup D]
[NormedSpace π D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π E] {F : Type uF}
[NormedAddCommGroup F] [NormedSpace π F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π G]
section FiniteDimensional
open Function FiniteDimensional
variable [CompleteSpace π]
theorem contDiffOn_clm_apply {n : ββ} {f : E β F βL[π] G} {s : Set E} [FiniteDimensional π F] :
ContDiffOn π n f s β β y, ContDiffOn π n (fun x => f x y) s := by
refine β¨fun h y => h.clm_apply contDiffOn_const, fun h => ?_β©
let d := finrank π F
have hd : d = finrank π (Fin d β π) := (finrank_fin_fun π).symm
let eβ := ContinuousLinearEquiv.ofFinrankEq hd
let eβ := (eβ.arrowCongr (1 : G βL[π] G)).trans (ContinuousLinearEquiv.piRing (Fin d))
rw [β id_comp f, β eβ.symm_comp_self]
exact eβ.symm.contDiff.comp_contDiffOn (contDiffOn_pi.mpr fun i => h _)
#align cont_diff_on_clm_apply contDiffOn_clm_apply
| Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean | 46 | 48 | theorem contDiff_clm_apply_iff {n : ββ} {f : E β F βL[π] G} [FiniteDimensional π F] :
ContDiff π n f β β y, ContDiff π n fun x => f x y := by |
simp_rw [β contDiffOn_univ, contDiffOn_clm_apply]
| 1 | 2.718282 | 0 | 0.5 | 4 | 438 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
universe uD uE uF uG
variable {π : Type*} [NontriviallyNormedField π] {D : Type uD} [NormedAddCommGroup D]
[NormedSpace π D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π E] {F : Type uF}
[NormedAddCommGroup F] [NormedSpace π F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π G]
section FiniteDimensional
open Function FiniteDimensional
variable [CompleteSpace π]
theorem contDiffOn_clm_apply {n : ββ} {f : E β F βL[π] G} {s : Set E} [FiniteDimensional π F] :
ContDiffOn π n f s β β y, ContDiffOn π n (fun x => f x y) s := by
refine β¨fun h y => h.clm_apply contDiffOn_const, fun h => ?_β©
let d := finrank π F
have hd : d = finrank π (Fin d β π) := (finrank_fin_fun π).symm
let eβ := ContinuousLinearEquiv.ofFinrankEq hd
let eβ := (eβ.arrowCongr (1 : G βL[π] G)).trans (ContinuousLinearEquiv.piRing (Fin d))
rw [β id_comp f, β eβ.symm_comp_self]
exact eβ.symm.contDiff.comp_contDiffOn (contDiffOn_pi.mpr fun i => h _)
#align cont_diff_on_clm_apply contDiffOn_clm_apply
theorem contDiff_clm_apply_iff {n : ββ} {f : E β F βL[π] G} [FiniteDimensional π F] :
ContDiff π n f β β y, ContDiff π n fun x => f x y := by
simp_rw [β contDiffOn_univ, contDiffOn_clm_apply]
#align cont_diff_clm_apply_iff contDiff_clm_apply_iff
| Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean | 60 | 62 | theorem contDiff_succ_iff_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} :
ContDiff π (n + 1 : β) f β Differentiable π f β§ β y, ContDiff π n fun x => fderiv π f x y := by |
rw [contDiff_succ_iff_fderiv, contDiff_clm_apply_iff]
| 1 | 2.718282 | 0 | 0.5 | 4 | 438 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
universe uD uE uF uG
variable {π : Type*} [NontriviallyNormedField π] {D : Type uD} [NormedAddCommGroup D]
[NormedSpace π D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π E] {F : Type uF}
[NormedAddCommGroup F] [NormedSpace π F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π G]
section FiniteDimensional
open Function FiniteDimensional
variable [CompleteSpace π]
theorem contDiffOn_clm_apply {n : ββ} {f : E β F βL[π] G} {s : Set E} [FiniteDimensional π F] :
ContDiffOn π n f s β β y, ContDiffOn π n (fun x => f x y) s := by
refine β¨fun h y => h.clm_apply contDiffOn_const, fun h => ?_β©
let d := finrank π F
have hd : d = finrank π (Fin d β π) := (finrank_fin_fun π).symm
let eβ := ContinuousLinearEquiv.ofFinrankEq hd
let eβ := (eβ.arrowCongr (1 : G βL[π] G)).trans (ContinuousLinearEquiv.piRing (Fin d))
rw [β id_comp f, β eβ.symm_comp_self]
exact eβ.symm.contDiff.comp_contDiffOn (contDiffOn_pi.mpr fun i => h _)
#align cont_diff_on_clm_apply contDiffOn_clm_apply
theorem contDiff_clm_apply_iff {n : ββ} {f : E β F βL[π] G} [FiniteDimensional π F] :
ContDiff π n f β β y, ContDiff π n fun x => f x y := by
simp_rw [β contDiffOn_univ, contDiffOn_clm_apply]
#align cont_diff_clm_apply_iff contDiff_clm_apply_iff
theorem contDiff_succ_iff_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} :
ContDiff π (n + 1 : β) f β Differentiable π f β§ β y, ContDiff π n fun x => fderiv π f x y := by
rw [contDiff_succ_iff_fderiv, contDiff_clm_apply_iff]
#align cont_diff_succ_iff_fderiv_apply contDiff_succ_iff_fderiv_apply
theorem contDiffOn_succ_of_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} {s : Set E}
(hf : DifferentiableOn π f s) (h : β y, ContDiffOn π n (fun x => fderivWithin π f s x y) s) :
ContDiffOn π (n + 1 : β) f s :=
contDiffOn_succ_of_fderivWithin hf <| contDiffOn_clm_apply.mpr h
#align cont_diff_on_succ_of_fderiv_apply contDiffOn_succ_of_fderiv_apply
| Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean | 71 | 75 | theorem contDiffOn_succ_iff_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} {s : Set E}
(hs : UniqueDiffOn π s) :
ContDiffOn π (n + 1 : β) f s β
DifferentiableOn π f s β§ β y, ContDiffOn π n (fun x => fderivWithin π f s x y) s := by |
rw [contDiffOn_succ_iff_fderivWithin hs, contDiffOn_clm_apply]
| 1 | 2.718282 | 0 | 0.5 | 4 | 438 |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Algebra.Order.Module.OrderedSMul
import Mathlib.Data.Complex.Cardinality
import Mathlib.Data.Fin.VecNotation
import Mathlib.LinearAlgebra.FiniteDimensional
#align_import data.complex.module from "leanprover-community/mathlib"@"c7bce2818663f456335892ddbdd1809f111a5b72"
namespace Complex
open ComplexConjugate
open scoped SMul
variable {R : Type*} {S : Type*}
attribute [local ext] Complex.ext
-- Test that the `SMul β β` instance is correct.
example : (Complex.SMul.instSMulRealComplex : SMul β β) = (Algebra.toSMul : SMul β β) := rfl
-- priority manually adjusted in #11980
instance (priority := 90) [SMul R β] [SMul S β] [SMulCommClass R S β] : SMulCommClass R S β where
smul_comm r s x := by ext <;> simp [smul_re, smul_im, smul_comm]
-- priority manually adjusted in #11980
instance (priority := 90) [SMul R S] [SMul R β] [SMul S β] [IsScalarTower R S β] :
IsScalarTower R S β where
smul_assoc r s x := by ext <;> simp [smul_re, smul_im, smul_assoc]
-- priority manually adjusted in #11980
instance (priority := 90) [SMul R β] [SMul Rα΅α΅α΅ β] [IsCentralScalar R β] :
IsCentralScalar R β where
op_smul_eq_smul r x := by ext <;> simp [smul_re, smul_im, op_smul_eq_smul]
-- priority manually adjusted in #11980
instance (priority := 90) mulAction [Monoid R] [MulAction R β] : MulAction R β where
one_smul x := by ext <;> simp [smul_re, smul_im, one_smul]
mul_smul r s x := by ext <;> simp [smul_re, smul_im, mul_smul]
-- priority manually adjusted in #11980
instance (priority := 90) distribSMul [DistribSMul R β] : DistribSMul R β where
smul_add r x y := by ext <;> simp [smul_re, smul_im, smul_add]
smul_zero r := by ext <;> simp [smul_re, smul_im, smul_zero]
-- priority manually adjusted in #11980
instance (priority := 90) [Semiring R] [DistribMulAction R β] : DistribMulAction R β :=
{ Complex.distribSMul, Complex.mulAction with }
-- priority manually adjusted in #11980
instance (priority := 100) instModule [Semiring R] [Module R β] : Module R β where
add_smul r s x := by ext <;> simp [smul_re, smul_im, add_smul]
zero_smul r := by ext <;> simp [smul_re, smul_im, zero_smul]
-- priority manually adjusted in #11980
instance (priority := 95) instAlgebraOfReal [CommSemiring R] [Algebra R β] : Algebra R β :=
{ Complex.ofReal.comp (algebraMap R β) with
smul := (Β· β’ Β·)
smul_def' := fun r x => by ext <;> simp [smul_re, smul_im, Algebra.smul_def]
commutes' := fun r β¨xr, xiβ© => by ext <;> simp [smul_re, smul_im, Algebra.commutes] }
instance : StarModule β β :=
β¨fun r x => by simp only [star_def, star_trivial, real_smul, map_mul, conj_ofReal]β©
@[simp]
theorem coe_algebraMap : (algebraMap β β : β β β) = ((β) : β β β) :=
rfl
#align complex.coe_algebra_map Complex.coe_algebraMap
section
variable {A : Type*} [Semiring A] [Algebra β A]
@[simp]
theorem _root_.AlgHom.map_coe_real_complex (f : β ββ[β] A) (x : β) : f x = algebraMap β A x :=
f.commutes x
#align alg_hom.map_coe_real_complex AlgHom.map_coe_real_complex
@[ext]
| Mathlib/Data/Complex/Module.lean | 125 | 127 | theorem algHom_ext β¦f g : β ββ[β] Aβ¦ (h : f I = g I) : f = g := by |
ext β¨x, yβ©
simp only [mk_eq_add_mul_I, AlgHom.map_add, AlgHom.map_coe_real_complex, AlgHom.map_mul, h]
| 2 | 7.389056 | 1 | 0.5 | 2 | 439 |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Algebra.Order.Module.OrderedSMul
import Mathlib.Data.Complex.Cardinality
import Mathlib.Data.Fin.VecNotation
import Mathlib.LinearAlgebra.FiniteDimensional
#align_import data.complex.module from "leanprover-community/mathlib"@"c7bce2818663f456335892ddbdd1809f111a5b72"
namespace Complex
open ComplexConjugate
open scoped SMul
variable {R : Type*} {S : Type*}
attribute [local ext] Complex.ext
-- Test that the `SMul β β` instance is correct.
example : (Complex.SMul.instSMulRealComplex : SMul β β) = (Algebra.toSMul : SMul β β) := rfl
-- priority manually adjusted in #11980
instance (priority := 90) [SMul R β] [SMul S β] [SMulCommClass R S β] : SMulCommClass R S β where
smul_comm r s x := by ext <;> simp [smul_re, smul_im, smul_comm]
-- priority manually adjusted in #11980
instance (priority := 90) [SMul R S] [SMul R β] [SMul S β] [IsScalarTower R S β] :
IsScalarTower R S β where
smul_assoc r s x := by ext <;> simp [smul_re, smul_im, smul_assoc]
-- priority manually adjusted in #11980
instance (priority := 90) [SMul R β] [SMul Rα΅α΅α΅ β] [IsCentralScalar R β] :
IsCentralScalar R β where
op_smul_eq_smul r x := by ext <;> simp [smul_re, smul_im, op_smul_eq_smul]
-- priority manually adjusted in #11980
instance (priority := 90) mulAction [Monoid R] [MulAction R β] : MulAction R β where
one_smul x := by ext <;> simp [smul_re, smul_im, one_smul]
mul_smul r s x := by ext <;> simp [smul_re, smul_im, mul_smul]
-- priority manually adjusted in #11980
instance (priority := 90) distribSMul [DistribSMul R β] : DistribSMul R β where
smul_add r x y := by ext <;> simp [smul_re, smul_im, smul_add]
smul_zero r := by ext <;> simp [smul_re, smul_im, smul_zero]
-- priority manually adjusted in #11980
instance (priority := 90) [Semiring R] [DistribMulAction R β] : DistribMulAction R β :=
{ Complex.distribSMul, Complex.mulAction with }
-- priority manually adjusted in #11980
instance (priority := 100) instModule [Semiring R] [Module R β] : Module R β where
add_smul r s x := by ext <;> simp [smul_re, smul_im, add_smul]
zero_smul r := by ext <;> simp [smul_re, smul_im, zero_smul]
-- priority manually adjusted in #11980
instance (priority := 95) instAlgebraOfReal [CommSemiring R] [Algebra R β] : Algebra R β :=
{ Complex.ofReal.comp (algebraMap R β) with
smul := (Β· β’ Β·)
smul_def' := fun r x => by ext <;> simp [smul_re, smul_im, Algebra.smul_def]
commutes' := fun r β¨xr, xiβ© => by ext <;> simp [smul_re, smul_im, Algebra.commutes] }
instance : StarModule β β :=
β¨fun r x => by simp only [star_def, star_trivial, real_smul, map_mul, conj_ofReal]β©
@[simp]
theorem coe_algebraMap : (algebraMap β β : β β β) = ((β) : β β β) :=
rfl
#align complex.coe_algebra_map Complex.coe_algebraMap
section
variable {A : Type*} [Semiring A] [Algebra β A]
@[simp]
theorem _root_.AlgHom.map_coe_real_complex (f : β ββ[β] A) (x : β) : f x = algebraMap β A x :=
f.commutes x
#align alg_hom.map_coe_real_complex AlgHom.map_coe_real_complex
@[ext]
theorem algHom_ext β¦f g : β ββ[β] Aβ¦ (h : f I = g I) : f = g := by
ext β¨x, yβ©
simp only [mk_eq_add_mul_I, AlgHom.map_add, AlgHom.map_coe_real_complex, AlgHom.map_mul, h]
#align complex.alg_hom_ext Complex.algHom_ext
end
open Submodule FiniteDimensional
noncomputable def basisOneI : Basis (Fin 2) β β :=
Basis.ofEquivFun
{ toFun := fun z => ![z.re, z.im]
invFun := fun c => c 0 + c 1 β’ I
left_inv := fun z => by simp
right_inv := fun c => by
ext i
fin_cases i <;> simp
map_add' := fun z z' => by simp
map_smul' := fun c z => by simp }
set_option linter.uppercaseLean3 false in
#align complex.basis_one_I Complex.basisOneI
@[simp]
theorem coe_basisOneI_repr (z : β) : β(basisOneI.repr z) = ![z.re, z.im] :=
rfl
set_option linter.uppercaseLean3 false in
#align complex.coe_basis_one_I_repr Complex.coe_basisOneI_repr
@[simp]
theorem coe_basisOneI : βbasisOneI = ![1, I] :=
funext fun i =>
Basis.apply_eq_iff.mpr <|
Finsupp.ext fun j => by
fin_cases i <;> fin_cases j <;>
-- Porting note: removed `only`, consider squeezing again
simp [coe_basisOneI_repr, Finsupp.single_eq_of_ne, Matrix.cons_val_zero,
Matrix.cons_val_one, Matrix.head_cons, Fin.one_eq_zero_iff, Ne, not_false_iff, I_re,
Nat.succ_succ_ne_one, one_im, I_im, one_re, Finsupp.single_eq_same, Fin.zero_eq_one_iff]
set_option linter.uppercaseLean3 false in
#align complex.coe_basis_one_I Complex.coe_basisOneI
instance : FiniteDimensional β β :=
of_fintype_basis basisOneI
@[simp]
| Mathlib/Data/Complex/Module.lean | 171 | 172 | theorem finrank_real_complex : FiniteDimensional.finrank β β = 2 := by |
rw [finrank_eq_card_basis basisOneI, Fintype.card_fin]
| 1 | 2.718282 | 0 | 0.5 | 2 | 439 |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.LinearAlgebra.Matrix.ZPow
#align_import linear_algebra.matrix.hermitian from "leanprover-community/mathlib"@"caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c"
namespace Matrix
variable {Ξ± Ξ² : Type*} {m n : Type*} {A : Matrix n n Ξ±}
open scoped Matrix
local notation "βͺ" x ", " y "β«" => @inner Ξ± _ _ x y
section Star
variable [Star Ξ±] [Star Ξ²]
def IsHermitian (A : Matrix n n Ξ±) : Prop := Aα΄΄ = A
#align matrix.is_hermitian Matrix.IsHermitian
instance (A : Matrix n n Ξ±) [Decidable (Aα΄΄ = A)] : Decidable (IsHermitian A) :=
inferInstanceAs <| Decidable (_ = _)
theorem IsHermitian.eq {A : Matrix n n Ξ±} (h : A.IsHermitian) : Aα΄΄ = A := h
#align matrix.is_hermitian.eq Matrix.IsHermitian.eq
protected theorem IsHermitian.isSelfAdjoint {A : Matrix n n Ξ±} (h : A.IsHermitian) :
IsSelfAdjoint A := h
#align matrix.is_hermitian.is_self_adjoint Matrix.IsHermitian.isSelfAdjoint
-- @[ext] -- Porting note: incorrect ext, not a structure or a lemma proving x = y
| Mathlib/LinearAlgebra/Matrix/Hermitian.lean | 56 | 57 | theorem IsHermitian.ext {A : Matrix n n Ξ±} : (β i j, star (A j i) = A i j) β A.IsHermitian := by |
intro h; ext i j; exact h i j
| 1 | 2.718282 | 0 | 0.5 | 2 | 440 |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.LinearAlgebra.Matrix.ZPow
#align_import linear_algebra.matrix.hermitian from "leanprover-community/mathlib"@"caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c"
namespace Matrix
variable {Ξ± Ξ² : Type*} {m n : Type*} {A : Matrix n n Ξ±}
open scoped Matrix
local notation "βͺ" x ", " y "β«" => @inner Ξ± _ _ x y
section Star
variable [Star Ξ±] [Star Ξ²]
def IsHermitian (A : Matrix n n Ξ±) : Prop := Aα΄΄ = A
#align matrix.is_hermitian Matrix.IsHermitian
instance (A : Matrix n n Ξ±) [Decidable (Aα΄΄ = A)] : Decidable (IsHermitian A) :=
inferInstanceAs <| Decidable (_ = _)
theorem IsHermitian.eq {A : Matrix n n Ξ±} (h : A.IsHermitian) : Aα΄΄ = A := h
#align matrix.is_hermitian.eq Matrix.IsHermitian.eq
protected theorem IsHermitian.isSelfAdjoint {A : Matrix n n Ξ±} (h : A.IsHermitian) :
IsSelfAdjoint A := h
#align matrix.is_hermitian.is_self_adjoint Matrix.IsHermitian.isSelfAdjoint
-- @[ext] -- Porting note: incorrect ext, not a structure or a lemma proving x = y
theorem IsHermitian.ext {A : Matrix n n Ξ±} : (β i j, star (A j i) = A i j) β A.IsHermitian := by
intro h; ext i j; exact h i j
#align matrix.is_hermitian.ext Matrix.IsHermitian.ext
theorem IsHermitian.apply {A : Matrix n n Ξ±} (h : A.IsHermitian) (i j : n) : star (A j i) = A i j :=
congr_fun (congr_fun h _) _
#align matrix.is_hermitian.apply Matrix.IsHermitian.apply
theorem IsHermitian.ext_iff {A : Matrix n n Ξ±} : A.IsHermitian β β i j, star (A j i) = A i j :=
β¨IsHermitian.apply, IsHermitian.extβ©
#align matrix.is_hermitian.ext_iff Matrix.IsHermitian.ext_iff
@[simp]
theorem IsHermitian.map {A : Matrix n n Ξ±} (h : A.IsHermitian) (f : Ξ± β Ξ²)
(hf : Function.Semiconj f star star) : (A.map f).IsHermitian :=
(conjTranspose_map f hf).symm.trans <| h.eq.symm βΈ rfl
#align matrix.is_hermitian.map Matrix.IsHermitian.map
| Mathlib/LinearAlgebra/Matrix/Hermitian.lean | 74 | 76 | theorem IsHermitian.transpose {A : Matrix n n Ξ±} (h : A.IsHermitian) : Aα΅.IsHermitian := by |
rw [IsHermitian, conjTranspose, transpose_map]
exact congr_arg Matrix.transpose h
| 2 | 7.389056 | 1 | 0.5 | 2 | 440 |
import Mathlib.Algebra.Order.Ring.Defs
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Data.Nat.Cast.Order
#align_import algebra.order.invertible from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865"
variable {Ξ± : Type*} [LinearOrderedSemiring Ξ±] {a : Ξ±}
@[simp]
| Mathlib/Algebra/Order/Invertible.lean | 19 | 21 | theorem invOf_pos [Invertible a] : 0 < β
a β 0 < a :=
haveI : 0 < a * β
a := by | simp only [mul_invOf_self, zero_lt_one]
β¨fun h => pos_of_mul_pos_left this h.le, fun h => pos_of_mul_pos_right this h.leβ©
| 2 | 7.389056 | 1 | 0.5 | 4 | 441 |
import Mathlib.Algebra.Order.Ring.Defs
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Data.Nat.Cast.Order
#align_import algebra.order.invertible from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865"
variable {Ξ± : Type*} [LinearOrderedSemiring Ξ±] {a : Ξ±}
@[simp]
theorem invOf_pos [Invertible a] : 0 < β
a β 0 < a :=
haveI : 0 < a * β
a := by simp only [mul_invOf_self, zero_lt_one]
β¨fun h => pos_of_mul_pos_left this h.le, fun h => pos_of_mul_pos_right this h.leβ©
#align inv_of_pos invOf_pos
@[simp]
| Mathlib/Algebra/Order/Invertible.lean | 25 | 25 | theorem invOf_nonpos [Invertible a] : β
a β€ 0 β a β€ 0 := by | simp only [β not_lt, invOf_pos]
| 1 | 2.718282 | 0 | 0.5 | 4 | 441 |
import Mathlib.Algebra.Order.Ring.Defs
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Data.Nat.Cast.Order
#align_import algebra.order.invertible from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865"
variable {Ξ± : Type*} [LinearOrderedSemiring Ξ±] {a : Ξ±}
@[simp]
theorem invOf_pos [Invertible a] : 0 < β
a β 0 < a :=
haveI : 0 < a * β
a := by simp only [mul_invOf_self, zero_lt_one]
β¨fun h => pos_of_mul_pos_left this h.le, fun h => pos_of_mul_pos_right this h.leβ©
#align inv_of_pos invOf_pos
@[simp]
theorem invOf_nonpos [Invertible a] : β
a β€ 0 β a β€ 0 := by simp only [β not_lt, invOf_pos]
#align inv_of_nonpos invOf_nonpos
@[simp]
| Mathlib/Algebra/Order/Invertible.lean | 29 | 31 | theorem invOf_nonneg [Invertible a] : 0 β€ β
a β 0 β€ a :=
haveI : 0 < a * β
a := by | simp only [mul_invOf_self, zero_lt_one]
β¨fun h => (pos_of_mul_pos_left this h).le, fun h => (pos_of_mul_pos_right this h).leβ©
| 2 | 7.389056 | 1 | 0.5 | 4 | 441 |
import Mathlib.Algebra.Order.Ring.Defs
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Data.Nat.Cast.Order
#align_import algebra.order.invertible from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865"
variable {Ξ± : Type*} [LinearOrderedSemiring Ξ±] {a : Ξ±}
@[simp]
theorem invOf_pos [Invertible a] : 0 < β
a β 0 < a :=
haveI : 0 < a * β
a := by simp only [mul_invOf_self, zero_lt_one]
β¨fun h => pos_of_mul_pos_left this h.le, fun h => pos_of_mul_pos_right this h.leβ©
#align inv_of_pos invOf_pos
@[simp]
theorem invOf_nonpos [Invertible a] : β
a β€ 0 β a β€ 0 := by simp only [β not_lt, invOf_pos]
#align inv_of_nonpos invOf_nonpos
@[simp]
theorem invOf_nonneg [Invertible a] : 0 β€ β
a β 0 β€ a :=
haveI : 0 < a * β
a := by simp only [mul_invOf_self, zero_lt_one]
β¨fun h => (pos_of_mul_pos_left this h).le, fun h => (pos_of_mul_pos_right this h).leβ©
#align inv_of_nonneg invOf_nonneg
@[simp]
| Mathlib/Algebra/Order/Invertible.lean | 35 | 35 | theorem invOf_lt_zero [Invertible a] : β
a < 0 β a < 0 := by | simp only [β not_le, invOf_nonneg]
| 1 | 2.718282 | 0 | 0.5 | 4 | 441 |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section Inducing
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
theorem inducing_induced (f : X β Y) : @Inducing X Y (TopologicalSpace.induced f βΉ_βΊ) _ f :=
@Inducing.mk _ _ (TopologicalSpace.induced f βΉ_βΊ) _ _ rfl
theorem inducing_id : Inducing (@id X) :=
β¨induced_id.symmβ©
#align inducing_id inducing_id
protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) :
Inducing (g β f) :=
β¨by rw [hf.induced, hg.induced, induced_compose]β©
#align inducing.comp Inducing.comp
| Mathlib/Topology/Maps.lean | 69 | 72 | theorem Inducing.of_comp_iff (hg : Inducing g) :
Inducing (g β f) β Inducing f := by |
refine β¨fun h β¦ ?_, hg.compβ©
rw [inducing_iff, hg.induced, induced_compose, h.induced]
| 2 | 7.389056 | 1 | 0.5 | 12 | 442 |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section Inducing
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
theorem inducing_induced (f : X β Y) : @Inducing X Y (TopologicalSpace.induced f βΉ_βΊ) _ f :=
@Inducing.mk _ _ (TopologicalSpace.induced f βΉ_βΊ) _ _ rfl
theorem inducing_id : Inducing (@id X) :=
β¨induced_id.symmβ©
#align inducing_id inducing_id
protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) :
Inducing (g β f) :=
β¨by rw [hf.induced, hg.induced, induced_compose]β©
#align inducing.comp Inducing.comp
theorem Inducing.of_comp_iff (hg : Inducing g) :
Inducing (g β f) β Inducing f := by
refine β¨fun h β¦ ?_, hg.compβ©
rw [inducing_iff, hg.induced, induced_compose, h.induced]
#align inducing.inducing_iff Inducing.of_comp_iff
theorem inducing_of_inducing_compose
(hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g β f)) : Inducing f :=
β¨le_antisymm (by rwa [β continuous_iff_le_induced])
(by
rw [hgf.induced, β induced_compose]
exact induced_mono hg.le_induced)β©
#align inducing_of_inducing_compose inducing_of_inducing_compose
theorem inducing_iff_nhds : Inducing f β β x, π x = comap f (π (f x)) :=
(inducing_iff _).trans (induced_iff_nhds_eq f)
#align inducing_iff_nhds inducing_iff_nhds
namespace Inducing
theorem nhds_eq_comap (hf : Inducing f) : β x : X, π x = comap f (π <| f x) :=
inducing_iff_nhds.1 hf
#align inducing.nhds_eq_comap Inducing.nhds_eq_comap
theorem basis_nhds {p : ΞΉ β Prop} {s : ΞΉ β Set Y} (hf : Inducing f) {x : X}
(h_basis : (π (f x)).HasBasis p s) : (π x).HasBasis p (preimage f β s) :=
hf.nhds_eq_comap x βΈ h_basis.comap f
| Mathlib/Topology/Maps.lean | 97 | 99 | theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) :
πΛ’ s = comap f (πΛ’ (f '' s)) := by |
simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image]
| 1 | 2.718282 | 0 | 0.5 | 12 | 442 |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section Inducing
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
theorem inducing_induced (f : X β Y) : @Inducing X Y (TopologicalSpace.induced f βΉ_βΊ) _ f :=
@Inducing.mk _ _ (TopologicalSpace.induced f βΉ_βΊ) _ _ rfl
theorem inducing_id : Inducing (@id X) :=
β¨induced_id.symmβ©
#align inducing_id inducing_id
protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) :
Inducing (g β f) :=
β¨by rw [hf.induced, hg.induced, induced_compose]β©
#align inducing.comp Inducing.comp
theorem Inducing.of_comp_iff (hg : Inducing g) :
Inducing (g β f) β Inducing f := by
refine β¨fun h β¦ ?_, hg.compβ©
rw [inducing_iff, hg.induced, induced_compose, h.induced]
#align inducing.inducing_iff Inducing.of_comp_iff
theorem inducing_of_inducing_compose
(hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g β f)) : Inducing f :=
β¨le_antisymm (by rwa [β continuous_iff_le_induced])
(by
rw [hgf.induced, β induced_compose]
exact induced_mono hg.le_induced)β©
#align inducing_of_inducing_compose inducing_of_inducing_compose
theorem inducing_iff_nhds : Inducing f β β x, π x = comap f (π (f x)) :=
(inducing_iff _).trans (induced_iff_nhds_eq f)
#align inducing_iff_nhds inducing_iff_nhds
namespace Inducing
theorem nhds_eq_comap (hf : Inducing f) : β x : X, π x = comap f (π <| f x) :=
inducing_iff_nhds.1 hf
#align inducing.nhds_eq_comap Inducing.nhds_eq_comap
theorem basis_nhds {p : ΞΉ β Prop} {s : ΞΉ β Set Y} (hf : Inducing f) {x : X}
(h_basis : (π (f x)).HasBasis p s) : (π x).HasBasis p (preimage f β s) :=
hf.nhds_eq_comap x βΈ h_basis.comap f
theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) :
πΛ’ s = comap f (πΛ’ (f '' s)) := by
simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image]
#align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap
theorem map_nhds_eq (hf : Inducing f) (x : X) : (π x).map f = π[range f] f x :=
hf.induced.symm βΈ map_nhds_induced_eq x
#align inducing.map_nhds_eq Inducing.map_nhds_eq
theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f β π (f x)) :
(π x).map f = π (f x) :=
hf.induced.symm βΈ map_nhds_induced_of_mem h
#align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem
-- Porting note (#10756): new lemma
| Mathlib/Topology/Maps.lean | 112 | 115 | theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} :
MapClusterPt (f x) l f β ClusterPt x l := by |
delta MapClusterPt ClusterPt
rw [β Filter.push_pull', β hf.nhds_eq_comap, map_neBot_iff]
| 2 | 7.389056 | 1 | 0.5 | 12 | 442 |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section Inducing
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
theorem inducing_induced (f : X β Y) : @Inducing X Y (TopologicalSpace.induced f βΉ_βΊ) _ f :=
@Inducing.mk _ _ (TopologicalSpace.induced f βΉ_βΊ) _ _ rfl
theorem inducing_id : Inducing (@id X) :=
β¨induced_id.symmβ©
#align inducing_id inducing_id
protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) :
Inducing (g β f) :=
β¨by rw [hf.induced, hg.induced, induced_compose]β©
#align inducing.comp Inducing.comp
theorem Inducing.of_comp_iff (hg : Inducing g) :
Inducing (g β f) β Inducing f := by
refine β¨fun h β¦ ?_, hg.compβ©
rw [inducing_iff, hg.induced, induced_compose, h.induced]
#align inducing.inducing_iff Inducing.of_comp_iff
theorem inducing_of_inducing_compose
(hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g β f)) : Inducing f :=
β¨le_antisymm (by rwa [β continuous_iff_le_induced])
(by
rw [hgf.induced, β induced_compose]
exact induced_mono hg.le_induced)β©
#align inducing_of_inducing_compose inducing_of_inducing_compose
theorem inducing_iff_nhds : Inducing f β β x, π x = comap f (π (f x)) :=
(inducing_iff _).trans (induced_iff_nhds_eq f)
#align inducing_iff_nhds inducing_iff_nhds
namespace Inducing
theorem nhds_eq_comap (hf : Inducing f) : β x : X, π x = comap f (π <| f x) :=
inducing_iff_nhds.1 hf
#align inducing.nhds_eq_comap Inducing.nhds_eq_comap
theorem basis_nhds {p : ΞΉ β Prop} {s : ΞΉ β Set Y} (hf : Inducing f) {x : X}
(h_basis : (π (f x)).HasBasis p s) : (π x).HasBasis p (preimage f β s) :=
hf.nhds_eq_comap x βΈ h_basis.comap f
theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) :
πΛ’ s = comap f (πΛ’ (f '' s)) := by
simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image]
#align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap
theorem map_nhds_eq (hf : Inducing f) (x : X) : (π x).map f = π[range f] f x :=
hf.induced.symm βΈ map_nhds_induced_eq x
#align inducing.map_nhds_eq Inducing.map_nhds_eq
theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f β π (f x)) :
(π x).map f = π (f x) :=
hf.induced.symm βΈ map_nhds_induced_of_mem h
#align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem
-- Porting note (#10756): new lemma
theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} :
MapClusterPt (f x) l f β ClusterPt x l := by
delta MapClusterPt ClusterPt
rw [β Filter.push_pull', β hf.nhds_eq_comap, map_neBot_iff]
theorem image_mem_nhdsWithin (hf : Inducing f) {x : X} {s : Set X} (hs : s β π x) :
f '' s β π[range f] f x :=
hf.map_nhds_eq x βΈ image_mem_map hs
#align inducing.image_mem_nhds_within Inducing.image_mem_nhdsWithin
| Mathlib/Topology/Maps.lean | 122 | 124 | theorem tendsto_nhds_iff {f : ΞΉ β Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) :
Tendsto f l (π y) β Tendsto (g β f) l (π (g y)) := by |
rw [hg.nhds_eq_comap, tendsto_comap_iff]
| 1 | 2.718282 | 0 | 0.5 | 12 | 442 |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section Inducing
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
theorem inducing_induced (f : X β Y) : @Inducing X Y (TopologicalSpace.induced f βΉ_βΊ) _ f :=
@Inducing.mk _ _ (TopologicalSpace.induced f βΉ_βΊ) _ _ rfl
theorem inducing_id : Inducing (@id X) :=
β¨induced_id.symmβ©
#align inducing_id inducing_id
protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) :
Inducing (g β f) :=
β¨by rw [hf.induced, hg.induced, induced_compose]β©
#align inducing.comp Inducing.comp
theorem Inducing.of_comp_iff (hg : Inducing g) :
Inducing (g β f) β Inducing f := by
refine β¨fun h β¦ ?_, hg.compβ©
rw [inducing_iff, hg.induced, induced_compose, h.induced]
#align inducing.inducing_iff Inducing.of_comp_iff
theorem inducing_of_inducing_compose
(hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g β f)) : Inducing f :=
β¨le_antisymm (by rwa [β continuous_iff_le_induced])
(by
rw [hgf.induced, β induced_compose]
exact induced_mono hg.le_induced)β©
#align inducing_of_inducing_compose inducing_of_inducing_compose
theorem inducing_iff_nhds : Inducing f β β x, π x = comap f (π (f x)) :=
(inducing_iff _).trans (induced_iff_nhds_eq f)
#align inducing_iff_nhds inducing_iff_nhds
namespace Inducing
theorem nhds_eq_comap (hf : Inducing f) : β x : X, π x = comap f (π <| f x) :=
inducing_iff_nhds.1 hf
#align inducing.nhds_eq_comap Inducing.nhds_eq_comap
theorem basis_nhds {p : ΞΉ β Prop} {s : ΞΉ β Set Y} (hf : Inducing f) {x : X}
(h_basis : (π (f x)).HasBasis p s) : (π x).HasBasis p (preimage f β s) :=
hf.nhds_eq_comap x βΈ h_basis.comap f
theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) :
πΛ’ s = comap f (πΛ’ (f '' s)) := by
simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image]
#align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap
theorem map_nhds_eq (hf : Inducing f) (x : X) : (π x).map f = π[range f] f x :=
hf.induced.symm βΈ map_nhds_induced_eq x
#align inducing.map_nhds_eq Inducing.map_nhds_eq
theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f β π (f x)) :
(π x).map f = π (f x) :=
hf.induced.symm βΈ map_nhds_induced_of_mem h
#align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem
-- Porting note (#10756): new lemma
theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} :
MapClusterPt (f x) l f β ClusterPt x l := by
delta MapClusterPt ClusterPt
rw [β Filter.push_pull', β hf.nhds_eq_comap, map_neBot_iff]
theorem image_mem_nhdsWithin (hf : Inducing f) {x : X} {s : Set X} (hs : s β π x) :
f '' s β π[range f] f x :=
hf.map_nhds_eq x βΈ image_mem_map hs
#align inducing.image_mem_nhds_within Inducing.image_mem_nhdsWithin
theorem tendsto_nhds_iff {f : ΞΉ β Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) :
Tendsto f l (π y) β Tendsto (g β f) l (π (g y)) := by
rw [hg.nhds_eq_comap, tendsto_comap_iff]
#align inducing.tendsto_nhds_iff Inducing.tendsto_nhds_iff
theorem continuousAt_iff (hg : Inducing g) {x : X} :
ContinuousAt f x β ContinuousAt (g β f) x :=
hg.tendsto_nhds_iff
#align inducing.continuous_at_iff Inducing.continuousAt_iff
| Mathlib/Topology/Maps.lean | 132 | 134 | theorem continuous_iff (hg : Inducing g) :
Continuous f β Continuous (g β f) := by |
simp_rw [continuous_iff_continuousAt, hg.continuousAt_iff]
| 1 | 2.718282 | 0 | 0.5 | 12 | 442 |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section Inducing
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
theorem inducing_induced (f : X β Y) : @Inducing X Y (TopologicalSpace.induced f βΉ_βΊ) _ f :=
@Inducing.mk _ _ (TopologicalSpace.induced f βΉ_βΊ) _ _ rfl
theorem inducing_id : Inducing (@id X) :=
β¨induced_id.symmβ©
#align inducing_id inducing_id
protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) :
Inducing (g β f) :=
β¨by rw [hf.induced, hg.induced, induced_compose]β©
#align inducing.comp Inducing.comp
theorem Inducing.of_comp_iff (hg : Inducing g) :
Inducing (g β f) β Inducing f := by
refine β¨fun h β¦ ?_, hg.compβ©
rw [inducing_iff, hg.induced, induced_compose, h.induced]
#align inducing.inducing_iff Inducing.of_comp_iff
theorem inducing_of_inducing_compose
(hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g β f)) : Inducing f :=
β¨le_antisymm (by rwa [β continuous_iff_le_induced])
(by
rw [hgf.induced, β induced_compose]
exact induced_mono hg.le_induced)β©
#align inducing_of_inducing_compose inducing_of_inducing_compose
theorem inducing_iff_nhds : Inducing f β β x, π x = comap f (π (f x)) :=
(inducing_iff _).trans (induced_iff_nhds_eq f)
#align inducing_iff_nhds inducing_iff_nhds
namespace Inducing
theorem nhds_eq_comap (hf : Inducing f) : β x : X, π x = comap f (π <| f x) :=
inducing_iff_nhds.1 hf
#align inducing.nhds_eq_comap Inducing.nhds_eq_comap
theorem basis_nhds {p : ΞΉ β Prop} {s : ΞΉ β Set Y} (hf : Inducing f) {x : X}
(h_basis : (π (f x)).HasBasis p s) : (π x).HasBasis p (preimage f β s) :=
hf.nhds_eq_comap x βΈ h_basis.comap f
theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) :
πΛ’ s = comap f (πΛ’ (f '' s)) := by
simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image]
#align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap
theorem map_nhds_eq (hf : Inducing f) (x : X) : (π x).map f = π[range f] f x :=
hf.induced.symm βΈ map_nhds_induced_eq x
#align inducing.map_nhds_eq Inducing.map_nhds_eq
theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f β π (f x)) :
(π x).map f = π (f x) :=
hf.induced.symm βΈ map_nhds_induced_of_mem h
#align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem
-- Porting note (#10756): new lemma
theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} :
MapClusterPt (f x) l f β ClusterPt x l := by
delta MapClusterPt ClusterPt
rw [β Filter.push_pull', β hf.nhds_eq_comap, map_neBot_iff]
theorem image_mem_nhdsWithin (hf : Inducing f) {x : X} {s : Set X} (hs : s β π x) :
f '' s β π[range f] f x :=
hf.map_nhds_eq x βΈ image_mem_map hs
#align inducing.image_mem_nhds_within Inducing.image_mem_nhdsWithin
theorem tendsto_nhds_iff {f : ΞΉ β Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) :
Tendsto f l (π y) β Tendsto (g β f) l (π (g y)) := by
rw [hg.nhds_eq_comap, tendsto_comap_iff]
#align inducing.tendsto_nhds_iff Inducing.tendsto_nhds_iff
theorem continuousAt_iff (hg : Inducing g) {x : X} :
ContinuousAt f x β ContinuousAt (g β f) x :=
hg.tendsto_nhds_iff
#align inducing.continuous_at_iff Inducing.continuousAt_iff
theorem continuous_iff (hg : Inducing g) :
Continuous f β Continuous (g β f) := by
simp_rw [continuous_iff_continuousAt, hg.continuousAt_iff]
#align inducing.continuous_iff Inducing.continuous_iff
| Mathlib/Topology/Maps.lean | 137 | 139 | theorem continuousAt_iff' (hf : Inducing f) {x : X} (h : range f β π (f x)) :
ContinuousAt (g β f) x β ContinuousAt g (f x) := by |
simp_rw [ContinuousAt, Filter.Tendsto, β hf.map_nhds_of_mem _ h, Filter.map_map, comp]
| 1 | 2.718282 | 0 | 0.5 | 12 | 442 |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section Inducing
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
theorem inducing_induced (f : X β Y) : @Inducing X Y (TopologicalSpace.induced f βΉ_βΊ) _ f :=
@Inducing.mk _ _ (TopologicalSpace.induced f βΉ_βΊ) _ _ rfl
theorem inducing_id : Inducing (@id X) :=
β¨induced_id.symmβ©
#align inducing_id inducing_id
protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) :
Inducing (g β f) :=
β¨by rw [hf.induced, hg.induced, induced_compose]β©
#align inducing.comp Inducing.comp
theorem Inducing.of_comp_iff (hg : Inducing g) :
Inducing (g β f) β Inducing f := by
refine β¨fun h β¦ ?_, hg.compβ©
rw [inducing_iff, hg.induced, induced_compose, h.induced]
#align inducing.inducing_iff Inducing.of_comp_iff
theorem inducing_of_inducing_compose
(hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g β f)) : Inducing f :=
β¨le_antisymm (by rwa [β continuous_iff_le_induced])
(by
rw [hgf.induced, β induced_compose]
exact induced_mono hg.le_induced)β©
#align inducing_of_inducing_compose inducing_of_inducing_compose
theorem inducing_iff_nhds : Inducing f β β x, π x = comap f (π (f x)) :=
(inducing_iff _).trans (induced_iff_nhds_eq f)
#align inducing_iff_nhds inducing_iff_nhds
namespace Inducing
theorem nhds_eq_comap (hf : Inducing f) : β x : X, π x = comap f (π <| f x) :=
inducing_iff_nhds.1 hf
#align inducing.nhds_eq_comap Inducing.nhds_eq_comap
theorem basis_nhds {p : ΞΉ β Prop} {s : ΞΉ β Set Y} (hf : Inducing f) {x : X}
(h_basis : (π (f x)).HasBasis p s) : (π x).HasBasis p (preimage f β s) :=
hf.nhds_eq_comap x βΈ h_basis.comap f
theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) :
πΛ’ s = comap f (πΛ’ (f '' s)) := by
simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image]
#align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap
theorem map_nhds_eq (hf : Inducing f) (x : X) : (π x).map f = π[range f] f x :=
hf.induced.symm βΈ map_nhds_induced_eq x
#align inducing.map_nhds_eq Inducing.map_nhds_eq
theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f β π (f x)) :
(π x).map f = π (f x) :=
hf.induced.symm βΈ map_nhds_induced_of_mem h
#align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem
-- Porting note (#10756): new lemma
theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} :
MapClusterPt (f x) l f β ClusterPt x l := by
delta MapClusterPt ClusterPt
rw [β Filter.push_pull', β hf.nhds_eq_comap, map_neBot_iff]
theorem image_mem_nhdsWithin (hf : Inducing f) {x : X} {s : Set X} (hs : s β π x) :
f '' s β π[range f] f x :=
hf.map_nhds_eq x βΈ image_mem_map hs
#align inducing.image_mem_nhds_within Inducing.image_mem_nhdsWithin
theorem tendsto_nhds_iff {f : ΞΉ β Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) :
Tendsto f l (π y) β Tendsto (g β f) l (π (g y)) := by
rw [hg.nhds_eq_comap, tendsto_comap_iff]
#align inducing.tendsto_nhds_iff Inducing.tendsto_nhds_iff
theorem continuousAt_iff (hg : Inducing g) {x : X} :
ContinuousAt f x β ContinuousAt (g β f) x :=
hg.tendsto_nhds_iff
#align inducing.continuous_at_iff Inducing.continuousAt_iff
theorem continuous_iff (hg : Inducing g) :
Continuous f β Continuous (g β f) := by
simp_rw [continuous_iff_continuousAt, hg.continuousAt_iff]
#align inducing.continuous_iff Inducing.continuous_iff
theorem continuousAt_iff' (hf : Inducing f) {x : X} (h : range f β π (f x)) :
ContinuousAt (g β f) x β ContinuousAt g (f x) := by
simp_rw [ContinuousAt, Filter.Tendsto, β hf.map_nhds_of_mem _ h, Filter.map_map, comp]
#align inducing.continuous_at_iff' Inducing.continuousAt_iff'
protected theorem continuous (hf : Inducing f) : Continuous f :=
hf.continuous_iff.mp continuous_id
#align inducing.continuous Inducing.continuous
| Mathlib/Topology/Maps.lean | 146 | 149 | theorem closure_eq_preimage_closure_image (hf : Inducing f) (s : Set X) :
closure s = f β»ΒΉ' closure (f '' s) := by |
ext x
rw [Set.mem_preimage, β closure_induced, hf.induced]
| 2 | 7.389056 | 1 | 0.5 | 12 | 442 |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section Inducing
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
theorem inducing_induced (f : X β Y) : @Inducing X Y (TopologicalSpace.induced f βΉ_βΊ) _ f :=
@Inducing.mk _ _ (TopologicalSpace.induced f βΉ_βΊ) _ _ rfl
theorem inducing_id : Inducing (@id X) :=
β¨induced_id.symmβ©
#align inducing_id inducing_id
protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) :
Inducing (g β f) :=
β¨by rw [hf.induced, hg.induced, induced_compose]β©
#align inducing.comp Inducing.comp
theorem Inducing.of_comp_iff (hg : Inducing g) :
Inducing (g β f) β Inducing f := by
refine β¨fun h β¦ ?_, hg.compβ©
rw [inducing_iff, hg.induced, induced_compose, h.induced]
#align inducing.inducing_iff Inducing.of_comp_iff
theorem inducing_of_inducing_compose
(hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g β f)) : Inducing f :=
β¨le_antisymm (by rwa [β continuous_iff_le_induced])
(by
rw [hgf.induced, β induced_compose]
exact induced_mono hg.le_induced)β©
#align inducing_of_inducing_compose inducing_of_inducing_compose
theorem inducing_iff_nhds : Inducing f β β x, π x = comap f (π (f x)) :=
(inducing_iff _).trans (induced_iff_nhds_eq f)
#align inducing_iff_nhds inducing_iff_nhds
namespace Inducing
theorem nhds_eq_comap (hf : Inducing f) : β x : X, π x = comap f (π <| f x) :=
inducing_iff_nhds.1 hf
#align inducing.nhds_eq_comap Inducing.nhds_eq_comap
theorem basis_nhds {p : ΞΉ β Prop} {s : ΞΉ β Set Y} (hf : Inducing f) {x : X}
(h_basis : (π (f x)).HasBasis p s) : (π x).HasBasis p (preimage f β s) :=
hf.nhds_eq_comap x βΈ h_basis.comap f
theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) :
πΛ’ s = comap f (πΛ’ (f '' s)) := by
simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image]
#align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap
theorem map_nhds_eq (hf : Inducing f) (x : X) : (π x).map f = π[range f] f x :=
hf.induced.symm βΈ map_nhds_induced_eq x
#align inducing.map_nhds_eq Inducing.map_nhds_eq
theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f β π (f x)) :
(π x).map f = π (f x) :=
hf.induced.symm βΈ map_nhds_induced_of_mem h
#align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem
-- Porting note (#10756): new lemma
theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} :
MapClusterPt (f x) l f β ClusterPt x l := by
delta MapClusterPt ClusterPt
rw [β Filter.push_pull', β hf.nhds_eq_comap, map_neBot_iff]
theorem image_mem_nhdsWithin (hf : Inducing f) {x : X} {s : Set X} (hs : s β π x) :
f '' s β π[range f] f x :=
hf.map_nhds_eq x βΈ image_mem_map hs
#align inducing.image_mem_nhds_within Inducing.image_mem_nhdsWithin
theorem tendsto_nhds_iff {f : ΞΉ β Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) :
Tendsto f l (π y) β Tendsto (g β f) l (π (g y)) := by
rw [hg.nhds_eq_comap, tendsto_comap_iff]
#align inducing.tendsto_nhds_iff Inducing.tendsto_nhds_iff
theorem continuousAt_iff (hg : Inducing g) {x : X} :
ContinuousAt f x β ContinuousAt (g β f) x :=
hg.tendsto_nhds_iff
#align inducing.continuous_at_iff Inducing.continuousAt_iff
theorem continuous_iff (hg : Inducing g) :
Continuous f β Continuous (g β f) := by
simp_rw [continuous_iff_continuousAt, hg.continuousAt_iff]
#align inducing.continuous_iff Inducing.continuous_iff
theorem continuousAt_iff' (hf : Inducing f) {x : X} (h : range f β π (f x)) :
ContinuousAt (g β f) x β ContinuousAt g (f x) := by
simp_rw [ContinuousAt, Filter.Tendsto, β hf.map_nhds_of_mem _ h, Filter.map_map, comp]
#align inducing.continuous_at_iff' Inducing.continuousAt_iff'
protected theorem continuous (hf : Inducing f) : Continuous f :=
hf.continuous_iff.mp continuous_id
#align inducing.continuous Inducing.continuous
theorem closure_eq_preimage_closure_image (hf : Inducing f) (s : Set X) :
closure s = f β»ΒΉ' closure (f '' s) := by
ext x
rw [Set.mem_preimage, β closure_induced, hf.induced]
#align inducing.closure_eq_preimage_closure_image Inducing.closure_eq_preimage_closure_image
| Mathlib/Topology/Maps.lean | 152 | 153 | theorem isClosed_iff (hf : Inducing f) {s : Set X} :
IsClosed s β β t, IsClosed t β§ f β»ΒΉ' t = s := by | rw [hf.induced, isClosed_induced_iff]
| 1 | 2.718282 | 0 | 0.5 | 12 | 442 |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section Inducing
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
theorem inducing_induced (f : X β Y) : @Inducing X Y (TopologicalSpace.induced f βΉ_βΊ) _ f :=
@Inducing.mk _ _ (TopologicalSpace.induced f βΉ_βΊ) _ _ rfl
theorem inducing_id : Inducing (@id X) :=
β¨induced_id.symmβ©
#align inducing_id inducing_id
protected theorem Inducing.comp (hg : Inducing g) (hf : Inducing f) :
Inducing (g β f) :=
β¨by rw [hf.induced, hg.induced, induced_compose]β©
#align inducing.comp Inducing.comp
theorem Inducing.of_comp_iff (hg : Inducing g) :
Inducing (g β f) β Inducing f := by
refine β¨fun h β¦ ?_, hg.compβ©
rw [inducing_iff, hg.induced, induced_compose, h.induced]
#align inducing.inducing_iff Inducing.of_comp_iff
theorem inducing_of_inducing_compose
(hf : Continuous f) (hg : Continuous g) (hgf : Inducing (g β f)) : Inducing f :=
β¨le_antisymm (by rwa [β continuous_iff_le_induced])
(by
rw [hgf.induced, β induced_compose]
exact induced_mono hg.le_induced)β©
#align inducing_of_inducing_compose inducing_of_inducing_compose
theorem inducing_iff_nhds : Inducing f β β x, π x = comap f (π (f x)) :=
(inducing_iff _).trans (induced_iff_nhds_eq f)
#align inducing_iff_nhds inducing_iff_nhds
namespace Inducing
theorem nhds_eq_comap (hf : Inducing f) : β x : X, π x = comap f (π <| f x) :=
inducing_iff_nhds.1 hf
#align inducing.nhds_eq_comap Inducing.nhds_eq_comap
theorem basis_nhds {p : ΞΉ β Prop} {s : ΞΉ β Set Y} (hf : Inducing f) {x : X}
(h_basis : (π (f x)).HasBasis p s) : (π x).HasBasis p (preimage f β s) :=
hf.nhds_eq_comap x βΈ h_basis.comap f
theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) :
πΛ’ s = comap f (πΛ’ (f '' s)) := by
simp only [nhdsSet, sSup_image, comap_iSup, hf.nhds_eq_comap, iSup_image]
#align inducing.nhds_set_eq_comap Inducing.nhdsSet_eq_comap
theorem map_nhds_eq (hf : Inducing f) (x : X) : (π x).map f = π[range f] f x :=
hf.induced.symm βΈ map_nhds_induced_eq x
#align inducing.map_nhds_eq Inducing.map_nhds_eq
theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f β π (f x)) :
(π x).map f = π (f x) :=
hf.induced.symm βΈ map_nhds_induced_of_mem h
#align inducing.map_nhds_of_mem Inducing.map_nhds_of_mem
-- Porting note (#10756): new lemma
theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} :
MapClusterPt (f x) l f β ClusterPt x l := by
delta MapClusterPt ClusterPt
rw [β Filter.push_pull', β hf.nhds_eq_comap, map_neBot_iff]
theorem image_mem_nhdsWithin (hf : Inducing f) {x : X} {s : Set X} (hs : s β π x) :
f '' s β π[range f] f x :=
hf.map_nhds_eq x βΈ image_mem_map hs
#align inducing.image_mem_nhds_within Inducing.image_mem_nhdsWithin
theorem tendsto_nhds_iff {f : ΞΉ β Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) :
Tendsto f l (π y) β Tendsto (g β f) l (π (g y)) := by
rw [hg.nhds_eq_comap, tendsto_comap_iff]
#align inducing.tendsto_nhds_iff Inducing.tendsto_nhds_iff
theorem continuousAt_iff (hg : Inducing g) {x : X} :
ContinuousAt f x β ContinuousAt (g β f) x :=
hg.tendsto_nhds_iff
#align inducing.continuous_at_iff Inducing.continuousAt_iff
theorem continuous_iff (hg : Inducing g) :
Continuous f β Continuous (g β f) := by
simp_rw [continuous_iff_continuousAt, hg.continuousAt_iff]
#align inducing.continuous_iff Inducing.continuous_iff
theorem continuousAt_iff' (hf : Inducing f) {x : X} (h : range f β π (f x)) :
ContinuousAt (g β f) x β ContinuousAt g (f x) := by
simp_rw [ContinuousAt, Filter.Tendsto, β hf.map_nhds_of_mem _ h, Filter.map_map, comp]
#align inducing.continuous_at_iff' Inducing.continuousAt_iff'
protected theorem continuous (hf : Inducing f) : Continuous f :=
hf.continuous_iff.mp continuous_id
#align inducing.continuous Inducing.continuous
theorem closure_eq_preimage_closure_image (hf : Inducing f) (s : Set X) :
closure s = f β»ΒΉ' closure (f '' s) := by
ext x
rw [Set.mem_preimage, β closure_induced, hf.induced]
#align inducing.closure_eq_preimage_closure_image Inducing.closure_eq_preimage_closure_image
theorem isClosed_iff (hf : Inducing f) {s : Set X} :
IsClosed s β β t, IsClosed t β§ f β»ΒΉ' t = s := by rw [hf.induced, isClosed_induced_iff]
#align inducing.is_closed_iff Inducing.isClosed_iff
| Mathlib/Topology/Maps.lean | 156 | 157 | theorem isClosed_iff' (hf : Inducing f) {s : Set X} :
IsClosed s β β x, f x β closure (f '' s) β x β s := by | rw [hf.induced, isClosed_induced_iff']
| 1 | 2.718282 | 0 | 0.5 | 12 | 442 |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section OpenMap
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
namespace IsOpenMap
protected theorem id : IsOpenMap (@id X) := fun s hs => by rwa [image_id]
#align is_open_map.id IsOpenMap.id
protected theorem comp (hg : IsOpenMap g) (hf : IsOpenMap f) :
IsOpenMap (g β f) := fun s hs => by rw [image_comp]; exact hg _ (hf _ hs)
#align is_open_map.comp IsOpenMap.comp
| Mathlib/Topology/Maps.lean | 338 | 340 | theorem isOpen_range (hf : IsOpenMap f) : IsOpen (range f) := by |
rw [β image_univ]
exact hf _ isOpen_univ
| 2 | 7.389056 | 1 | 0.5 | 12 | 442 |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section OpenMap
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
namespace IsOpenMap
protected theorem id : IsOpenMap (@id X) := fun s hs => by rwa [image_id]
#align is_open_map.id IsOpenMap.id
protected theorem comp (hg : IsOpenMap g) (hf : IsOpenMap f) :
IsOpenMap (g β f) := fun s hs => by rw [image_comp]; exact hg _ (hf _ hs)
#align is_open_map.comp IsOpenMap.comp
theorem isOpen_range (hf : IsOpenMap f) : IsOpen (range f) := by
rw [β image_univ]
exact hf _ isOpen_univ
#align is_open_map.is_open_range IsOpenMap.isOpen_range
theorem image_mem_nhds (hf : IsOpenMap f) {x : X} {s : Set X} (hx : s β π x) : f '' s β π (f x) :=
let β¨t, hts, ht, hxtβ© := mem_nhds_iff.1 hx
mem_of_superset (IsOpen.mem_nhds (hf t ht) (mem_image_of_mem _ hxt)) (image_subset _ hts)
#align is_open_map.image_mem_nhds IsOpenMap.image_mem_nhds
theorem range_mem_nhds (hf : IsOpenMap f) (x : X) : range f β π (f x) :=
hf.isOpen_range.mem_nhds <| mem_range_self _
#align is_open_map.range_mem_nhds IsOpenMap.range_mem_nhds
theorem mapsTo_interior (hf : IsOpenMap f) {s : Set X} {t : Set Y} (h : MapsTo f s t) :
MapsTo f (interior s) (interior t) :=
mapsTo'.2 <|
interior_maximal (h.mono interior_subset Subset.rfl).image_subset (hf _ isOpen_interior)
#align is_open_map.maps_to_interior IsOpenMap.mapsTo_interior
theorem image_interior_subset (hf : IsOpenMap f) (s : Set X) :
f '' interior s β interior (f '' s) :=
(hf.mapsTo_interior (mapsTo_image f s)).image_subset
#align is_open_map.image_interior_subset IsOpenMap.image_interior_subset
theorem nhds_le (hf : IsOpenMap f) (x : X) : π (f x) β€ (π x).map f :=
le_map fun _ => hf.image_mem_nhds
#align is_open_map.nhds_le IsOpenMap.nhds_le
theorem of_nhds_le (hf : β x, π (f x) β€ map f (π x)) : IsOpenMap f := fun _s hs =>
isOpen_iff_mem_nhds.2 fun _y β¨_x, hxs, hxyβ© => hxy βΈ hf _ (image_mem_map <| hs.mem_nhds hxs)
#align is_open_map.of_nhds_le IsOpenMap.of_nhds_le
| Mathlib/Topology/Maps.lean | 371 | 378 | theorem of_sections
(h : β x, β g : Y β X, ContinuousAt g (f x) β§ g (f x) = x β§ RightInverse g f) : IsOpenMap f :=
of_nhds_le fun x =>
let β¨g, hgc, hgx, hgfβ© := h x
calc
π (f x) = map f (map g (π (f x))) := by | rw [map_map, hgf.comp_eq_id, map_id]
_ β€ map f (π (g (f x))) := map_mono hgc
_ = map f (π x) := by rw [hgx]
| 3 | 20.085537 | 1 | 0.5 | 12 | 442 |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section OpenMap
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
section IsClosedMap
variable [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z]
namespace IsClosedMap
open Function
protected theorem id : IsClosedMap (@id X) := fun s hs => by rwa [image_id]
#align is_closed_map.id IsClosedMap.id
protected theorem comp (hg : IsClosedMap g) (hf : IsClosedMap f) : IsClosedMap (g β f) := by
intro s hs
rw [image_comp]
exact hg _ (hf _ hs)
#align is_closed_map.comp IsClosedMap.comp
theorem closure_image_subset (hf : IsClosedMap f) (s : Set X) :
closure (f '' s) β f '' closure s :=
closure_minimal (image_subset _ subset_closure) (hf _ isClosed_closure)
#align is_closed_map.closure_image_subset IsClosedMap.closure_image_subset
theorem of_inverse {f' : Y β X} (h : Continuous f') (l_inv : LeftInverse f f')
(r_inv : RightInverse f f') : IsClosedMap f := fun s hs => by
rw [image_eq_preimage_of_inverse r_inv l_inv]
exact hs.preimage h
#align is_closed_map.of_inverse IsClosedMap.of_inverse
| Mathlib/Topology/Maps.lean | 478 | 482 | theorem of_nonempty (h : β s, IsClosed s β s.Nonempty β IsClosed (f '' s)) :
IsClosedMap f := by |
intro s hs; rcases eq_empty_or_nonempty s with h2s | h2s
Β· simp_rw [h2s, image_empty, isClosed_empty]
Β· exact h s hs h2s
| 3 | 20.085537 | 1 | 0.5 | 12 | 442 |
import Mathlib.Topology.Algebra.Module.WeakDual
import Mathlib.Analysis.Normed.Field.Basic
import Mathlib.Analysis.LocallyConvex.WithSeminorms
#align_import analysis.locally_convex.weak_dual from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
variable {π E F ΞΉ : Type*}
open Topology
section BilinForm
namespace LinearMap
variable [NormedField π] [AddCommGroup E] [Module π E] [AddCommGroup F] [Module π F]
def toSeminorm (f : E ββ[π] π) : Seminorm π E :=
(normSeminorm π π).comp f
#align linear_map.to_seminorm LinearMap.toSeminorm
theorem coe_toSeminorm {f : E ββ[π] π} : βf.toSeminorm = fun x => βf xβ :=
rfl
#align linear_map.coe_to_seminorm LinearMap.coe_toSeminorm
@[simp]
theorem toSeminorm_apply {f : E ββ[π] π} {x : E} : f.toSeminorm x = βf xβ :=
rfl
#align linear_map.to_seminorm_apply LinearMap.toSeminorm_apply
| Mathlib/Analysis/LocallyConvex/WeakDual.lean | 68 | 70 | theorem toSeminorm_ball_zero {f : E ββ[π] π} {r : β} :
Seminorm.ball f.toSeminorm 0 r = { x : E | βf xβ < r } := by |
simp only [Seminorm.ball_zero_eq, toSeminorm_apply]
| 1 | 2.718282 | 0 | 0.5 | 2 | 443 |
import Mathlib.Topology.Algebra.Module.WeakDual
import Mathlib.Analysis.Normed.Field.Basic
import Mathlib.Analysis.LocallyConvex.WithSeminorms
#align_import analysis.locally_convex.weak_dual from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
variable {π E F ΞΉ : Type*}
open Topology
section BilinForm
namespace LinearMap
variable [NormedField π] [AddCommGroup E] [Module π E] [AddCommGroup F] [Module π F]
def toSeminorm (f : E ββ[π] π) : Seminorm π E :=
(normSeminorm π π).comp f
#align linear_map.to_seminorm LinearMap.toSeminorm
theorem coe_toSeminorm {f : E ββ[π] π} : βf.toSeminorm = fun x => βf xβ :=
rfl
#align linear_map.coe_to_seminorm LinearMap.coe_toSeminorm
@[simp]
theorem toSeminorm_apply {f : E ββ[π] π} {x : E} : f.toSeminorm x = βf xβ :=
rfl
#align linear_map.to_seminorm_apply LinearMap.toSeminorm_apply
theorem toSeminorm_ball_zero {f : E ββ[π] π} {r : β} :
Seminorm.ball f.toSeminorm 0 r = { x : E | βf xβ < r } := by
simp only [Seminorm.ball_zero_eq, toSeminorm_apply]
#align linear_map.to_seminorm_ball_zero LinearMap.toSeminorm_ball_zero
| Mathlib/Analysis/LocallyConvex/WeakDual.lean | 73 | 76 | theorem toSeminorm_comp (f : F ββ[π] π) (g : E ββ[π] F) :
f.toSeminorm.comp g = (f.comp g).toSeminorm := by |
ext
simp only [Seminorm.comp_apply, toSeminorm_apply, coe_comp, Function.comp_apply]
| 2 | 7.389056 | 1 | 0.5 | 2 | 443 |
import Mathlib.Topology.Algebra.InfiniteSum.Order
import Mathlib.Topology.Algebra.InfiniteSum.Ring
import Mathlib.Topology.Instances.Real
import Mathlib.Topology.MetricSpace.Isometry
#align_import topology.instances.nnreal from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
noncomputable section
open Set TopologicalSpace Metric Filter
open Topology
namespace NNReal
open NNReal Filter
instance : TopologicalSpace ββ₯0 := inferInstance
-- short-circuit type class inference
instance : TopologicalSemiring ββ₯0 where
toContinuousAdd := continuousAdd_induced toRealHom
toContinuousMul := continuousMul_induced toRealHom
instance : SecondCountableTopology ββ₯0 :=
inferInstanceAs (SecondCountableTopology { x : β | 0 β€ x })
instance : OrderTopology ββ₯0 :=
orderTopology_of_ordConnected (t := Ici 0)
instance : CompleteSpace ββ₯0 :=
isClosed_Ici.completeSpace_coe
instance : ContinuousStar ββ₯0 where
continuous_star := continuous_id
section coe
variable {Ξ± : Type*}
open Filter Finset
theorem _root_.continuous_real_toNNReal : Continuous Real.toNNReal :=
(continuous_id.max continuous_const).subtype_mk _
#align continuous_real_to_nnreal continuous_real_toNNReal
@[simps (config := .asFn)]
noncomputable def _root_.ContinuousMap.realToNNReal : C(β, ββ₯0) :=
.mk Real.toNNReal continuous_real_toNNReal
theorem continuous_coe : Continuous ((β) : ββ₯0 β β) :=
continuous_subtype_val
#align nnreal.continuous_coe NNReal.continuous_coe
@[simps (config := .asFn)]
def _root_.ContinuousMap.coeNNRealReal : C(ββ₯0, β) :=
β¨(β), continuous_coeβ©
#align continuous_map.coe_nnreal_real ContinuousMap.coeNNRealReal
#align continuous_map.coe_nnreal_real_apply ContinuousMap.coeNNRealReal_apply
instance ContinuousMap.canLift {X : Type*} [TopologicalSpace X] :
CanLift C(X, β) C(X, ββ₯0) ContinuousMap.coeNNRealReal.comp fun f => β x, 0 β€ f x where
prf f hf := β¨β¨fun x => β¨f x, hf xβ©, f.2.subtype_mk _β©, DFunLike.ext' rflβ©
#align nnreal.continuous_map.can_lift NNReal.ContinuousMap.canLift
@[simp, norm_cast]
theorem tendsto_coe {f : Filter Ξ±} {m : Ξ± β ββ₯0} {x : ββ₯0} :
Tendsto (fun a => (m a : β)) f (π (x : β)) β Tendsto m f (π x) :=
tendsto_subtype_rng.symm
#align nnreal.tendsto_coe NNReal.tendsto_coe
theorem tendsto_coe' {f : Filter Ξ±} [NeBot f] {m : Ξ± β ββ₯0} {x : β} :
Tendsto (fun a => m a : Ξ± β β) f (π x) β β hx : 0 β€ x, Tendsto m f (π β¨x, hxβ©) :=
β¨fun h => β¨ge_of_tendsto' h fun c => (m c).2, tendsto_coe.1 hβ©, fun β¨_, hmβ© => tendsto_coe.2 hmβ©
#align nnreal.tendsto_coe' NNReal.tendsto_coe'
@[simp] theorem map_coe_atTop : map toReal atTop = atTop := map_val_Ici_atTop 0
#align nnreal.map_coe_at_top NNReal.map_coe_atTop
theorem comap_coe_atTop : comap toReal atTop = atTop := (atTop_Ici_eq 0).symm
#align nnreal.comap_coe_at_top NNReal.comap_coe_atTop
@[simp, norm_cast]
theorem tendsto_coe_atTop {f : Filter Ξ±} {m : Ξ± β ββ₯0} :
Tendsto (fun a => (m a : β)) f atTop β Tendsto m f atTop :=
tendsto_Ici_atTop.symm
#align nnreal.tendsto_coe_at_top NNReal.tendsto_coe_atTop
theorem _root_.tendsto_real_toNNReal {f : Filter Ξ±} {m : Ξ± β β} {x : β} (h : Tendsto m f (π x)) :
Tendsto (fun a => Real.toNNReal (m a)) f (π (Real.toNNReal x)) :=
(continuous_real_toNNReal.tendsto _).comp h
#align tendsto_real_to_nnreal tendsto_real_toNNReal
| Mathlib/Topology/Instances/NNReal.lean | 140 | 142 | theorem _root_.tendsto_real_toNNReal_atTop : Tendsto Real.toNNReal atTop atTop := by |
rw [β tendsto_coe_atTop]
exact tendsto_atTop_mono Real.le_coe_toNNReal tendsto_id
| 2 | 7.389056 | 1 | 0.5 | 2 | 444 |
import Mathlib.Topology.Algebra.InfiniteSum.Order
import Mathlib.Topology.Algebra.InfiniteSum.Ring
import Mathlib.Topology.Instances.Real
import Mathlib.Topology.MetricSpace.Isometry
#align_import topology.instances.nnreal from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
noncomputable section
open Set TopologicalSpace Metric Filter
open Topology
namespace NNReal
open NNReal Filter
instance : TopologicalSpace ββ₯0 := inferInstance
-- short-circuit type class inference
instance : TopologicalSemiring ββ₯0 where
toContinuousAdd := continuousAdd_induced toRealHom
toContinuousMul := continuousMul_induced toRealHom
instance : SecondCountableTopology ββ₯0 :=
inferInstanceAs (SecondCountableTopology { x : β | 0 β€ x })
instance : OrderTopology ββ₯0 :=
orderTopology_of_ordConnected (t := Ici 0)
instance : CompleteSpace ββ₯0 :=
isClosed_Ici.completeSpace_coe
instance : ContinuousStar ββ₯0 where
continuous_star := continuous_id
section coe
variable {Ξ± : Type*}
open Filter Finset
theorem _root_.continuous_real_toNNReal : Continuous Real.toNNReal :=
(continuous_id.max continuous_const).subtype_mk _
#align continuous_real_to_nnreal continuous_real_toNNReal
@[simps (config := .asFn)]
noncomputable def _root_.ContinuousMap.realToNNReal : C(β, ββ₯0) :=
.mk Real.toNNReal continuous_real_toNNReal
theorem continuous_coe : Continuous ((β) : ββ₯0 β β) :=
continuous_subtype_val
#align nnreal.continuous_coe NNReal.continuous_coe
@[simps (config := .asFn)]
def _root_.ContinuousMap.coeNNRealReal : C(ββ₯0, β) :=
β¨(β), continuous_coeβ©
#align continuous_map.coe_nnreal_real ContinuousMap.coeNNRealReal
#align continuous_map.coe_nnreal_real_apply ContinuousMap.coeNNRealReal_apply
instance ContinuousMap.canLift {X : Type*} [TopologicalSpace X] :
CanLift C(X, β) C(X, ββ₯0) ContinuousMap.coeNNRealReal.comp fun f => β x, 0 β€ f x where
prf f hf := β¨β¨fun x => β¨f x, hf xβ©, f.2.subtype_mk _β©, DFunLike.ext' rflβ©
#align nnreal.continuous_map.can_lift NNReal.ContinuousMap.canLift
@[simp, norm_cast]
theorem tendsto_coe {f : Filter Ξ±} {m : Ξ± β ββ₯0} {x : ββ₯0} :
Tendsto (fun a => (m a : β)) f (π (x : β)) β Tendsto m f (π x) :=
tendsto_subtype_rng.symm
#align nnreal.tendsto_coe NNReal.tendsto_coe
theorem tendsto_coe' {f : Filter Ξ±} [NeBot f] {m : Ξ± β ββ₯0} {x : β} :
Tendsto (fun a => m a : Ξ± β β) f (π x) β β hx : 0 β€ x, Tendsto m f (π β¨x, hxβ©) :=
β¨fun h => β¨ge_of_tendsto' h fun c => (m c).2, tendsto_coe.1 hβ©, fun β¨_, hmβ© => tendsto_coe.2 hmβ©
#align nnreal.tendsto_coe' NNReal.tendsto_coe'
@[simp] theorem map_coe_atTop : map toReal atTop = atTop := map_val_Ici_atTop 0
#align nnreal.map_coe_at_top NNReal.map_coe_atTop
theorem comap_coe_atTop : comap toReal atTop = atTop := (atTop_Ici_eq 0).symm
#align nnreal.comap_coe_at_top NNReal.comap_coe_atTop
@[simp, norm_cast]
theorem tendsto_coe_atTop {f : Filter Ξ±} {m : Ξ± β ββ₯0} :
Tendsto (fun a => (m a : β)) f atTop β Tendsto m f atTop :=
tendsto_Ici_atTop.symm
#align nnreal.tendsto_coe_at_top NNReal.tendsto_coe_atTop
theorem _root_.tendsto_real_toNNReal {f : Filter Ξ±} {m : Ξ± β β} {x : β} (h : Tendsto m f (π x)) :
Tendsto (fun a => Real.toNNReal (m a)) f (π (Real.toNNReal x)) :=
(continuous_real_toNNReal.tendsto _).comp h
#align tendsto_real_to_nnreal tendsto_real_toNNReal
theorem _root_.tendsto_real_toNNReal_atTop : Tendsto Real.toNNReal atTop atTop := by
rw [β tendsto_coe_atTop]
exact tendsto_atTop_mono Real.le_coe_toNNReal tendsto_id
#align tendsto_real_to_nnreal_at_top tendsto_real_toNNReal_atTop
theorem nhds_zero : π (0 : ββ₯0) = β¨
(a : ββ₯0) (_ : a β 0), π (Iio a) :=
nhds_bot_order.trans <| by simp only [bot_lt_iff_ne_bot]; rfl
#align nnreal.nhds_zero NNReal.nhds_zero
theorem nhds_zero_basis : (π (0 : ββ₯0)).HasBasis (fun a : ββ₯0 => 0 < a) fun a => Iio a :=
nhds_bot_basis
#align nnreal.nhds_zero_basis NNReal.nhds_zero_basis
instance : ContinuousSub ββ₯0 :=
β¨((continuous_coe.fst'.sub continuous_coe.snd').max continuous_const).subtype_mk _β©
instance : HasContinuousInvβ ββ₯0 := inferInstance
instance [TopologicalSpace Ξ±] [MulAction β Ξ±] [ContinuousSMul β Ξ±] :
ContinuousSMul ββ₯0 Ξ± where
continuous_smul := continuous_induced_dom.fst'.smul continuous_snd
@[norm_cast]
| Mathlib/Topology/Instances/NNReal.lean | 163 | 164 | theorem hasSum_coe {f : Ξ± β ββ₯0} {r : ββ₯0} : HasSum (fun a => (f a : β)) (r : β) β HasSum f r := by |
simp only [HasSum, β coe_sum, tendsto_coe]
| 1 | 2.718282 | 0 | 0.5 | 2 | 444 |
import Mathlib.LinearAlgebra.LinearIndependent
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe w w' u u' v v'
variable {R : Type u} {R' : Type u'} {M Mβ : Type v} {M' : Type v'}
open Cardinal Submodule Function Set
section Module
section
variable [Semiring R] [AddCommMonoid M] [Module R M]
variable (R M)
protected irreducible_def Module.rank : Cardinal :=
β¨ ΞΉ : { s : Set M // LinearIndependent R ((β) : s β M) }, (#ΞΉ.1)
#align module.rank Module.rank
theorem rank_le_card : Module.rank R M β€ #M :=
(Module.rank_def _ _).trans_le (ciSup_le' fun _ β¦ mk_set_le _)
lemma nonempty_linearIndependent_set : Nonempty {s : Set M // LinearIndependent R ((β) : s β M)} :=
β¨β¨β
, linearIndependent_empty _ _β©β©
end
variable [Ring R] [Ring R'] [AddCommGroup M] [AddCommGroup M'] [AddCommGroup Mβ]
variable [Module R M] [Module R M'] [Module R Mβ] [Module R' M'] [Module R' Mβ]
namespace LinearIndependent
variable [Nontrivial R]
| Mathlib/LinearAlgebra/Dimension/Basic.lean | 79 | 84 | theorem cardinal_lift_le_rank {ΞΉ : Type w} {v : ΞΉ β M}
(hv : LinearIndependent R v) :
Cardinal.lift.{v} #ΞΉ β€ Cardinal.lift.{w} (Module.rank R M) := by |
rw [Module.rank]
refine le_trans ?_ (lift_le.mpr <| le_ciSup (bddAbove_range.{v, v} _) β¨_, hv.coe_rangeβ©)
exact lift_mk_le'.mpr β¨(Equiv.ofInjective _ hv.injective).toEmbeddingβ©
| 3 | 20.085537 | 1 | 0.5 | 2 | 445 |
import Mathlib.LinearAlgebra.LinearIndependent
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe w w' u u' v v'
variable {R : Type u} {R' : Type u'} {M Mβ : Type v} {M' : Type v'}
open Cardinal Submodule Function Set
section Module
section
variable [Semiring R] [AddCommMonoid M] [Module R M]
variable (R M)
protected irreducible_def Module.rank : Cardinal :=
β¨ ΞΉ : { s : Set M // LinearIndependent R ((β) : s β M) }, (#ΞΉ.1)
#align module.rank Module.rank
theorem rank_le_card : Module.rank R M β€ #M :=
(Module.rank_def _ _).trans_le (ciSup_le' fun _ β¦ mk_set_le _)
lemma nonempty_linearIndependent_set : Nonempty {s : Set M // LinearIndependent R ((β) : s β M)} :=
β¨β¨β
, linearIndependent_empty _ _β©β©
end
variable [Ring R] [Ring R'] [AddCommGroup M] [AddCommGroup M'] [AddCommGroup Mβ]
variable [Module R M] [Module R M'] [Module R Mβ] [Module R' M'] [Module R' Mβ]
namespace LinearIndependent
variable [Nontrivial R]
theorem cardinal_lift_le_rank {ΞΉ : Type w} {v : ΞΉ β M}
(hv : LinearIndependent R v) :
Cardinal.lift.{v} #ΞΉ β€ Cardinal.lift.{w} (Module.rank R M) := by
rw [Module.rank]
refine le_trans ?_ (lift_le.mpr <| le_ciSup (bddAbove_range.{v, v} _) β¨_, hv.coe_rangeβ©)
exact lift_mk_le'.mpr β¨(Equiv.ofInjective _ hv.injective).toEmbeddingβ©
#align cardinal_lift_le_rank_of_linear_independent LinearIndependent.cardinal_lift_le_rank
#align cardinal_lift_le_rank_of_linear_independent' LinearIndependent.cardinal_lift_le_rank
lemma aleph0_le_rank {ΞΉ : Type w} [Infinite ΞΉ] {v : ΞΉ β M}
(hv : LinearIndependent R v) : β΅β β€ Module.rank R M :=
aleph0_le_lift.mp <| (aleph0_le_lift.mpr <| aleph0_le_mk ΞΉ).trans hv.cardinal_lift_le_rank
| Mathlib/LinearAlgebra/Dimension/Basic.lean | 92 | 94 | theorem cardinal_le_rank {ΞΉ : Type v} {v : ΞΉ β M}
(hv : LinearIndependent R v) : #ΞΉ β€ Module.rank R M := by |
simpa using hv.cardinal_lift_le_rank
| 1 | 2.718282 | 0 | 0.5 | 2 | 445 |
import Mathlib.Topology.Compactness.SigmaCompact
import Mathlib.Topology.Connected.TotallyDisconnected
import Mathlib.Topology.Inseparable
#align_import topology.separation from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Function Set Filter Topology TopologicalSpace
open scoped Classical
universe u v
variable {X : Type*} {Y : Type*} [TopologicalSpace X]
section Separation
def SeparatedNhds : Set X β Set X β Prop := fun s t : Set X =>
β U V : Set X, IsOpen U β§ IsOpen V β§ s β U β§ t β V β§ Disjoint U V
#align separated_nhds SeparatedNhds
| Mathlib/Topology/Separation.lean | 125 | 127 | theorem separatedNhds_iff_disjoint {s t : Set X} : SeparatedNhds s t β Disjoint (πΛ’ s) (πΛ’ t) := by |
simp only [(hasBasis_nhdsSet s).disjoint_iff (hasBasis_nhdsSet t), SeparatedNhds, exists_prop, β
exists_and_left, and_assoc, and_comm, and_left_comm]
| 2 | 7.389056 | 1 | 0.5 | 4 | 446 |
import Mathlib.Topology.Compactness.SigmaCompact
import Mathlib.Topology.Connected.TotallyDisconnected
import Mathlib.Topology.Inseparable
#align_import topology.separation from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Function Set Filter Topology TopologicalSpace
open scoped Classical
universe u v
variable {X : Type*} {Y : Type*} [TopologicalSpace X]
section Separation
def SeparatedNhds : Set X β Set X β Prop := fun s t : Set X =>
β U V : Set X, IsOpen U β§ IsOpen V β§ s β U β§ t β V β§ Disjoint U V
#align separated_nhds SeparatedNhds
theorem separatedNhds_iff_disjoint {s t : Set X} : SeparatedNhds s t β Disjoint (πΛ’ s) (πΛ’ t) := by
simp only [(hasBasis_nhdsSet s).disjoint_iff (hasBasis_nhdsSet t), SeparatedNhds, exists_prop, β
exists_and_left, and_assoc, and_comm, and_left_comm]
#align separated_nhds_iff_disjoint separatedNhds_iff_disjoint
alias β¨SeparatedNhds.disjoint_nhdsSet, _β© := separatedNhds_iff_disjoint
namespace SeparatedNhds
variable {s sβ sβ t tβ tβ u : Set X}
@[symm]
theorem symm : SeparatedNhds s t β SeparatedNhds t s := fun β¨U, V, oU, oV, aU, bV, UVβ© =>
β¨V, U, oV, oU, bV, aU, Disjoint.symm UVβ©
#align separated_nhds.symm SeparatedNhds.symm
theorem comm (s t : Set X) : SeparatedNhds s t β SeparatedNhds t s :=
β¨symm, symmβ©
#align separated_nhds.comm SeparatedNhds.comm
theorem preimage [TopologicalSpace Y] {f : X β Y} {s t : Set Y} (h : SeparatedNhds s t)
(hf : Continuous f) : SeparatedNhds (f β»ΒΉ' s) (f β»ΒΉ' t) :=
let β¨U, V, oU, oV, sU, tV, UVβ© := h
β¨f β»ΒΉ' U, f β»ΒΉ' V, oU.preimage hf, oV.preimage hf, preimage_mono sU, preimage_mono tV,
UV.preimage fβ©
#align separated_nhds.preimage SeparatedNhds.preimage
protected theorem disjoint (h : SeparatedNhds s t) : Disjoint s t :=
let β¨_, _, _, _, hsU, htV, hdβ© := h; hd.mono hsU htV
#align separated_nhds.disjoint SeparatedNhds.disjoint
theorem disjoint_closure_left (h : SeparatedNhds s t) : Disjoint (closure s) t :=
let β¨_U, _V, _, hV, hsU, htV, hdβ© := h
(hd.closure_left hV).mono (closure_mono hsU) htV
#align separated_nhds.disjoint_closure_left SeparatedNhds.disjoint_closure_left
theorem disjoint_closure_right (h : SeparatedNhds s t) : Disjoint s (closure t) :=
h.symm.disjoint_closure_left.symm
#align separated_nhds.disjoint_closure_right SeparatedNhds.disjoint_closure_right
@[simp] theorem empty_right (s : Set X) : SeparatedNhds s β
:=
β¨_, _, isOpen_univ, isOpen_empty, fun a _ => mem_univ a, Subset.rfl, disjoint_empty _β©
#align separated_nhds.empty_right SeparatedNhds.empty_right
@[simp] theorem empty_left (s : Set X) : SeparatedNhds β
s :=
(empty_right _).symm
#align separated_nhds.empty_left SeparatedNhds.empty_left
theorem mono (h : SeparatedNhds sβ tβ) (hs : sβ β sβ) (ht : tβ β tβ) : SeparatedNhds sβ tβ :=
let β¨U, V, hU, hV, hsU, htV, hdβ© := h
β¨U, V, hU, hV, hs.trans hsU, ht.trans htV, hdβ©
#align separated_nhds.mono SeparatedNhds.mono
| Mathlib/Topology/Separation.lean | 178 | 179 | theorem union_left : SeparatedNhds s u β SeparatedNhds t u β SeparatedNhds (s βͺ t) u := by |
simpa only [separatedNhds_iff_disjoint, nhdsSet_union, disjoint_sup_left] using And.intro
| 1 | 2.718282 | 0 | 0.5 | 4 | 446 |
import Mathlib.Topology.Compactness.SigmaCompact
import Mathlib.Topology.Connected.TotallyDisconnected
import Mathlib.Topology.Inseparable
#align_import topology.separation from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Function Set Filter Topology TopologicalSpace
open scoped Classical
universe u v
variable {X : Type*} {Y : Type*} [TopologicalSpace X]
section Separation
def SeparatedNhds : Set X β Set X β Prop := fun s t : Set X =>
β U V : Set X, IsOpen U β§ IsOpen V β§ s β U β§ t β V β§ Disjoint U V
#align separated_nhds SeparatedNhds
theorem separatedNhds_iff_disjoint {s t : Set X} : SeparatedNhds s t β Disjoint (πΛ’ s) (πΛ’ t) := by
simp only [(hasBasis_nhdsSet s).disjoint_iff (hasBasis_nhdsSet t), SeparatedNhds, exists_prop, β
exists_and_left, and_assoc, and_comm, and_left_comm]
#align separated_nhds_iff_disjoint separatedNhds_iff_disjoint
alias β¨SeparatedNhds.disjoint_nhdsSet, _β© := separatedNhds_iff_disjoint
class T0Space (X : Type u) [TopologicalSpace X] : Prop where
t0 : β β¦x y : Xβ¦, Inseparable x y β x = y
#align t0_space T0Space
theorem t0Space_iff_inseparable (X : Type u) [TopologicalSpace X] :
T0Space X β β x y : X, Inseparable x y β x = y :=
β¨fun β¨hβ© => h, fun h => β¨hβ©β©
#align t0_space_iff_inseparable t0Space_iff_inseparable
| Mathlib/Topology/Separation.lean | 201 | 203 | theorem t0Space_iff_not_inseparable (X : Type u) [TopologicalSpace X] :
T0Space X β Pairwise fun x y : X => Β¬Inseparable x y := by |
simp only [t0Space_iff_inseparable, Ne, not_imp_not, Pairwise]
| 1 | 2.718282 | 0 | 0.5 | 4 | 446 |
import Mathlib.Topology.Compactness.SigmaCompact
import Mathlib.Topology.Connected.TotallyDisconnected
import Mathlib.Topology.Inseparable
#align_import topology.separation from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Function Set Filter Topology TopologicalSpace
open scoped Classical
universe u v
variable {X : Type*} {Y : Type*} [TopologicalSpace X]
section Separation
def SeparatedNhds : Set X β Set X β Prop := fun s t : Set X =>
β U V : Set X, IsOpen U β§ IsOpen V β§ s β U β§ t β V β§ Disjoint U V
#align separated_nhds SeparatedNhds
theorem separatedNhds_iff_disjoint {s t : Set X} : SeparatedNhds s t β Disjoint (πΛ’ s) (πΛ’ t) := by
simp only [(hasBasis_nhdsSet s).disjoint_iff (hasBasis_nhdsSet t), SeparatedNhds, exists_prop, β
exists_and_left, and_assoc, and_comm, and_left_comm]
#align separated_nhds_iff_disjoint separatedNhds_iff_disjoint
alias β¨SeparatedNhds.disjoint_nhdsSet, _β© := separatedNhds_iff_disjoint
class T0Space (X : Type u) [TopologicalSpace X] : Prop where
t0 : β β¦x y : Xβ¦, Inseparable x y β x = y
#align t0_space T0Space
theorem t0Space_iff_inseparable (X : Type u) [TopologicalSpace X] :
T0Space X β β x y : X, Inseparable x y β x = y :=
β¨fun β¨hβ© => h, fun h => β¨hβ©β©
#align t0_space_iff_inseparable t0Space_iff_inseparable
theorem t0Space_iff_not_inseparable (X : Type u) [TopologicalSpace X] :
T0Space X β Pairwise fun x y : X => Β¬Inseparable x y := by
simp only [t0Space_iff_inseparable, Ne, not_imp_not, Pairwise]
#align t0_space_iff_not_inseparable t0Space_iff_not_inseparable
theorem Inseparable.eq [T0Space X] {x y : X} (h : Inseparable x y) : x = y :=
T0Space.t0 h
#align inseparable.eq Inseparable.eq
protected theorem Inducing.injective [TopologicalSpace Y] [T0Space X] {f : X β Y}
(hf : Inducing f) : Injective f := fun _ _ h =>
(hf.inseparable_iff.1 <| .of_eq h).eq
#align inducing.injective Inducing.injective
protected theorem Inducing.embedding [TopologicalSpace Y] [T0Space X] {f : X β Y}
(hf : Inducing f) : Embedding f :=
β¨hf, hf.injectiveβ©
#align inducing.embedding Inducing.embedding
lemma embedding_iff_inducing [TopologicalSpace Y] [T0Space X] {f : X β Y} :
Embedding f β Inducing f :=
β¨Embedding.toInducing, Inducing.embeddingβ©
#align embedding_iff_inducing embedding_iff_inducing
theorem t0Space_iff_nhds_injective (X : Type u) [TopologicalSpace X] :
T0Space X β Injective (π : X β Filter X) :=
t0Space_iff_inseparable X
#align t0_space_iff_nhds_injective t0Space_iff_nhds_injective
theorem nhds_injective [T0Space X] : Injective (π : X β Filter X) :=
(t0Space_iff_nhds_injective X).1 βΉ_βΊ
#align nhds_injective nhds_injective
theorem inseparable_iff_eq [T0Space X] {x y : X} : Inseparable x y β x = y :=
nhds_injective.eq_iff
#align inseparable_iff_eq inseparable_iff_eq
@[simp]
theorem nhds_eq_nhds_iff [T0Space X] {a b : X} : π a = π b β a = b :=
nhds_injective.eq_iff
#align nhds_eq_nhds_iff nhds_eq_nhds_iff
@[simp]
theorem inseparable_eq_eq [T0Space X] : Inseparable = @Eq X :=
funextβ fun _ _ => propext inseparable_iff_eq
#align inseparable_eq_eq inseparable_eq_eq
theorem TopologicalSpace.IsTopologicalBasis.inseparable_iff {b : Set (Set X)}
(hb : IsTopologicalBasis b) {x y : X} : Inseparable x y β β s β b, (x β s β y β s) :=
β¨fun h s hs β¦ inseparable_iff_forall_open.1 h _ (hb.isOpen hs),
fun h β¦ hb.nhds_hasBasis.eq_of_same_basis <| by
convert hb.nhds_hasBasis using 2
exact and_congr_right (h _)β©
theorem TopologicalSpace.IsTopologicalBasis.eq_iff [T0Space X] {b : Set (Set X)}
(hb : IsTopologicalBasis b) {x y : X} : x = y β β s β b, (x β s β y β s) :=
inseparable_iff_eq.symm.trans hb.inseparable_iff
| Mathlib/Topology/Separation.lean | 261 | 264 | theorem t0Space_iff_exists_isOpen_xor'_mem (X : Type u) [TopologicalSpace X] :
T0Space X β Pairwise fun x y => β U : Set X, IsOpen U β§ Xor' (x β U) (y β U) := by |
simp only [t0Space_iff_not_inseparable, xor_iff_not_iff, not_forall, exists_prop,
inseparable_iff_forall_open, Pairwise]
| 2 | 7.389056 | 1 | 0.5 | 4 | 446 |
import Mathlib.Algebra.Divisibility.Basic
import Mathlib.Algebra.Group.Prod
import Mathlib.Tactic.Common
variable {ΞΉ Gβ Gβ : Type*} {G : ΞΉ β Type*} [Semigroup Gβ] [Semigroup Gβ] [β i, Semigroup (G i)]
| Mathlib/Algebra/Divisibility/Prod.lean | 16 | 20 | theorem prod_dvd_iff {x y : Gβ Γ Gβ} :
x β£ y β x.1 β£ y.1 β§ x.2 β£ y.2 := by |
cases x; cases y
simp only [dvd_def, Prod.exists, Prod.mk_mul_mk, Prod.mk.injEq,
exists_and_left, exists_and_right, and_self, true_and]
| 3 | 20.085537 | 1 | 0.5 | 2 | 447 |
import Mathlib.Algebra.Divisibility.Basic
import Mathlib.Algebra.Group.Prod
import Mathlib.Tactic.Common
variable {ΞΉ Gβ Gβ : Type*} {G : ΞΉ β Type*} [Semigroup Gβ] [Semigroup Gβ] [β i, Semigroup (G i)]
theorem prod_dvd_iff {x y : Gβ Γ Gβ} :
x β£ y β x.1 β£ y.1 β§ x.2 β£ y.2 := by
cases x; cases y
simp only [dvd_def, Prod.exists, Prod.mk_mul_mk, Prod.mk.injEq,
exists_and_left, exists_and_right, and_self, true_and]
@[simp]
theorem Prod.mk_dvd_mk {xβ yβ : Gβ} {xβ yβ : Gβ} :
(xβ, xβ) β£ (yβ, yβ) β xβ β£ yβ β§ xβ β£ yβ :=
prod_dvd_iff
instance [DecompositionMonoid Gβ] [DecompositionMonoid Gβ] : DecompositionMonoid (Gβ Γ Gβ) where
primal a b c h := by
simp_rw [prod_dvd_iff] at h β’
obtain β¨aβ, aβ', hβ, hβ', eqββ© := DecompositionMonoid.primal a.1 h.1
obtain β¨aβ, aβ', hβ, hβ', eqββ© := DecompositionMonoid.primal a.2 h.2
-- aesop works here
exact β¨(aβ, aβ), (aβ', aβ'), β¨hβ, hββ©, β¨hβ', hβ'β©, Prod.ext eqβ eqββ©
| Mathlib/Algebra/Divisibility/Prod.lean | 35 | 36 | theorem pi_dvd_iff {x y : β i, G i} : x β£ y β β i, x i β£ y i := by |
simp_rw [dvd_def, Function.funext_iff, Classical.skolem]; rfl
| 1 | 2.718282 | 0 | 0.5 | 2 | 447 |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Order.Antichain
import Mathlib.Order.Interval.Finset.Nat
#align_import data.finset.slice from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open Finset Nat
variable {Ξ± : Type*} {ΞΉ : Sort*} {ΞΊ : ΞΉ β Sort*}
namespace Set
variable {A B : Set (Finset Ξ±)} {s : Finset Ξ±} {r : β}
def Sized (r : β) (A : Set (Finset Ξ±)) : Prop :=
β β¦xβ¦, x β A β card x = r
#align set.sized Set.Sized
theorem Sized.mono (h : A β B) (hB : B.Sized r) : A.Sized r := fun _x hx => hB <| h hx
#align set.sized.mono Set.Sized.mono
@[simp] lemma sized_empty : (β
: Set (Finset Ξ±)).Sized r := by simp [Sized]
@[simp] lemma sized_singleton : ({s} : Set (Finset Ξ±)).Sized r β s.card = r := by simp [Sized]
theorem sized_union : (A βͺ B).Sized r β A.Sized r β§ B.Sized r :=
β¨fun hA => β¨hA.mono subset_union_left, hA.mono subset_union_rightβ©, fun hA _x hx =>
hx.elim (fun h => hA.1 h) fun h => hA.2 hβ©
#align set.sized_union Set.sized_union
alias β¨_, sized.unionβ© := sized_union
#align set.sized.union Set.sized.union
--TODO: A `forall_iUnion` lemma would be handy here.
@[simp]
| Mathlib/Data/Finset/Slice.lean | 64 | 66 | theorem sized_iUnion {f : ΞΉ β Set (Finset Ξ±)} : (β i, f i).Sized r β β i, (f i).Sized r := by |
simp_rw [Set.Sized, Set.mem_iUnion, forall_exists_index]
exact forall_swap
| 2 | 7.389056 | 1 | 0.5 | 2 | 448 |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Order.Antichain
import Mathlib.Order.Interval.Finset.Nat
#align_import data.finset.slice from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open Finset Nat
variable {Ξ± : Type*} {ΞΉ : Sort*} {ΞΊ : ΞΉ β Sort*}
namespace Set
variable {A B : Set (Finset Ξ±)} {s : Finset Ξ±} {r : β}
def Sized (r : β) (A : Set (Finset Ξ±)) : Prop :=
β β¦xβ¦, x β A β card x = r
#align set.sized Set.Sized
theorem Sized.mono (h : A β B) (hB : B.Sized r) : A.Sized r := fun _x hx => hB <| h hx
#align set.sized.mono Set.Sized.mono
@[simp] lemma sized_empty : (β
: Set (Finset Ξ±)).Sized r := by simp [Sized]
@[simp] lemma sized_singleton : ({s} : Set (Finset Ξ±)).Sized r β s.card = r := by simp [Sized]
theorem sized_union : (A βͺ B).Sized r β A.Sized r β§ B.Sized r :=
β¨fun hA => β¨hA.mono subset_union_left, hA.mono subset_union_rightβ©, fun hA _x hx =>
hx.elim (fun h => hA.1 h) fun h => hA.2 hβ©
#align set.sized_union Set.sized_union
alias β¨_, sized.unionβ© := sized_union
#align set.sized.union Set.sized.union
--TODO: A `forall_iUnion` lemma would be handy here.
@[simp]
theorem sized_iUnion {f : ΞΉ β Set (Finset Ξ±)} : (β i, f i).Sized r β β i, (f i).Sized r := by
simp_rw [Set.Sized, Set.mem_iUnion, forall_exists_index]
exact forall_swap
#align set.sized_Union Set.sized_iUnion
-- @[simp] -- Porting note: left hand side is not simp-normal form.
| Mathlib/Data/Finset/Slice.lean | 70 | 72 | theorem sized_iUnionβ {f : β i, ΞΊ i β Set (Finset Ξ±)} :
(β (i) (j), f i j).Sized r β β i j, (f i j).Sized r := by |
simp only [Set.sized_iUnion]
| 1 | 2.718282 | 0 | 0.5 | 2 | 448 |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Analysis.Complex.Basic
import Mathlib.Analysis.Convex.Uniform
import Mathlib.Analysis.NormedSpace.Completion
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps
#align_import analysis.inner_product_space.basic from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
noncomputable section
open RCLike Real Filter
open Topology ComplexConjugate
open LinearMap (BilinForm)
variable {π E F : Type*} [RCLike π]
class Inner (π E : Type*) where
inner : E β E β π
#align has_inner Inner
export Inner (inner)
notation3:max "βͺ" x ", " y "β«_" π:max => @inner π _ _ x y
class InnerProductSpace (π : Type*) (E : Type*) [RCLike π] [NormedAddCommGroup E] extends
NormedSpace π E, Inner π E where
norm_sq_eq_inner : β x : E, βxβ ^ 2 = re (inner x x)
conj_symm : β x y, conj (inner y x) = inner x y
add_left : β x y z, inner (x + y) z = inner x z + inner y z
smul_left : β x y r, inner (r β’ x) y = conj r * inner x y
#align inner_product_space InnerProductSpace
-- @[nolint HasNonemptyInstance] porting note: I don't think we have this linter anymore
structure InnerProductSpace.Core (π : Type*) (F : Type*) [RCLike π] [AddCommGroup F]
[Module π F] extends Inner π F where
conj_symm : β x y, conj (inner y x) = inner x y
nonneg_re : β x, 0 β€ re (inner x x)
definite : β x, inner x x = 0 β x = 0
add_left : β x y z, inner (x + y) z = inner x z + inner y z
smul_left : β x y r, inner (r β’ x) y = conj r * inner x y
#align inner_product_space.core InnerProductSpace.Core
attribute [class] InnerProductSpace.Core
def InnerProductSpace.toCore [NormedAddCommGroup E] [c : InnerProductSpace π E] :
InnerProductSpace.Core π E :=
{ c with
nonneg_re := fun x => by
rw [β InnerProductSpace.norm_sq_eq_inner]
apply sq_nonneg
definite := fun x hx =>
norm_eq_zero.1 <| pow_eq_zero (n := 2) <| by
rw [InnerProductSpace.norm_sq_eq_inner (π := π) x, hx, map_zero] }
#align inner_product_space.to_core InnerProductSpace.toCore
namespace InnerProductSpace.Core
variable [AddCommGroup F] [Module π F] [c : InnerProductSpace.Core π F]
local notation "βͺ" x ", " y "β«" => @inner π F _ x y
local notation "normSqK" => @RCLike.normSq π _
local notation "reK" => @RCLike.re π _
local notation "ext_iff" => @RCLike.ext_iff π _
local postfix:90 "β " => starRingEnd _
def toInner' : Inner π F :=
c.toInner
#align inner_product_space.core.to_has_inner' InnerProductSpace.Core.toInner'
attribute [local instance] toInner'
def normSq (x : F) :=
reK βͺx, xβ«
#align inner_product_space.core.norm_sq InnerProductSpace.Core.normSq
local notation "normSqF" => @normSq π F _ _ _ _
theorem inner_conj_symm (x y : F) : βͺy, xβ«β = βͺx, yβ« :=
c.conj_symm x y
#align inner_product_space.core.inner_conj_symm InnerProductSpace.Core.inner_conj_symm
theorem inner_self_nonneg {x : F} : 0 β€ re βͺx, xβ« :=
c.nonneg_re _
#align inner_product_space.core.inner_self_nonneg InnerProductSpace.Core.inner_self_nonneg
| Mathlib/Analysis/InnerProductSpace/Basic.lean | 211 | 213 | theorem inner_self_im (x : F) : im βͺx, xβ« = 0 := by |
rw [β @ofReal_inj π, im_eq_conj_sub]
simp [inner_conj_symm]
| 2 | 7.389056 | 1 | 0.5 | 6 | 449 |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Analysis.Complex.Basic
import Mathlib.Analysis.Convex.Uniform
import Mathlib.Analysis.NormedSpace.Completion
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps
#align_import analysis.inner_product_space.basic from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
noncomputable section
open RCLike Real Filter
open Topology ComplexConjugate
open LinearMap (BilinForm)
variable {π E F : Type*} [RCLike π]
class Inner (π E : Type*) where
inner : E β E β π
#align has_inner Inner
export Inner (inner)
notation3:max "βͺ" x ", " y "β«_" π:max => @inner π _ _ x y
class InnerProductSpace (π : Type*) (E : Type*) [RCLike π] [NormedAddCommGroup E] extends
NormedSpace π E, Inner π E where
norm_sq_eq_inner : β x : E, βxβ ^ 2 = re (inner x x)
conj_symm : β x y, conj (inner y x) = inner x y
add_left : β x y z, inner (x + y) z = inner x z + inner y z
smul_left : β x y r, inner (r β’ x) y = conj r * inner x y
#align inner_product_space InnerProductSpace
-- @[nolint HasNonemptyInstance] porting note: I don't think we have this linter anymore
structure InnerProductSpace.Core (π : Type*) (F : Type*) [RCLike π] [AddCommGroup F]
[Module π F] extends Inner π F where
conj_symm : β x y, conj (inner y x) = inner x y
nonneg_re : β x, 0 β€ re (inner x x)
definite : β x, inner x x = 0 β x = 0
add_left : β x y z, inner (x + y) z = inner x z + inner y z
smul_left : β x y r, inner (r β’ x) y = conj r * inner x y
#align inner_product_space.core InnerProductSpace.Core
attribute [class] InnerProductSpace.Core
def InnerProductSpace.toCore [NormedAddCommGroup E] [c : InnerProductSpace π E] :
InnerProductSpace.Core π E :=
{ c with
nonneg_re := fun x => by
rw [β InnerProductSpace.norm_sq_eq_inner]
apply sq_nonneg
definite := fun x hx =>
norm_eq_zero.1 <| pow_eq_zero (n := 2) <| by
rw [InnerProductSpace.norm_sq_eq_inner (π := π) x, hx, map_zero] }
#align inner_product_space.to_core InnerProductSpace.toCore
namespace InnerProductSpace.Core
variable [AddCommGroup F] [Module π F] [c : InnerProductSpace.Core π F]
local notation "βͺ" x ", " y "β«" => @inner π F _ x y
local notation "normSqK" => @RCLike.normSq π _
local notation "reK" => @RCLike.re π _
local notation "ext_iff" => @RCLike.ext_iff π _
local postfix:90 "β " => starRingEnd _
def toInner' : Inner π F :=
c.toInner
#align inner_product_space.core.to_has_inner' InnerProductSpace.Core.toInner'
attribute [local instance] toInner'
def normSq (x : F) :=
reK βͺx, xβ«
#align inner_product_space.core.norm_sq InnerProductSpace.Core.normSq
local notation "normSqF" => @normSq π F _ _ _ _
theorem inner_conj_symm (x y : F) : βͺy, xβ«β = βͺx, yβ« :=
c.conj_symm x y
#align inner_product_space.core.inner_conj_symm InnerProductSpace.Core.inner_conj_symm
theorem inner_self_nonneg {x : F} : 0 β€ re βͺx, xβ« :=
c.nonneg_re _
#align inner_product_space.core.inner_self_nonneg InnerProductSpace.Core.inner_self_nonneg
theorem inner_self_im (x : F) : im βͺx, xβ« = 0 := by
rw [β @ofReal_inj π, im_eq_conj_sub]
simp [inner_conj_symm]
#align inner_product_space.core.inner_self_im InnerProductSpace.Core.inner_self_im
theorem inner_add_left (x y z : F) : βͺx + y, zβ« = βͺx, zβ« + βͺy, zβ« :=
c.add_left _ _ _
#align inner_product_space.core.inner_add_left InnerProductSpace.Core.inner_add_left
| Mathlib/Analysis/InnerProductSpace/Basic.lean | 220 | 221 | theorem inner_add_right (x y z : F) : βͺx, y + zβ« = βͺx, yβ« + βͺx, zβ« := by |
rw [β inner_conj_symm, inner_add_left, RingHom.map_add]; simp only [inner_conj_symm]
| 1 | 2.718282 | 0 | 0.5 | 6 | 449 |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Analysis.Complex.Basic
import Mathlib.Analysis.Convex.Uniform
import Mathlib.Analysis.NormedSpace.Completion
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps
#align_import analysis.inner_product_space.basic from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
noncomputable section
open RCLike Real Filter
open Topology ComplexConjugate
open LinearMap (BilinForm)
variable {π E F : Type*} [RCLike π]
class Inner (π E : Type*) where
inner : E β E β π
#align has_inner Inner
export Inner (inner)
notation3:max "βͺ" x ", " y "β«_" π:max => @inner π _ _ x y
class InnerProductSpace (π : Type*) (E : Type*) [RCLike π] [NormedAddCommGroup E] extends
NormedSpace π E, Inner π E where
norm_sq_eq_inner : β x : E, βxβ ^ 2 = re (inner x x)
conj_symm : β x y, conj (inner y x) = inner x y
add_left : β x y z, inner (x + y) z = inner x z + inner y z
smul_left : β x y r, inner (r β’ x) y = conj r * inner x y
#align inner_product_space InnerProductSpace
-- @[nolint HasNonemptyInstance] porting note: I don't think we have this linter anymore
structure InnerProductSpace.Core (π : Type*) (F : Type*) [RCLike π] [AddCommGroup F]
[Module π F] extends Inner π F where
conj_symm : β x y, conj (inner y x) = inner x y
nonneg_re : β x, 0 β€ re (inner x x)
definite : β x, inner x x = 0 β x = 0
add_left : β x y z, inner (x + y) z = inner x z + inner y z
smul_left : β x y r, inner (r β’ x) y = conj r * inner x y
#align inner_product_space.core InnerProductSpace.Core
attribute [class] InnerProductSpace.Core
def InnerProductSpace.toCore [NormedAddCommGroup E] [c : InnerProductSpace π E] :
InnerProductSpace.Core π E :=
{ c with
nonneg_re := fun x => by
rw [β InnerProductSpace.norm_sq_eq_inner]
apply sq_nonneg
definite := fun x hx =>
norm_eq_zero.1 <| pow_eq_zero (n := 2) <| by
rw [InnerProductSpace.norm_sq_eq_inner (π := π) x, hx, map_zero] }
#align inner_product_space.to_core InnerProductSpace.toCore
namespace InnerProductSpace.Core
variable [AddCommGroup F] [Module π F] [c : InnerProductSpace.Core π F]
local notation "βͺ" x ", " y "β«" => @inner π F _ x y
local notation "normSqK" => @RCLike.normSq π _
local notation "reK" => @RCLike.re π _
local notation "ext_iff" => @RCLike.ext_iff π _
local postfix:90 "β " => starRingEnd _
def toInner' : Inner π F :=
c.toInner
#align inner_product_space.core.to_has_inner' InnerProductSpace.Core.toInner'
attribute [local instance] toInner'
def normSq (x : F) :=
reK βͺx, xβ«
#align inner_product_space.core.norm_sq InnerProductSpace.Core.normSq
local notation "normSqF" => @normSq π F _ _ _ _
theorem inner_conj_symm (x y : F) : βͺy, xβ«β = βͺx, yβ« :=
c.conj_symm x y
#align inner_product_space.core.inner_conj_symm InnerProductSpace.Core.inner_conj_symm
theorem inner_self_nonneg {x : F} : 0 β€ re βͺx, xβ« :=
c.nonneg_re _
#align inner_product_space.core.inner_self_nonneg InnerProductSpace.Core.inner_self_nonneg
theorem inner_self_im (x : F) : im βͺx, xβ« = 0 := by
rw [β @ofReal_inj π, im_eq_conj_sub]
simp [inner_conj_symm]
#align inner_product_space.core.inner_self_im InnerProductSpace.Core.inner_self_im
theorem inner_add_left (x y z : F) : βͺx + y, zβ« = βͺx, zβ« + βͺy, zβ« :=
c.add_left _ _ _
#align inner_product_space.core.inner_add_left InnerProductSpace.Core.inner_add_left
theorem inner_add_right (x y z : F) : βͺx, y + zβ« = βͺx, yβ« + βͺx, zβ« := by
rw [β inner_conj_symm, inner_add_left, RingHom.map_add]; simp only [inner_conj_symm]
#align inner_product_space.core.inner_add_right InnerProductSpace.Core.inner_add_right
| Mathlib/Analysis/InnerProductSpace/Basic.lean | 224 | 226 | theorem ofReal_normSq_eq_inner_self (x : F) : (normSqF x : π) = βͺx, xβ« := by |
rw [ext_iff]
exact β¨by simp only [ofReal_re]; rfl, by simp only [inner_self_im, ofReal_im]β©
| 2 | 7.389056 | 1 | 0.5 | 6 | 449 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.