Dataset Viewer
Auto-converted to Parquet Duplicate
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
goals
sequencelengths
0
224
goals_before
sequencelengths
0
220
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Group.Pi.Basic import Mathlib.Order.Fin import Mathlib.Order.PiLex import Mathlib.Order.Interval.Set.Basic #align_import data.fin.tuple.basic from "leanprover-community/mathlib"@"ef997baa41b5c428be3fb50089a7139bf4ee886b" assert_not_exists MonoidWithZero universe u v namespace Fin variable {m n : ℕ} open Function section Tuple example (α : Fin 0 → Sort u) : Unique (∀ i : Fin 0, α i) := by infer_instance theorem tuple0_le {α : Fin 0 → Type*} [∀ i, Preorder (α i)] (f g : ∀ i, α i) : f ≤ g := finZeroElim #align fin.tuple0_le Fin.tuple0_le variable {α : Fin (n + 1) → Type u} (x : α 0) (q : ∀ i, α i) (p : ∀ i : Fin n, α i.succ) (i : Fin n) (y : α i.succ) (z : α 0) def tail (q : ∀ i, α i) : ∀ i : Fin n, α i.succ := fun i ↦ q i.succ #align fin.tail Fin.tail theorem tail_def {n : ℕ} {α : Fin (n + 1) → Type*} {q : ∀ i, α i} : (tail fun k : Fin (n + 1) ↦ q k) = fun k : Fin n ↦ q k.succ := rfl #align fin.tail_def Fin.tail_def def cons (x : α 0) (p : ∀ i : Fin n, α i.succ) : ∀ i, α i := fun j ↦ Fin.cases x p j #align fin.cons Fin.cons @[simp] theorem tail_cons : tail (cons x p) = p := by simp (config := { unfoldPartialApp := true }) [tail, cons] #align fin.tail_cons Fin.tail_cons @[simp] theorem cons_succ : cons x p i.succ = p i := by simp [cons] #align fin.cons_succ Fin.cons_succ @[simp] theorem cons_zero : cons x p 0 = x := by simp [cons] #align fin.cons_zero Fin.cons_zero @[simp] theorem cons_one {α : Fin (n + 2) → Type*} (x : α 0) (p : ∀ i : Fin n.succ, α i.succ) : cons x p 1 = p 0 := by rw [← cons_succ x p]; rfl @[simp] theorem cons_update : cons x (update p i y) = update (cons x p) i.succ y := by ext j by_cases h : j = 0 · rw [h] simp [Ne.symm (succ_ne_zero i)] · let j' := pred j h have : j'.succ = j := succ_pred j h rw [← this, cons_succ] by_cases h' : j' = i · rw [h'] simp · have : j'.succ ≠ i.succ := by rwa [Ne, succ_inj] rw [update_noteq h', update_noteq this, cons_succ] #align fin.cons_update Fin.cons_update theorem cons_injective2 : Function.Injective2 (@cons n α) := fun x₀ y₀ x y h ↦ ⟨congr_fun h 0, funext fun i ↦ by simpa using congr_fun h (Fin.succ i)⟩ #align fin.cons_injective2 Fin.cons_injective2 @[simp] theorem cons_eq_cons {x₀ y₀ : α 0} {x y : ∀ i : Fin n, α i.succ} : cons x₀ x = cons y₀ y ↔ x₀ = y₀ ∧ x = y := cons_injective2.eq_iff #align fin.cons_eq_cons Fin.cons_eq_cons theorem cons_left_injective (x : ∀ i : Fin n, α i.succ) : Function.Injective fun x₀ ↦ cons x₀ x := cons_injective2.left _ #align fin.cons_left_injective Fin.cons_left_injective theorem cons_right_injective (x₀ : α 0) : Function.Injective (cons x₀) := cons_injective2.right _ #align fin.cons_right_injective Fin.cons_right_injective
Mathlib/Data/Fin/Tuple/Basic.lean
128
136
theorem update_cons_zero : update (cons x p) 0 z = cons z p := by
ext j by_cases h : j = 0 · rw [h] simp · simp only [h, update_noteq, Ne, not_false_iff] let j' := pred j h have : j'.succ = j := succ_pred j h rw [← this, cons_succ, cons_succ]
[ " Unique ((i : Fin 0) → α i)", " tail (cons x p) = p", " cons x p i.succ = p i", " cons x p 0 = x", " cons x p 1 = p 0", " cons x p 1 = cons x p (succ 0)", " cons x (update p i y) = update (cons x p) i.succ y", " cons x (update p i y) j = update (cons x p) i.succ y j", " cons x (update p i y) 0 = up...
[ " Unique ((i : Fin 0) → α i)", " tail (cons x p) = p", " cons x p i.succ = p i", " cons x p 0 = x", " cons x p 1 = p 0", " cons x p 1 = cons x p (succ 0)", " cons x (update p i y) = update (cons x p) i.succ y", " cons x (update p i y) j = update (cons x p) i.succ y j", " cons x (update p i y) 0 = up...
import Mathlib.Order.Monotone.Odd import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic #align_import analysis.special_functions.trigonometric.deriv from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" noncomputable section open scoped Classical Topology Filter open Set Filter namespace Complex theorem hasStrictDerivAt_sin (x : ℂ) : HasStrictDerivAt sin (cos x) x := by simp only [cos, div_eq_mul_inv] convert ((((hasStrictDerivAt_id x).neg.mul_const I).cexp.sub ((hasStrictDerivAt_id x).mul_const I).cexp).mul_const I).mul_const (2 : ℂ)⁻¹ using 1 simp only [Function.comp, id] rw [sub_mul, mul_assoc, mul_assoc, I_mul_I, neg_one_mul, neg_neg, mul_one, one_mul, mul_assoc, I_mul_I, mul_neg_one, sub_neg_eq_add, add_comm] #align complex.has_strict_deriv_at_sin Complex.hasStrictDerivAt_sin theorem hasDerivAt_sin (x : ℂ) : HasDerivAt sin (cos x) x := (hasStrictDerivAt_sin x).hasDerivAt #align complex.has_deriv_at_sin Complex.hasDerivAt_sin theorem contDiff_sin {n} : ContDiff ℂ n sin := (((contDiff_neg.mul contDiff_const).cexp.sub (contDiff_id.mul contDiff_const).cexp).mul contDiff_const).div_const _ #align complex.cont_diff_sin Complex.contDiff_sin theorem differentiable_sin : Differentiable ℂ sin := fun x => (hasDerivAt_sin x).differentiableAt #align complex.differentiable_sin Complex.differentiable_sin theorem differentiableAt_sin {x : ℂ} : DifferentiableAt ℂ sin x := differentiable_sin x #align complex.differentiable_at_sin Complex.differentiableAt_sin @[simp] theorem deriv_sin : deriv sin = cos := funext fun x => (hasDerivAt_sin x).deriv #align complex.deriv_sin Complex.deriv_sin theorem hasStrictDerivAt_cos (x : ℂ) : HasStrictDerivAt cos (-sin x) x := by simp only [sin, div_eq_mul_inv, neg_mul_eq_neg_mul] convert (((hasStrictDerivAt_id x).mul_const I).cexp.add ((hasStrictDerivAt_id x).neg.mul_const I).cexp).mul_const (2 : ℂ)⁻¹ using 1 simp only [Function.comp, id] ring #align complex.has_strict_deriv_at_cos Complex.hasStrictDerivAt_cos theorem hasDerivAt_cos (x : ℂ) : HasDerivAt cos (-sin x) x := (hasStrictDerivAt_cos x).hasDerivAt #align complex.has_deriv_at_cos Complex.hasDerivAt_cos theorem contDiff_cos {n} : ContDiff ℂ n cos := ((contDiff_id.mul contDiff_const).cexp.add (contDiff_neg.mul contDiff_const).cexp).div_const _ #align complex.cont_diff_cos Complex.contDiff_cos theorem differentiable_cos : Differentiable ℂ cos := fun x => (hasDerivAt_cos x).differentiableAt #align complex.differentiable_cos Complex.differentiable_cos theorem differentiableAt_cos {x : ℂ} : DifferentiableAt ℂ cos x := differentiable_cos x #align complex.differentiable_at_cos Complex.differentiableAt_cos theorem deriv_cos {x : ℂ} : deriv cos x = -sin x := (hasDerivAt_cos x).deriv #align complex.deriv_cos Complex.deriv_cos @[simp] theorem deriv_cos' : deriv cos = fun x => -sin x := funext fun _ => deriv_cos #align complex.deriv_cos' Complex.deriv_cos' theorem hasStrictDerivAt_sinh (x : ℂ) : HasStrictDerivAt sinh (cosh x) x := by simp only [cosh, div_eq_mul_inv] convert ((hasStrictDerivAt_exp x).sub (hasStrictDerivAt_id x).neg.cexp).mul_const (2 : ℂ)⁻¹ using 1 rw [id, mul_neg_one, sub_eq_add_neg, neg_neg] #align complex.has_strict_deriv_at_sinh Complex.hasStrictDerivAt_sinh theorem hasDerivAt_sinh (x : ℂ) : HasDerivAt sinh (cosh x) x := (hasStrictDerivAt_sinh x).hasDerivAt #align complex.has_deriv_at_sinh Complex.hasDerivAt_sinh theorem contDiff_sinh {n} : ContDiff ℂ n sinh := (contDiff_exp.sub contDiff_neg.cexp).div_const _ #align complex.cont_diff_sinh Complex.contDiff_sinh theorem differentiable_sinh : Differentiable ℂ sinh := fun x => (hasDerivAt_sinh x).differentiableAt #align complex.differentiable_sinh Complex.differentiable_sinh theorem differentiableAt_sinh {x : ℂ} : DifferentiableAt ℂ sinh x := differentiable_sinh x #align complex.differentiable_at_sinh Complex.differentiableAt_sinh @[simp] theorem deriv_sinh : deriv sinh = cosh := funext fun x => (hasDerivAt_sinh x).deriv #align complex.deriv_sinh Complex.deriv_sinh
Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
134
138
theorem hasStrictDerivAt_cosh (x : ℂ) : HasStrictDerivAt cosh (sinh x) x := by
simp only [sinh, div_eq_mul_inv] convert ((hasStrictDerivAt_exp x).add (hasStrictDerivAt_id x).neg.cexp).mul_const (2 : ℂ)⁻¹ using 1 rw [id, mul_neg_one, sub_eq_add_neg]
[ " HasStrictDerivAt sin x.cos x", " HasStrictDerivAt sin ((cexp (x * I) + cexp (-x * I)) * 2⁻¹) x", " (cexp (x * I) + cexp (-x * I)) * 2⁻¹ = (cexp (-id x * I) * (-1 * I) - cexp (id x * I) * (1 * I)) * I * 2⁻¹", " (cexp (x * I) + cexp (-x * I)) * 2⁻¹ = (cexp (-x * I) * (-1 * I) - cexp (x * I) * (1 * I)) * I * 2...
[ " HasStrictDerivAt sin x.cos x", " HasStrictDerivAt sin ((cexp (x * I) + cexp (-x * I)) * 2⁻¹) x", " (cexp (x * I) + cexp (-x * I)) * 2⁻¹ = (cexp (-id x * I) * (-1 * I) - cexp (id x * I) * (1 * I)) * I * 2⁻¹", " (cexp (x * I) + cexp (-x * I)) * 2⁻¹ = (cexp (-x * I) * (-1 * I) - cexp (x * I) * (1 * I)) * I * 2...
import Aesop import Mathlib.Algebra.Group.Defs import Mathlib.Data.Nat.Defs import Mathlib.Data.Int.Defs import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Cases import Mathlib.Tactic.SimpRw import Mathlib.Tactic.SplitIfs #align_import algebra.group.basic from "leanprover-community/mathlib"@"a07d750983b94c530ab69a726862c2ab6802b38c" assert_not_exists MonoidWithZero assert_not_exists DenselyOrdered open Function universe u variable {α β G M : Type*} section Semigroup variable [Semigroup α] @[to_additive] instance Semigroup.to_isAssociative : Std.Associative (α := α) (· * ·) := ⟨mul_assoc⟩ #align semigroup.to_is_associative Semigroup.to_isAssociative #align add_semigroup.to_is_associative AddSemigroup.to_isAssociative @[to_additive (attr := simp) "Composing two additions on the left by `y` then `x` is equal to an addition on the left by `x + y`."]
Mathlib/Algebra/Group/Basic.lean
117
119
theorem comp_mul_left (x y : α) : (x * ·) ∘ (y * ·) = (x * y * ·) := by
ext z simp [mul_assoc]
[ " ((fun x_1 => x * x_1) ∘ fun x => y * x) = fun x_1 => x * y * x_1", " ((fun x_1 => x * x_1) ∘ fun x => y * x) z = x * y * z" ]
[]
import Mathlib.Data.Opposite import Mathlib.Data.Set.Defs #align_import data.set.opposite from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" variable {α : Type*} open Opposite namespace Set protected def op (s : Set α) : Set αᵒᵖ := unop ⁻¹' s #align set.op Set.op protected def unop (s : Set αᵒᵖ) : Set α := op ⁻¹' s #align set.unop Set.unop @[simp] theorem mem_op {s : Set α} {a : αᵒᵖ} : a ∈ s.op ↔ unop a ∈ s := Iff.rfl #align set.mem_op Set.mem_op @[simp 1100] theorem op_mem_op {s : Set α} {a : α} : op a ∈ s.op ↔ a ∈ s := by rfl #align set.op_mem_op Set.op_mem_op @[simp] theorem mem_unop {s : Set αᵒᵖ} {a : α} : a ∈ s.unop ↔ op a ∈ s := Iff.rfl #align set.mem_unop Set.mem_unop @[simp 1100] theorem unop_mem_unop {s : Set αᵒᵖ} {a : αᵒᵖ} : unop a ∈ s.unop ↔ a ∈ s := by rfl #align set.unop_mem_unop Set.unop_mem_unop @[simp] theorem op_unop (s : Set α) : s.op.unop = s := rfl #align set.op_unop Set.op_unop @[simp] theorem unop_op (s : Set αᵒᵖ) : s.unop.op = s := rfl #align set.unop_op Set.unop_op @[simps] def opEquiv_self (s : Set α) : s.op ≃ s := ⟨fun x ↦ ⟨unop x, x.2⟩, fun x ↦ ⟨op x, x.2⟩, fun _ ↦ rfl, fun _ ↦ rfl⟩ #align set.op_equiv_self Set.opEquiv_self #align set.op_equiv_self_apply_coe Set.opEquiv_self_apply_coe #align set.op_equiv_self_symm_apply_coe Set.opEquiv_self_symm_apply_coe @[simps] def opEquiv : Set α ≃ Set αᵒᵖ := ⟨Set.op, Set.unop, op_unop, unop_op⟩ #align set.op_equiv Set.opEquiv #align set.op_equiv_symm_apply Set.opEquiv_symm_apply #align set.op_equiv_apply Set.opEquiv_apply @[simp] theorem singleton_op (x : α) : ({x} : Set α).op = {op x} := by ext constructor · apply unop_injective · apply op_injective #align set.singleton_op Set.singleton_op @[simp] theorem singleton_unop (x : αᵒᵖ) : ({x} : Set αᵒᵖ).unop = {unop x} := by ext constructor · apply op_injective · apply unop_injective #align set.singleton_unop Set.singleton_unop @[simp 1100] theorem singleton_op_unop (x : α) : ({op x} : Set αᵒᵖ).unop = {x} := by ext constructor · apply op_injective · apply unop_injective #align set.singleton_op_unop Set.singleton_op_unop @[simp 1100]
Mathlib/Data/Set/Opposite.lean
100
104
theorem singleton_unop_op (x : αᵒᵖ) : ({unop x} : Set α).op = {x} := by
ext constructor · apply unop_injective · apply op_injective
[ " { unop := a } ∈ s.op ↔ a ∈ s", " a.unop ∈ s.unop ↔ a ∈ s", " {x}.op = {{ unop := x }}", " x✝ ∈ {x}.op ↔ x✝ ∈ {{ unop := x }}", " x✝ ∈ {x}.op → x✝ ∈ {{ unop := x }}", " x✝ ∈ {{ unop := x }} → x✝ ∈ {x}.op", " {x}.unop = {x.unop}", " x✝ ∈ {x}.unop ↔ x✝ ∈ {x.unop}", " x✝ ∈ {x}.unop → x✝ ∈ {x.unop}", ...
[ " { unop := a } ∈ s.op ↔ a ∈ s", " a.unop ∈ s.unop ↔ a ∈ s", " {x}.op = {{ unop := x }}", " x✝ ∈ {x}.op ↔ x✝ ∈ {{ unop := x }}", " x✝ ∈ {x}.op → x✝ ∈ {{ unop := x }}", " x✝ ∈ {{ unop := x }} → x✝ ∈ {x}.op", " {x}.unop = {x.unop}", " x✝ ∈ {x}.unop ↔ x✝ ∈ {x.unop}", " x✝ ∈ {x}.unop → x✝ ∈ {x.unop}", ...
import Mathlib.Data.ENNReal.Operations #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal namespace ENNReal noncomputable section Inv variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0} protected theorem div_eq_inv_mul : a / b = b⁻¹ * a := by rw [div_eq_mul_inv, mul_comm] #align ennreal.div_eq_inv_mul ENNReal.div_eq_inv_mul @[simp] theorem inv_zero : (0 : ℝ≥0∞)⁻¹ = ∞ := show sInf { b : ℝ≥0∞ | 1 ≤ 0 * b } = ∞ by simp #align ennreal.inv_zero ENNReal.inv_zero @[simp] theorem inv_top : ∞⁻¹ = 0 := bot_unique <| le_of_forall_le_of_dense fun a (h : 0 < a) => sInf_le <| by simp [*, h.ne', top_mul] #align ennreal.inv_top ENNReal.inv_top theorem coe_inv_le : (↑r⁻¹ : ℝ≥0∞) ≤ (↑r)⁻¹ := le_sInf fun b (hb : 1 ≤ ↑r * b) => coe_le_iff.2 <| by rintro b rfl apply NNReal.inv_le_of_le_mul rwa [← coe_mul, ← coe_one, coe_le_coe] at hb #align ennreal.coe_inv_le ENNReal.coe_inv_le @[simp, norm_cast] theorem coe_inv (hr : r ≠ 0) : (↑r⁻¹ : ℝ≥0∞) = (↑r)⁻¹ := coe_inv_le.antisymm <| sInf_le <| mem_setOf.2 <| by rw [← coe_mul, mul_inv_cancel hr, coe_one] #align ennreal.coe_inv ENNReal.coe_inv @[norm_cast] theorem coe_inv_two : ((2⁻¹ : ℝ≥0) : ℝ≥0∞) = 2⁻¹ := by rw [coe_inv _root_.two_ne_zero, coe_two] #align ennreal.coe_inv_two ENNReal.coe_inv_two @[simp, norm_cast] theorem coe_div (hr : r ≠ 0) : (↑(p / r) : ℝ≥0∞) = p / r := by rw [div_eq_mul_inv, div_eq_mul_inv, coe_mul, coe_inv hr] #align ennreal.coe_div ENNReal.coe_div lemma coe_div_le : ↑(p / r) ≤ (p / r : ℝ≥0∞) := by simpa only [div_eq_mul_inv, coe_mul] using mul_le_mul_left' coe_inv_le _ theorem div_zero (h : a ≠ 0) : a / 0 = ∞ := by simp [div_eq_mul_inv, h] #align ennreal.div_zero ENNReal.div_zero instance : DivInvOneMonoid ℝ≥0∞ := { inferInstanceAs (DivInvMonoid ℝ≥0∞) with inv_one := by simpa only [coe_inv one_ne_zero, coe_one] using coe_inj.2 inv_one } protected theorem inv_pow : ∀ {a : ℝ≥0∞} {n : ℕ}, (a ^ n)⁻¹ = a⁻¹ ^ n | _, 0 => by simp only [pow_zero, inv_one] | ⊤, n + 1 => by simp [top_pow] | (a : ℝ≥0), n + 1 => by rcases eq_or_ne a 0 with (rfl | ha) · simp [top_pow] · have := pow_ne_zero (n + 1) ha norm_cast rw [inv_pow] #align ennreal.inv_pow ENNReal.inv_pow protected theorem mul_inv_cancel (h0 : a ≠ 0) (ht : a ≠ ∞) : a * a⁻¹ = 1 := by lift a to ℝ≥0 using ht norm_cast at h0; norm_cast exact mul_inv_cancel h0 #align ennreal.mul_inv_cancel ENNReal.mul_inv_cancel protected theorem inv_mul_cancel (h0 : a ≠ 0) (ht : a ≠ ∞) : a⁻¹ * a = 1 := mul_comm a a⁻¹ ▸ ENNReal.mul_inv_cancel h0 ht #align ennreal.inv_mul_cancel ENNReal.inv_mul_cancel protected theorem div_mul_cancel (h0 : a ≠ 0) (hI : a ≠ ∞) : b / a * a = b := by rw [div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel h0 hI, mul_one] #align ennreal.div_mul_cancel ENNReal.div_mul_cancel protected theorem mul_div_cancel' (h0 : a ≠ 0) (hI : a ≠ ∞) : a * (b / a) = b := by rw [mul_comm, ENNReal.div_mul_cancel h0 hI] #align ennreal.mul_div_cancel' ENNReal.mul_div_cancel' -- Porting note: `simp only [div_eq_mul_inv, mul_comm, mul_assoc]` doesn't work in the following two protected theorem mul_comm_div : a / b * c = a * (c / b) := by simp only [div_eq_mul_inv, mul_right_comm, ← mul_assoc] #align ennreal.mul_comm_div ENNReal.mul_comm_div protected theorem mul_div_right_comm : a * b / c = a / c * b := by simp only [div_eq_mul_inv, mul_right_comm] #align ennreal.mul_div_right_comm ENNReal.mul_div_right_comm instance : InvolutiveInv ℝ≥0∞ where inv_inv a := by by_cases a = 0 <;> cases a <;> simp_all [none_eq_top, some_eq_coe, -coe_inv, (coe_inv _).symm] @[simp] protected lemma inv_eq_one : a⁻¹ = 1 ↔ a = 1 := by rw [← inv_inj, inv_inv, inv_one] @[simp] theorem inv_eq_top : a⁻¹ = ∞ ↔ a = 0 := inv_zero ▸ inv_inj #align ennreal.inv_eq_top ENNReal.inv_eq_top theorem inv_ne_top : a⁻¹ ≠ ∞ ↔ a ≠ 0 := by simp #align ennreal.inv_ne_top ENNReal.inv_ne_top @[simp]
Mathlib/Data/ENNReal/Inv.lean
137
138
theorem inv_lt_top {x : ℝ≥0∞} : x⁻¹ < ∞ ↔ 0 < x := by
simp only [lt_top_iff_ne_top, inv_ne_top, pos_iff_ne_zero]
[ " a / b = b⁻¹ * a", " sInf {b | 1 ≤ 0 * b} = ⊤", " a ∈ {b | 1 ≤ ⊤ * b}", " ∀ (p : ℝ≥0), b = ↑p → r⁻¹ ≤ p", " r⁻¹ ≤ b", " 1 ≤ r * b", " 1 ≤ ↑r * ↑r⁻¹", " ↑2⁻¹ = 2⁻¹", " ↑(p / r) = ↑p / ↑r", " ↑(p / r) ≤ ↑p / ↑r", " a / 0 = ⊤", " 1⁻¹ = 1", " (x✝ ^ 0)⁻¹ = x✝⁻¹ ^ 0", " (⊤ ^ (n + 1))⁻¹ = ⊤⁻¹ ^ ...
[ " a / b = b⁻¹ * a", " sInf {b | 1 ≤ 0 * b} = ⊤", " a ∈ {b | 1 ≤ ⊤ * b}", " ∀ (p : ℝ≥0), b = ↑p → r⁻¹ ≤ p", " r⁻¹ ≤ b", " 1 ≤ r * b", " 1 ≤ ↑r * ↑r⁻¹", " ↑2⁻¹ = 2⁻¹", " ↑(p / r) = ↑p / ↑r", " ↑(p / r) ≤ ↑p / ↑r", " a / 0 = ⊤", " 1⁻¹ = 1", " (x✝ ^ 0)⁻¹ = x✝⁻¹ ^ 0", " (⊤ ^ (n + 1))⁻¹ = ⊤⁻¹ ^ ...
import Mathlib.Probability.Notation import Mathlib.Probability.Integration import Mathlib.MeasureTheory.Function.L2Space #align_import probability.variance from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open MeasureTheory Filter Finset noncomputable section open scoped MeasureTheory ProbabilityTheory ENNReal NNReal namespace ProbabilityTheory -- Porting note: this lemma replaces `ENNReal.toReal_bit0`, which does not exist in Lean 4 private lemma coe_two : ENNReal.toReal 2 = (2 : ℝ) := rfl -- Porting note: Consider if `evariance` or `eVariance` is better. Also, -- consider `eVariationOn` in `Mathlib.Analysis.BoundedVariation`. def evariance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ≥0∞ := ∫⁻ ω, (‖X ω - μ[X]‖₊ : ℝ≥0∞) ^ 2 ∂μ #align probability_theory.evariance ProbabilityTheory.evariance def variance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ := (evariance X μ).toReal #align probability_theory.variance ProbabilityTheory.variance variable {Ω : Type*} {m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : Measure Ω} theorem _root_.MeasureTheory.Memℒp.evariance_lt_top [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) : evariance X μ < ∞ := by have := ENNReal.pow_lt_top (hX.sub <| memℒp_const <| μ[X]).2 2 rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top, ← ENNReal.rpow_two] at this simp only [coe_two, Pi.sub_apply, ENNReal.one_toReal, one_div] at this rw [← ENNReal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 : ℝ) ≠ 0), ENNReal.rpow_one] at this simp_rw [ENNReal.rpow_two] at this exact this #align measure_theory.mem_ℒp.evariance_lt_top MeasureTheory.Memℒp.evariance_lt_top theorem evariance_eq_top [IsFiniteMeasure μ] (hXm : AEStronglyMeasurable X μ) (hX : ¬Memℒp X 2 μ) : evariance X μ = ∞ := by by_contra h rw [← Ne, ← lt_top_iff_ne_top] at h have : Memℒp (fun ω => X ω - μ[X]) 2 μ := by refine ⟨hXm.sub aestronglyMeasurable_const, ?_⟩ rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top] simp only [coe_two, ENNReal.one_toReal, ENNReal.rpow_two, Ne] exact ENNReal.rpow_lt_top_of_nonneg (by linarith) h.ne refine hX ?_ -- Porting note: `μ[X]` without whitespace is ambiguous as it could be GetElem, -- and `convert` cannot disambiguate based on typeclass inference failure. convert this.add (memℒp_const <| μ [X]) ext ω rw [Pi.add_apply, sub_add_cancel] #align probability_theory.evariance_eq_top ProbabilityTheory.evariance_eq_top theorem evariance_lt_top_iff_memℒp [IsFiniteMeasure μ] (hX : AEStronglyMeasurable X μ) : evariance X μ < ∞ ↔ Memℒp X 2 μ := by refine ⟨?_, MeasureTheory.Memℒp.evariance_lt_top⟩ contrapose rw [not_lt, top_le_iff] exact evariance_eq_top hX #align probability_theory.evariance_lt_top_iff_mem_ℒp ProbabilityTheory.evariance_lt_top_iff_memℒp theorem _root_.MeasureTheory.Memℒp.ofReal_variance_eq [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) : ENNReal.ofReal (variance X μ) = evariance X μ := by rw [variance, ENNReal.ofReal_toReal] exact hX.evariance_lt_top.ne #align measure_theory.mem_ℒp.of_real_variance_eq MeasureTheory.Memℒp.ofReal_variance_eq
Mathlib/Probability/Variance.lean
106
113
theorem evariance_eq_lintegral_ofReal (X : Ω → ℝ) (μ : Measure Ω) : evariance X μ = ∫⁻ ω, ENNReal.ofReal ((X ω - μ[X]) ^ 2) ∂μ := by
rw [evariance] congr ext1 ω rw [pow_two, ← ENNReal.coe_mul, ← nnnorm_mul, ← pow_two] congr exact (Real.toNNReal_eq_nnnorm_of_nonneg <| sq_nonneg _).symm
[ " evariance X μ < ⊤", " evariance X μ = ⊤", " False", " Memℒp (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2 μ", " snorm (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2 μ < ⊤", " (∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ ENNReal.toReal 2 ∂μ) ^ (1 / ENNReal.toReal 2) < ⊤", " (∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ) ...
[ " evariance X μ < ⊤", " evariance X μ = ⊤", " False", " Memℒp (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2 μ", " snorm (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2 μ < ⊤", " (∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ ENNReal.toReal 2 ∂μ) ^ (1 / ENNReal.toReal 2) < ⊤", " (∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ) ...
import Mathlib.Algebra.Order.Group.Instances import Mathlib.Algebra.Order.Group.OrderIso import Mathlib.Data.Set.Pointwise.SMul import Mathlib.Order.UpperLower.Basic #align_import algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c" open Function Set open Pointwise section OrderedCommGroup variable {α : Type*} [OrderedCommGroup α] {s t : Set α} {a : α} @[to_additive] theorem IsUpperSet.smul (hs : IsUpperSet s) : IsUpperSet (a • s) := hs.image <| OrderIso.mulLeft _ #align is_upper_set.smul IsUpperSet.smul #align is_upper_set.vadd IsUpperSet.vadd @[to_additive] theorem IsLowerSet.smul (hs : IsLowerSet s) : IsLowerSet (a • s) := hs.image <| OrderIso.mulLeft _ #align is_lower_set.smul IsLowerSet.smul #align is_lower_set.vadd IsLowerSet.vadd @[to_additive]
Mathlib/Algebra/Order/UpperLower.lean
56
58
theorem Set.OrdConnected.smul (hs : s.OrdConnected) : (a • s).OrdConnected := by
rw [← hs.upperClosure_inter_lowerClosure, smul_set_inter] exact (upperClosure _).upper.smul.ordConnected.inter (lowerClosure _).lower.smul.ordConnected
[ " (a • s).OrdConnected", " (a • ↑(upperClosure s) ∩ a • ↑(lowerClosure s)).OrdConnected" ]
[]
import Mathlib.Analysis.SpecialFunctions.Complex.Log #align_import analysis.special_functions.pow.complex from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" open scoped Classical open Real Topology Filter ComplexConjugate Finset Set namespace Complex noncomputable def cpow (x y : ℂ) : ℂ := if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) #align complex.cpow Complex.cpow noncomputable instance : Pow ℂ ℂ := ⟨cpow⟩ @[simp] theorem cpow_eq_pow (x y : ℂ) : cpow x y = x ^ y := rfl #align complex.cpow_eq_pow Complex.cpow_eq_pow theorem cpow_def (x y : ℂ) : x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) := rfl #align complex.cpow_def Complex.cpow_def theorem cpow_def_of_ne_zero {x : ℂ} (hx : x ≠ 0) (y : ℂ) : x ^ y = exp (log x * y) := if_neg hx #align complex.cpow_def_of_ne_zero Complex.cpow_def_of_ne_zero @[simp] theorem cpow_zero (x : ℂ) : x ^ (0 : ℂ) = 1 := by simp [cpow_def] #align complex.cpow_zero Complex.cpow_zero @[simp] theorem cpow_eq_zero_iff (x y : ℂ) : x ^ y = 0 ↔ x = 0 ∧ y ≠ 0 := by simp only [cpow_def] split_ifs <;> simp [*, exp_ne_zero] #align complex.cpow_eq_zero_iff Complex.cpow_eq_zero_iff @[simp]
Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean
55
55
theorem zero_cpow {x : ℂ} (h : x ≠ 0) : (0 : ℂ) ^ x = 0 := by
simp [cpow_def, *]
[ " x ^ 0 = 1", " x ^ y = 0 ↔ x = 0 ∧ y ≠ 0", " (if x = 0 then if y = 0 then 1 else 0 else cexp (x.log * y)) = 0 ↔ x = 0 ∧ y ≠ 0", " 1 = 0 ↔ x = 0 ∧ y ≠ 0", " 0 = 0 ↔ x = 0 ∧ y ≠ 0", " cexp (x.log * y) = 0 ↔ x = 0 ∧ y ≠ 0", " 0 ^ x = 0" ]
[ " x ^ 0 = 1", " x ^ y = 0 ↔ x = 0 ∧ y ≠ 0", " (if x = 0 then if y = 0 then 1 else 0 else cexp (x.log * y)) = 0 ↔ x = 0 ∧ y ≠ 0", " 1 = 0 ↔ x = 0 ∧ y ≠ 0", " 0 = 0 ↔ x = 0 ∧ y ≠ 0", " cexp (x.log * y) = 0 ↔ x = 0 ∧ y ≠ 0" ]
import Mathlib.Algebra.Order.Field.Basic import Mathlib.Data.Nat.Cast.Order import Mathlib.Tactic.Common #align_import data.nat.cast.field from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829" namespace Nat variable {α : Type*} @[simp] theorem cast_div [DivisionSemiring α] {m n : ℕ} (n_dvd : n ∣ m) (hn : (n : α) ≠ 0) : ((m / n : ℕ) : α) = m / n := by rcases n_dvd with ⟨k, rfl⟩ have : n ≠ 0 := by rintro rfl; simp at hn rw [Nat.mul_div_cancel_left _ this.bot_lt, mul_comm n, cast_mul, mul_div_cancel_right₀ _ hn] #align nat.cast_div Nat.cast_div theorem cast_div_div_div_cancel_right [DivisionSemiring α] [CharZero α] {m n d : ℕ} (hn : d ∣ n) (hm : d ∣ m) : (↑(m / d) : α) / (↑(n / d) : α) = (m : α) / n := by rcases eq_or_ne d 0 with (rfl | hd); · simp [Nat.zero_dvd.1 hm] replace hd : (d : α) ≠ 0 := by norm_cast rw [cast_div hm, cast_div hn, div_div_div_cancel_right _ hd] <;> exact hd #align nat.cast_div_div_div_cancel_right Nat.cast_div_div_div_cancel_right section LinearOrderedSemifield variable [LinearOrderedSemifield α] lemma cast_inv_le_one : ∀ n : ℕ, (n⁻¹ : α) ≤ 1 | 0 => by simp | n + 1 => inv_le_one $ by simp [Nat.cast_nonneg] theorem cast_div_le {m n : ℕ} : ((m / n : ℕ) : α) ≤ m / n := by cases n · rw [cast_zero, div_zero, Nat.div_zero, cast_zero] rw [le_div_iff, ← Nat.cast_mul, @Nat.cast_le] · exact Nat.div_mul_le_self m _ · exact Nat.cast_pos.2 (Nat.succ_pos _) #align nat.cast_div_le Nat.cast_div_le theorem inv_pos_of_nat {n : ℕ} : 0 < ((n : α) + 1)⁻¹ := inv_pos.2 <| add_pos_of_nonneg_of_pos n.cast_nonneg zero_lt_one #align nat.inv_pos_of_nat Nat.inv_pos_of_nat theorem one_div_pos_of_nat {n : ℕ} : 0 < 1 / ((n : α) + 1) := by rw [one_div] exact inv_pos_of_nat #align nat.one_div_pos_of_nat Nat.one_div_pos_of_nat theorem one_div_le_one_div {n m : ℕ} (h : n ≤ m) : 1 / ((m : α) + 1) ≤ 1 / ((n : α) + 1) := by refine one_div_le_one_div_of_le ?_ ?_ · exact Nat.cast_add_one_pos _ · simpa #align nat.one_div_le_one_div Nat.one_div_le_one_div
Mathlib/Data/Nat/Cast/Field.lean
76
79
theorem one_div_lt_one_div {n m : ℕ} (h : n < m) : 1 / ((m : α) + 1) < 1 / ((n : α) + 1) := by
refine one_div_lt_one_div_of_lt ?_ ?_ · exact Nat.cast_add_one_pos _ · simpa
[ " ↑(m / n) = ↑m / ↑n", " ↑(n * k / n) = ↑(n * k) / ↑n", " n ≠ 0", " False", " ↑(m / d) / ↑(n / d) = ↑m / ↑n", " ↑(m / 0) / ↑(n / 0) = ↑m / ↑n", " ↑d ≠ 0", " (↑0)⁻¹ ≤ 1", " 1 ≤ ↑(n + 1)", " ↑(m / n) ≤ ↑m / ↑n", " ↑(m / 0) ≤ ↑m / ↑0", " ↑(m / (n✝ + 1)) ≤ ↑m / ↑(n✝ + 1)", " m / (n✝ + 1) * (n✝ +...
[ " ↑(m / n) = ↑m / ↑n", " ↑(n * k / n) = ↑(n * k) / ↑n", " n ≠ 0", " False", " ↑(m / d) / ↑(n / d) = ↑m / ↑n", " ↑(m / 0) / ↑(n / 0) = ↑m / ↑n", " ↑d ≠ 0", " (↑0)⁻¹ ≤ 1", " 1 ≤ ↑(n + 1)", " ↑(m / n) ≤ ↑m / ↑n", " ↑(m / 0) ≤ ↑m / ↑0", " ↑(m / (n✝ + 1)) ≤ ↑m / ↑(n✝ + 1)", " m / (n✝ + 1) * (n✝ +...
import Mathlib.Algebra.Lie.Abelian import Mathlib.Algebra.Lie.IdealOperations import Mathlib.Algebra.Lie.Quotient #align_import algebra.lie.normalizer from "leanprover-community/mathlib"@"938fead7abdc0cbbca8eba7a1052865a169dc102" variable {R L M M' : Type*} variable [CommRing R] [LieRing L] [LieAlgebra R L] variable [AddCommGroup M] [Module R M] [LieRingModule L M] [LieModule R L M] variable [AddCommGroup M'] [Module R M'] [LieRingModule L M'] [LieModule R L M'] namespace LieSubmodule variable (N : LieSubmodule R L M) {N₁ N₂ : LieSubmodule R L M} def normalizer : LieSubmodule R L M where carrier := {m | ∀ x : L, ⁅x, m⁆ ∈ N} add_mem' hm₁ hm₂ x := by rw [lie_add]; exact N.add_mem' (hm₁ x) (hm₂ x) zero_mem' x := by simp smul_mem' t m hm x := by rw [lie_smul]; exact N.smul_mem' t (hm x) lie_mem {x m} hm y := by rw [leibniz_lie]; exact N.add_mem' (hm ⁅y, x⁆) (N.lie_mem (hm y)) #align lie_submodule.normalizer LieSubmodule.normalizer @[simp] theorem mem_normalizer (m : M) : m ∈ N.normalizer ↔ ∀ x : L, ⁅x, m⁆ ∈ N := Iff.rfl #align lie_submodule.mem_normalizer LieSubmodule.mem_normalizer @[simp] theorem le_normalizer : N ≤ N.normalizer := by intro m hm rw [mem_normalizer] exact fun x => N.lie_mem hm #align lie_submodule.le_normalizer LieSubmodule.le_normalizer theorem normalizer_inf : (N₁ ⊓ N₂).normalizer = N₁.normalizer ⊓ N₂.normalizer := by ext; simp [← forall_and] #align lie_submodule.normalizer_inf LieSubmodule.normalizer_inf @[mono] theorem monotone_normalizer : Monotone (normalizer : LieSubmodule R L M → LieSubmodule R L M) := by intro N₁ N₂ h m hm rw [mem_normalizer] at hm ⊢ exact fun x => h (hm x) #align lie_submodule.monotone_normalizer LieSubmodule.monotone_normalizer @[simp]
Mathlib/Algebra/Lie/Normalizer.lean
82
83
theorem comap_normalizer (f : M' →ₗ⁅R,L⁆ M) : N.normalizer.comap f = (N.comap f).normalizer := by
ext; simp
[ " ⁅x, a✝ + b✝⁆ ∈ N", " ⁅x, a✝⁆ + ⁅x, b✝⁆ ∈ N", " ⁅x, 0⁆ ∈ N", " ⁅x, t • m⁆ ∈ N", " t • ⁅x, m⁆ ∈ N", " ⁅y, ⁅x, m⁆⁆ ∈ N", " ⁅⁅y, x⁆, m⁆ + ⁅x, ⁅y, m⁆⁆ ∈ N", " N ≤ N.normalizer", " m ∈ N.normalizer", " ∀ (x : L), ⁅x, m⁆ ∈ N", " (N₁ ⊓ N₂).normalizer = N₁.normalizer ⊓ N₂.normalizer", " m✝ ∈ (N₁ ⊓ N₂...
[ " ⁅x, a✝ + b✝⁆ ∈ N", " ⁅x, a✝⁆ + ⁅x, b✝⁆ ∈ N", " ⁅x, 0⁆ ∈ N", " ⁅x, t • m⁆ ∈ N", " t • ⁅x, m⁆ ∈ N", " ⁅y, ⁅x, m⁆⁆ ∈ N", " ⁅⁅y, x⁆, m⁆ + ⁅x, ⁅y, m⁆⁆ ∈ N", " N ≤ N.normalizer", " m ∈ N.normalizer", " ∀ (x : L), ⁅x, m⁆ ∈ N", " (N₁ ⊓ N₂).normalizer = N₁.normalizer ⊓ N₂.normalizer", " m✝ ∈ (N₁ ⊓ N₂...
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Analysis.NormedSpace.Real #align_import analysis.special_functions.log.basic from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690" open Set Filter Function open Topology noncomputable section namespace Real variable {x y : ℝ} -- @[pp_nodot] -- Porting note: removed noncomputable def log (x : ℝ) : ℝ := if hx : x = 0 then 0 else expOrderIso.symm ⟨|x|, abs_pos.2 hx⟩ #align real.log Real.log theorem log_of_ne_zero (hx : x ≠ 0) : log x = expOrderIso.symm ⟨|x|, abs_pos.2 hx⟩ := dif_neg hx #align real.log_of_ne_zero Real.log_of_ne_zero theorem log_of_pos (hx : 0 < x) : log x = expOrderIso.symm ⟨x, hx⟩ := by rw [log_of_ne_zero hx.ne'] congr exact abs_of_pos hx #align real.log_of_pos Real.log_of_pos theorem exp_log_eq_abs (hx : x ≠ 0) : exp (log x) = |x| := by rw [log_of_ne_zero hx, ← coe_expOrderIso_apply, OrderIso.apply_symm_apply, Subtype.coe_mk] #align real.exp_log_eq_abs Real.exp_log_eq_abs theorem exp_log (hx : 0 < x) : exp (log x) = x := by rw [exp_log_eq_abs hx.ne'] exact abs_of_pos hx #align real.exp_log Real.exp_log
Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
64
66
theorem exp_log_of_neg (hx : x < 0) : exp (log x) = -x := by
rw [exp_log_eq_abs (ne_of_lt hx)] exact abs_of_neg hx
[ " x.log = expOrderIso.symm ⟨x, hx⟩", " expOrderIso.symm ⟨|x|, ⋯⟩ = expOrderIso.symm ⟨x, hx⟩", " |x| = x", " rexp x.log = |x|", " rexp x.log = x", " rexp x.log = -x", " |x| = -x" ]
[ " x.log = expOrderIso.symm ⟨x, hx⟩", " expOrderIso.symm ⟨|x|, ⋯⟩ = expOrderIso.symm ⟨x, hx⟩", " |x| = x", " rexp x.log = |x|", " rexp x.log = x" ]
import Mathlib.Data.Real.Irrational import Mathlib.Data.Nat.Fib.Basic import Mathlib.Data.Fin.VecNotation import Mathlib.Algebra.LinearRecurrence import Mathlib.Tactic.NormNum.NatFib import Mathlib.Tactic.NormNum.Prime #align_import data.real.golden_ratio from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" noncomputable section open Polynomial abbrev goldenRatio : ℝ := (1 + √5) / 2 #align golden_ratio goldenRatio abbrev goldenConj : ℝ := (1 - √5) / 2 #align golden_conj goldenConj @[inherit_doc goldenRatio] scoped[goldenRatio] notation "φ" => goldenRatio @[inherit_doc goldenConj] scoped[goldenRatio] notation "ψ" => goldenConj open Real goldenRatio theorem inv_gold : φ⁻¹ = -ψ := by have : 1 + √5 ≠ 0 := ne_of_gt (add_pos (by norm_num) <| Real.sqrt_pos.mpr (by norm_num)) field_simp [sub_mul, mul_add] norm_num #align inv_gold inv_gold theorem inv_goldConj : ψ⁻¹ = -φ := by rw [inv_eq_iff_eq_inv, ← neg_inv, ← neg_eq_iff_eq_neg] exact inv_gold.symm #align inv_gold_conj inv_goldConj @[simp] theorem gold_mul_goldConj : φ * ψ = -1 := by field_simp rw [← sq_sub_sq] norm_num #align gold_mul_gold_conj gold_mul_goldConj @[simp] theorem goldConj_mul_gold : ψ * φ = -1 := by rw [mul_comm] exact gold_mul_goldConj #align gold_conj_mul_gold goldConj_mul_gold @[simp] theorem gold_add_goldConj : φ + ψ = 1 := by rw [goldenRatio, goldenConj] ring #align gold_add_gold_conj gold_add_goldConj theorem one_sub_goldConj : 1 - φ = ψ := by linarith [gold_add_goldConj] #align one_sub_gold_conj one_sub_goldConj theorem one_sub_gold : 1 - ψ = φ := by linarith [gold_add_goldConj] #align one_sub_gold one_sub_gold @[simp] theorem gold_sub_goldConj : φ - ψ = √5 := by ring #align gold_sub_gold_conj gold_sub_goldConj theorem gold_pow_sub_gold_pow (n : ℕ) : φ ^ (n + 2) - φ ^ (n + 1) = φ ^ n := by rw [goldenRatio]; ring_nf; norm_num; ring @[simp 1200] theorem gold_sq : φ ^ 2 = φ + 1 := by rw [goldenRatio, ← sub_eq_zero] ring_nf rw [Real.sq_sqrt] <;> norm_num #align gold_sq gold_sq @[simp 1200]
Mathlib/Data/Real/GoldenRatio.lean
98
101
theorem goldConj_sq : ψ ^ 2 = ψ + 1 := by
rw [goldenConj, ← sub_eq_zero] ring_nf rw [Real.sq_sqrt] <;> norm_num
[ " φ⁻¹ = -ψ", " 0 < 1", " 0 < 5", " 2 * 2 = 5 - 1", " ψ⁻¹ = -φ", " -ψ = φ⁻¹", " φ * ψ = -1", " (1 + √5) * (1 - √5) = -(2 * 2)", " 1 ^ 2 - √5 ^ 2 = -(2 * 2)", " ψ * φ = -1", " φ + ψ = 1", " (1 + √5) / 2 + (1 - √5) / 2 = 1", " 1 - φ = ψ", " 1 - ψ = φ", " φ - ψ = √5", " φ ^ (n + 2) - φ ^ (...
[ " φ⁻¹ = -ψ", " 0 < 1", " 0 < 5", " 2 * 2 = 5 - 1", " ψ⁻¹ = -φ", " -ψ = φ⁻¹", " φ * ψ = -1", " (1 + √5) * (1 - √5) = -(2 * 2)", " 1 ^ 2 - √5 ^ 2 = -(2 * 2)", " ψ * φ = -1", " φ + ψ = 1", " (1 + √5) / 2 + (1 - √5) / 2 = 1", " 1 - φ = ψ", " 1 - ψ = φ", " φ - ψ = √5", " φ ^ (n + 2) - φ ^ (...
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed import Mathlib.RingTheory.PowerBasis #align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" open scoped Polynomial open Polynomial noncomputable section universe u v -- Porting note: this looks like something that should not be here -- -- This class doesn't really make sense on a predicate -- Porting note(#5171): this linter isn't ported yet. -- @[nolint has_nonempty_instance] structure IsAdjoinRoot {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S] (f : R[X]) : Type max u v where map : R[X] →+* S map_surjective : Function.Surjective map ker_map : RingHom.ker map = Ideal.span {f} algebraMap_eq : algebraMap R S = map.comp Polynomial.C #align is_adjoin_root IsAdjoinRoot -- This class doesn't really make sense on a predicate -- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet. structure IsAdjoinRootMonic {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S] (f : R[X]) extends IsAdjoinRoot S f where Monic : Monic f #align is_adjoin_root_monic IsAdjoinRootMonic section Ring variable {R : Type u} {S : Type v} [CommRing R] [Ring S] {f : R[X]} [Algebra R S] namespace IsAdjoinRoot def root (h : IsAdjoinRoot S f) : S := h.map X #align is_adjoin_root.root IsAdjoinRoot.root theorem subsingleton (h : IsAdjoinRoot S f) [Subsingleton R] : Subsingleton S := h.map_surjective.subsingleton #align is_adjoin_root.subsingleton IsAdjoinRoot.subsingleton theorem algebraMap_apply (h : IsAdjoinRoot S f) (x : R) : algebraMap R S x = h.map (Polynomial.C x) := by rw [h.algebraMap_eq, RingHom.comp_apply] #align is_adjoin_root.algebra_map_apply IsAdjoinRoot.algebraMap_apply @[simp] theorem mem_ker_map (h : IsAdjoinRoot S f) {p} : p ∈ RingHom.ker h.map ↔ f ∣ p := by rw [h.ker_map, Ideal.mem_span_singleton] #align is_adjoin_root.mem_ker_map IsAdjoinRoot.mem_ker_map theorem map_eq_zero_iff (h : IsAdjoinRoot S f) {p} : h.map p = 0 ↔ f ∣ p := by rw [← h.mem_ker_map, RingHom.mem_ker] #align is_adjoin_root.map_eq_zero_iff IsAdjoinRoot.map_eq_zero_iff @[simp] theorem map_X (h : IsAdjoinRoot S f) : h.map X = h.root := rfl set_option linter.uppercaseLean3 false in #align is_adjoin_root.map_X IsAdjoinRoot.map_X @[simp] theorem map_self (h : IsAdjoinRoot S f) : h.map f = 0 := h.map_eq_zero_iff.mpr dvd_rfl #align is_adjoin_root.map_self IsAdjoinRoot.map_self @[simp] theorem aeval_eq (h : IsAdjoinRoot S f) (p : R[X]) : aeval h.root p = h.map p := Polynomial.induction_on p (fun x => by rw [aeval_C, h.algebraMap_apply]) (fun p q ihp ihq => by rw [AlgHom.map_add, RingHom.map_add, ihp, ihq]) fun n x _ => by rw [AlgHom.map_mul, aeval_C, AlgHom.map_pow, aeval_X, RingHom.map_mul, ← h.algebraMap_apply, RingHom.map_pow, map_X] #align is_adjoin_root.aeval_eq IsAdjoinRoot.aeval_eq -- @[simp] -- Porting note (#10618): simp can prove this theorem aeval_root (h : IsAdjoinRoot S f) : aeval h.root f = 0 := by rw [aeval_eq, map_self] #align is_adjoin_root.aeval_root IsAdjoinRoot.aeval_root def repr (h : IsAdjoinRoot S f) (x : S) : R[X] := (h.map_surjective x).choose #align is_adjoin_root.repr IsAdjoinRoot.repr theorem map_repr (h : IsAdjoinRoot S f) (x : S) : h.map (h.repr x) = x := (h.map_surjective x).choose_spec #align is_adjoin_root.map_repr IsAdjoinRoot.map_repr theorem repr_zero_mem_span (h : IsAdjoinRoot S f) : h.repr 0 ∈ Ideal.span ({f} : Set R[X]) := by rw [← h.ker_map, RingHom.mem_ker, h.map_repr] #align is_adjoin_root.repr_zero_mem_span IsAdjoinRoot.repr_zero_mem_span theorem repr_add_sub_repr_add_repr_mem_span (h : IsAdjoinRoot S f) (x y : S) : h.repr (x + y) - (h.repr x + h.repr y) ∈ Ideal.span ({f} : Set R[X]) := by rw [← h.ker_map, RingHom.mem_ker, map_sub, h.map_repr, map_add, h.map_repr, h.map_repr, sub_self] #align is_adjoin_root.repr_add_sub_repr_add_repr_mem_span IsAdjoinRoot.repr_add_sub_repr_add_repr_mem_span
Mathlib/RingTheory/IsAdjoinRoot.lean
186
188
theorem ext_map (h h' : IsAdjoinRoot S f) (eq : ∀ x, h.map x = h'.map x) : h = h' := by
cases h; cases h'; congr exact RingHom.ext eq
[ " (algebraMap R S) x = h.map (C x)", " p ∈ RingHom.ker h.map ↔ f ∣ p", " h.map p = 0 ↔ f ∣ p", " (aeval h.root) (C x) = h.map (C x)", " (aeval h.root) (p + q) = h.map (p + q)", " (aeval h.root) (C x * X ^ (n + 1)) = h.map (C x * X ^ (n + 1))", " (aeval h.root) f = 0", " h.repr 0 ∈ Ideal.span {f}", "...
[ " (algebraMap R S) x = h.map (C x)", " p ∈ RingHom.ker h.map ↔ f ∣ p", " h.map p = 0 ↔ f ∣ p", " (aeval h.root) (C x) = h.map (C x)", " (aeval h.root) (p + q) = h.map (p + q)", " (aeval h.root) (C x * X ^ (n + 1)) = h.map (C x * X ^ (n + 1))", " (aeval h.root) f = 0", " h.repr 0 ∈ Ideal.span {f}", "...
import Mathlib.Geometry.Manifold.Diffeomorph import Mathlib.Geometry.Manifold.Instances.Real import Mathlib.Geometry.Manifold.PartitionOfUnity #align_import geometry.manifold.whitney_embedding from "leanprover-community/mathlib"@"86c29aefdba50b3f33e86e52e3b2f51a0d8f0282" universe uι uE uH uM variable {ι : Type uι} {E : Type uE} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {H : Type uH} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} {M : Type uM} [TopologicalSpace M] [ChartedSpace H M] [SmoothManifoldWithCorners I M] open Function Filter FiniteDimensional Set open scoped Topology Manifold Classical Filter noncomputable section namespace SmoothBumpCovering variable [T2Space M] [hi : Fintype ι] {s : Set M} (f : SmoothBumpCovering ι I M s) def embeddingPiTangent : C^∞⟮I, M; 𝓘(ℝ, ι → E × ℝ), ι → E × ℝ⟯ where val x i := (f i x • extChartAt I (f.c i) x, f i x) property := contMDiff_pi_space.2 fun i => ((f i).smooth_smul contMDiffOn_extChartAt).prod_mk_space (f i).smooth #align smooth_bump_covering.embedding_pi_tangent SmoothBumpCovering.embeddingPiTangent @[local simp] theorem embeddingPiTangent_coe : ⇑f.embeddingPiTangent = fun x i => (f i x • extChartAt I (f.c i) x, f i x) := rfl #align smooth_bump_covering.embedding_pi_tangent_coe SmoothBumpCovering.embeddingPiTangent_coe
Mathlib/Geometry/Manifold/WhitneyEmbedding.lean
68
75
theorem embeddingPiTangent_injOn : InjOn f.embeddingPiTangent s := by
intro x hx y _ h simp only [embeddingPiTangent_coe, funext_iff] at h obtain ⟨h₁, h₂⟩ := Prod.mk.inj_iff.1 (h (f.ind x hx)) rw [f.apply_ind x hx] at h₂ rw [← h₂, f.apply_ind x hx, one_smul, one_smul] at h₁ have := f.mem_extChartAt_source_of_eq_one h₂.symm exact (extChartAt I (f.c _)).injOn (f.mem_extChartAt_ind_source x hx) this h₁
[ " InjOn (⇑f.embeddingPiTangent) s", " x = y" ]
[]
import Mathlib.Algebra.Module.Zlattice.Basic import Mathlib.NumberTheory.NumberField.Embeddings import Mathlib.NumberTheory.NumberField.FractionalIdeal #align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30" variable (K : Type*) [Field K] namespace NumberField.mixedEmbedding open NumberField NumberField.InfinitePlace FiniteDimensional Finset local notation "E" K => ({w : InfinitePlace K // IsReal w} → ℝ) × ({w : InfinitePlace K // IsComplex w} → ℂ) noncomputable def _root_.NumberField.mixedEmbedding : K →+* (E K) := RingHom.prod (Pi.ringHom fun w => embedding_of_isReal w.prop) (Pi.ringHom fun w => w.val.embedding) instance [NumberField K] : Nontrivial (E K) := by obtain ⟨w⟩ := (inferInstance : Nonempty (InfinitePlace K)) obtain hw | hw := w.isReal_or_isComplex · have : Nonempty {w : InfinitePlace K // IsReal w} := ⟨⟨w, hw⟩⟩ exact nontrivial_prod_left · have : Nonempty {w : InfinitePlace K // IsComplex w} := ⟨⟨w, hw⟩⟩ exact nontrivial_prod_right protected theorem finrank [NumberField K] : finrank ℝ (E K) = finrank ℚ K := by classical rw [finrank_prod, finrank_pi, finrank_pi_fintype, Complex.finrank_real_complex, sum_const, card_univ, ← NrRealPlaces, ← NrComplexPlaces, ← card_real_embeddings, Algebra.id.smul_eq_mul, mul_comm, ← card_complex_embeddings, ← NumberField.Embeddings.card K ℂ, Fintype.card_subtype_compl, Nat.add_sub_of_le (Fintype.card_subtype_le _)] theorem _root_.NumberField.mixedEmbedding_injective [NumberField K] : Function.Injective (NumberField.mixedEmbedding K) := by exact RingHom.injective _ noncomputable section norm open scoped Classical variable {K} def normAtPlace (w : InfinitePlace K) : (E K) →*₀ ℝ where toFun x := if hw : IsReal w then ‖x.1 ⟨w, hw⟩‖ else ‖x.2 ⟨w, not_isReal_iff_isComplex.mp hw⟩‖ map_zero' := by simp map_one' := by simp map_mul' x y := by split_ifs <;> simp theorem normAtPlace_nonneg (w : InfinitePlace K) (x : E K) : 0 ≤ normAtPlace w x := by rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk] split_ifs <;> exact norm_nonneg _ theorem normAtPlace_neg (w : InfinitePlace K) (x : E K) : normAtPlace w (- x) = normAtPlace w x := by rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk] split_ifs <;> simp theorem normAtPlace_add_le (w : InfinitePlace K) (x y : E K) : normAtPlace w (x + y) ≤ normAtPlace w x + normAtPlace w y := by rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk] split_ifs <;> exact norm_add_le _ _ theorem normAtPlace_smul (w : InfinitePlace K) (x : E K) (c : ℝ) : normAtPlace w (c • x) = |c| * normAtPlace w x := by rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk] split_ifs · rw [Prod.smul_fst, Pi.smul_apply, norm_smul, Real.norm_eq_abs] · rw [Prod.smul_snd, Pi.smul_apply, norm_smul, Real.norm_eq_abs, Complex.norm_eq_abs] theorem normAtPlace_real (w : InfinitePlace K) (c : ℝ) : normAtPlace w ((fun _ ↦ c, fun _ ↦ c) : (E K)) = |c| := by rw [show ((fun _ ↦ c, fun _ ↦ c) : (E K)) = c • 1 by ext <;> simp, normAtPlace_smul, map_one, mul_one] theorem normAtPlace_apply_isReal {w : InfinitePlace K} (hw : IsReal w) (x : E K): normAtPlace w x = ‖x.1 ⟨w, hw⟩‖ := by rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, dif_pos] theorem normAtPlace_apply_isComplex {w : InfinitePlace K} (hw : IsComplex w) (x : E K) : normAtPlace w x = ‖x.2 ⟨w, hw⟩‖ := by rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, dif_neg (not_isReal_iff_isComplex.mpr hw)] @[simp]
Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean
296
300
theorem normAtPlace_apply (w : InfinitePlace K) (x : K) : normAtPlace w (mixedEmbedding K x) = w x := by
simp_rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, mixedEmbedding, RingHom.prod_apply, Pi.ringHom_apply, norm_embedding_of_isReal, norm_embedding_eq, dite_eq_ite, ite_id]
[ " Nontrivial (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))", " finrank ℝ (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)) = finrank ℚ K", " Function.Injective ⇑(mixedEmbedding K)", " (fun x => if hw : w.IsReal then ‖x.1 ⟨w, hw⟩‖ else ‖x.2 ⟨w, ⋯⟩‖) 0 = 0", " { toFun := fun x => if hw : w.IsRea...
[ " Nontrivial (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))", " finrank ℝ (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)) = finrank ℚ K", " Function.Injective ⇑(mixedEmbedding K)", " (fun x => if hw : w.IsReal then ‖x.1 ⟨w, hw⟩‖ else ‖x.2 ⟨w, ⋯⟩‖) 0 = 0", " { toFun := fun x => if hw : w.IsRea...
import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.Ideal.LocalRing #align_import data.polynomial.expand from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" universe u v w open Polynomial open Finset namespace Polynomial section CommSemiring variable (R : Type u) [CommSemiring R] {S : Type v} [CommSemiring S] (p q : ℕ) noncomputable def expand : R[X] →ₐ[R] R[X] := { (eval₂RingHom C (X ^ p) : R[X] →+* R[X]) with commutes' := fun _ => eval₂_C _ _ } #align polynomial.expand Polynomial.expand theorem coe_expand : (expand R p : R[X] → R[X]) = eval₂ C (X ^ p) := rfl #align polynomial.coe_expand Polynomial.coe_expand variable {R} theorem expand_eq_comp_X_pow {f : R[X]} : expand R p f = f.comp (X ^ p) := rfl theorem expand_eq_sum {f : R[X]} : expand R p f = f.sum fun e a => C a * (X ^ p) ^ e := by simp [expand, eval₂] #align polynomial.expand_eq_sum Polynomial.expand_eq_sum @[simp] theorem expand_C (r : R) : expand R p (C r) = C r := eval₂_C _ _ set_option linter.uppercaseLean3 false in #align polynomial.expand_C Polynomial.expand_C @[simp] theorem expand_X : expand R p X = X ^ p := eval₂_X _ _ set_option linter.uppercaseLean3 false in #align polynomial.expand_X Polynomial.expand_X @[simp]
Mathlib/Algebra/Polynomial/Expand.lean
65
66
theorem expand_monomial (r : R) : expand R p (monomial q r) = monomial (q * p) r := by
simp_rw [← smul_X_eq_monomial, AlgHom.map_smul, AlgHom.map_pow, expand_X, mul_comm, pow_mul]
[ " (expand R p) f = f.sum fun e a => C a * (X ^ p) ^ e", " (expand R p) ((monomial q) r) = (monomial (q * p)) r" ]
[ " (expand R p) f = f.sum fun e a => C a * (X ^ p) ^ e" ]
import Mathlib.Data.Finset.Lattice #align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" variable {α : Type*} [DecidableEq α] {𝒜 ℬ : Finset (Finset α)} {s : Finset α} {a : α} namespace Finset def nonMemberSubfamily (a : α) (𝒜 : Finset (Finset α)) : Finset (Finset α) := 𝒜.filter fun s => a ∉ s #align finset.non_member_subfamily Finset.nonMemberSubfamily def memberSubfamily (a : α) (𝒜 : Finset (Finset α)) : Finset (Finset α) := (𝒜.filter fun s => a ∈ s).image fun s => erase s a #align finset.member_subfamily Finset.memberSubfamily @[simp]
Mathlib/Combinatorics/SetFamily/Compression/Down.lean
56
57
theorem mem_nonMemberSubfamily : s ∈ 𝒜.nonMemberSubfamily a ↔ s ∈ 𝒜 ∧ a ∉ s := by
simp [nonMemberSubfamily]
[ " s ∈ nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ a ∉ s" ]
[]
import Mathlib.Algebra.GroupWithZero.Hom import Mathlib.Algebra.Order.Group.Instances import Mathlib.Algebra.Order.GroupWithZero.Canonical import Mathlib.Order.Hom.Basic #align_import algebra.order.hom.monoid from "leanprover-community/mathlib"@"3342d1b2178381196f818146ff79bc0e7ccd9e2d" open Function variable {F α β γ δ : Type*} section OrderedAddCommGroup variable [OrderedAddCommGroup α] [OrderedAddCommMonoid β] [i : FunLike F α β] variable [iamhc : AddMonoidHomClass F α β] (f : F) theorem monotone_iff_map_nonneg : Monotone (f : α → β) ↔ ∀ a, 0 ≤ a → 0 ≤ f a := ⟨fun h a => by rw [← map_zero f] apply h, fun h a b hl => by rw [← sub_add_cancel b a, map_add f] exact le_add_of_nonneg_left (h _ <| sub_nonneg.2 hl)⟩ #align monotone_iff_map_nonneg monotone_iff_map_nonneg theorem antitone_iff_map_nonpos : Antitone (f : α → β) ↔ ∀ a, 0 ≤ a → f a ≤ 0 := monotone_toDual_comp_iff.symm.trans <| monotone_iff_map_nonneg (β := βᵒᵈ) (iamhc := iamhc) _ #align antitone_iff_map_nonpos antitone_iff_map_nonpos theorem monotone_iff_map_nonpos : Monotone (f : α → β) ↔ ∀ a ≤ 0, f a ≤ 0 := antitone_comp_ofDual_iff.symm.trans <| antitone_iff_map_nonpos (α := αᵒᵈ) (iamhc := iamhc) _ #align monotone_iff_map_nonpos monotone_iff_map_nonpos theorem antitone_iff_map_nonneg : Antitone (f : α → β) ↔ ∀ a ≤ 0, 0 ≤ f a := monotone_comp_ofDual_iff.symm.trans <| monotone_iff_map_nonneg (α := αᵒᵈ) (iamhc := iamhc) _ #align antitone_iff_map_nonneg antitone_iff_map_nonneg variable [CovariantClass β β (· + ·) (· < ·)]
Mathlib/Algebra/Order/Hom/Monoid.lean
216
221
theorem strictMono_iff_map_pos : StrictMono (f : α → β) ↔ ∀ a, 0 < a → 0 < f a := by
refine ⟨fun h a => ?_, fun h a b hl => ?_⟩ · rw [← map_zero f] apply h · rw [← sub_add_cancel b a, map_add f] exact lt_add_of_pos_left _ (h _ <| sub_pos.2 hl)
[ " 0 ≤ a → 0 ≤ f a", " 0 ≤ a → f 0 ≤ f a", " f a ≤ f b", " f a ≤ f (b - a) + f a", " StrictMono ⇑f ↔ ∀ (a : α), 0 < a → 0 < f a", " 0 < a → 0 < f a", " 0 < a → f 0 < f a", " f a < f b", " f a < f (b - a) + f a" ]
[ " 0 ≤ a → 0 ≤ f a", " 0 ≤ a → f 0 ≤ f a", " f a ≤ f b", " f a ≤ f (b - a) + f a" ]
import Mathlib.Analysis.RCLike.Lemmas import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad" set_option linter.uppercaseLean3 false noncomputable section open TopologicalSpace MeasureTheory MeasureTheory.Lp Filter open scoped NNReal ENNReal MeasureTheory namespace MeasureTheory section variable {α F : Type*} {m : MeasurableSpace α} {μ : Measure α} [NormedAddCommGroup F] theorem Memℒp.integrable_sq {f : α → ℝ} (h : Memℒp f 2 μ) : Integrable (fun x => f x ^ 2) μ := by simpa [← memℒp_one_iff_integrable] using h.norm_rpow two_ne_zero ENNReal.two_ne_top #align measure_theory.mem_ℒp.integrable_sq MeasureTheory.Memℒp.integrable_sq theorem memℒp_two_iff_integrable_sq_norm {f : α → F} (hf : AEStronglyMeasurable f μ) : Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ := by rw [← memℒp_one_iff_integrable] convert (memℒp_norm_rpow_iff hf two_ne_zero ENNReal.two_ne_top).symm · simp · rw [div_eq_mul_inv, ENNReal.mul_inv_cancel two_ne_zero ENNReal.two_ne_top] #align measure_theory.mem_ℒp_two_iff_integrable_sq_norm MeasureTheory.memℒp_two_iff_integrable_sq_norm
Mathlib/MeasureTheory/Function/L2Space.lean
54
57
theorem memℒp_two_iff_integrable_sq {f : α → ℝ} (hf : AEStronglyMeasurable f μ) : Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ := by
convert memℒp_two_iff_integrable_sq_norm hf using 3 simp
[ " Integrable (fun x => f x ^ 2) μ", " Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ", " Memℒp f 2 μ ↔ Memℒp (fun x => ‖f x‖ ^ 2) 1 μ", " ‖f x✝‖ ^ 2 = ‖f x✝‖ ^ ENNReal.toReal 2", " 1 = 2 / 2", " Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ", " f x✝ ^ 2 = ‖f x✝‖ ^ 2" ]
[ " Integrable (fun x => f x ^ 2) μ", " Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ", " Memℒp f 2 μ ↔ Memℒp (fun x => ‖f x‖ ^ 2) 1 μ", " ‖f x✝‖ ^ 2 = ‖f x✝‖ ^ ENNReal.toReal 2", " 1 = 2 / 2" ]
import Mathlib.SetTheory.Game.State #align_import set_theory.game.domineering from "leanprover-community/mathlib"@"b134b2f5cf6dd25d4bbfd3c498b6e36c11a17225" namespace SetTheory namespace PGame namespace Domineering open Function @[simps!] def shiftUp : ℤ × ℤ ≃ ℤ × ℤ := (Equiv.refl ℤ).prodCongr (Equiv.addRight (1 : ℤ)) #align pgame.domineering.shift_up SetTheory.PGame.Domineering.shiftUp @[simps!] def shiftRight : ℤ × ℤ ≃ ℤ × ℤ := (Equiv.addRight (1 : ℤ)).prodCongr (Equiv.refl ℤ) #align pgame.domineering.shift_right SetTheory.PGame.Domineering.shiftRight -- Porting note: reducibility cannot be `local`. For now there are no dependents of this file so -- being globally reducible is fine. abbrev Board := Finset (ℤ × ℤ) #align pgame.domineering.board SetTheory.PGame.Domineering.Board def left (b : Board) : Finset (ℤ × ℤ) := b ∩ b.map shiftUp #align pgame.domineering.left SetTheory.PGame.Domineering.left def right (b : Board) : Finset (ℤ × ℤ) := b ∩ b.map shiftRight #align pgame.domineering.right SetTheory.PGame.Domineering.right theorem mem_left {b : Board} (x : ℤ × ℤ) : x ∈ left b ↔ x ∈ b ∧ (x.1, x.2 - 1) ∈ b := Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv) #align pgame.domineering.mem_left SetTheory.PGame.Domineering.mem_left theorem mem_right {b : Board} (x : ℤ × ℤ) : x ∈ right b ↔ x ∈ b ∧ (x.1 - 1, x.2) ∈ b := Finset.mem_inter.trans (and_congr Iff.rfl Finset.mem_map_equiv) #align pgame.domineering.mem_right SetTheory.PGame.Domineering.mem_right def moveLeft (b : Board) (m : ℤ × ℤ) : Board := (b.erase m).erase (m.1, m.2 - 1) #align pgame.domineering.move_left SetTheory.PGame.Domineering.moveLeft def moveRight (b : Board) (m : ℤ × ℤ) : Board := (b.erase m).erase (m.1 - 1, m.2) #align pgame.domineering.move_right SetTheory.PGame.Domineering.moveRight theorem fst_pred_mem_erase_of_mem_right {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) : (m.1 - 1, m.2) ∈ b.erase m := by rw [mem_right] at h apply Finset.mem_erase_of_ne_of_mem _ h.2 exact ne_of_apply_ne Prod.fst (pred_ne_self m.1) #align pgame.domineering.fst_pred_mem_erase_of_mem_right SetTheory.PGame.Domineering.fst_pred_mem_erase_of_mem_right theorem snd_pred_mem_erase_of_mem_left {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) : (m.1, m.2 - 1) ∈ b.erase m := by rw [mem_left] at h apply Finset.mem_erase_of_ne_of_mem _ h.2 exact ne_of_apply_ne Prod.snd (pred_ne_self m.2) #align pgame.domineering.snd_pred_mem_erase_of_mem_left SetTheory.PGame.Domineering.snd_pred_mem_erase_of_mem_left theorem card_of_mem_left {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) : 2 ≤ Finset.card b := by have w₁ : m ∈ b := (Finset.mem_inter.1 h).1 have w₂ : (m.1, m.2 - 1) ∈ b.erase m := snd_pred_mem_erase_of_mem_left h have i₁ := Finset.card_erase_lt_of_mem w₁ have i₂ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem w₂) exact Nat.lt_of_le_of_lt i₂ i₁ #align pgame.domineering.card_of_mem_left SetTheory.PGame.Domineering.card_of_mem_left theorem card_of_mem_right {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) : 2 ≤ Finset.card b := by have w₁ : m ∈ b := (Finset.mem_inter.1 h).1 have w₂ := fst_pred_mem_erase_of_mem_right h have i₁ := Finset.card_erase_lt_of_mem w₁ have i₂ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem w₂) exact Nat.lt_of_le_of_lt i₂ i₁ #align pgame.domineering.card_of_mem_right SetTheory.PGame.Domineering.card_of_mem_right theorem moveLeft_card {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) : Finset.card (moveLeft b m) + 2 = Finset.card b := by dsimp [moveLeft] rw [Finset.card_erase_of_mem (snd_pred_mem_erase_of_mem_left h)] rw [Finset.card_erase_of_mem (Finset.mem_of_mem_inter_left h)] exact tsub_add_cancel_of_le (card_of_mem_left h) #align pgame.domineering.move_left_card SetTheory.PGame.Domineering.moveLeft_card theorem moveRight_card {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) : Finset.card (moveRight b m) + 2 = Finset.card b := by dsimp [moveRight] rw [Finset.card_erase_of_mem (fst_pred_mem_erase_of_mem_right h)] rw [Finset.card_erase_of_mem (Finset.mem_of_mem_inter_left h)] exact tsub_add_cancel_of_le (card_of_mem_right h) #align pgame.domineering.move_right_card SetTheory.PGame.Domineering.moveRight_card
Mathlib/SetTheory/Game/Domineering.lean
125
126
theorem moveLeft_smaller {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) : Finset.card (moveLeft b m) / 2 < Finset.card b / 2 := by
simp [← moveLeft_card h, lt_add_one]
[ " (m.1 - 1, m.2) ∈ Finset.erase b m", " (m.1 - 1, m.2) ≠ m", " (m.1, m.2 - 1) ∈ Finset.erase b m", " (m.1, m.2 - 1) ≠ m", " 2 ≤ Finset.card b", " Finset.card (moveLeft b m) + 2 = Finset.card b", " ((Finset.erase b m).erase (m.1, m.2 - 1)).card + 2 = Finset.card b", " (Finset.erase b m).card - 1 + 2 = ...
[ " (m.1 - 1, m.2) ∈ Finset.erase b m", " (m.1 - 1, m.2) ≠ m", " (m.1, m.2 - 1) ∈ Finset.erase b m", " (m.1, m.2 - 1) ≠ m", " 2 ≤ Finset.card b", " Finset.card (moveLeft b m) + 2 = Finset.card b", " ((Finset.erase b m).erase (m.1, m.2 - 1)).card + 2 = Finset.card b", " (Finset.erase b m).card - 1 + 2 = ...
import Mathlib.ModelTheory.Syntax import Mathlib.ModelTheory.Semantics import Mathlib.Algebra.Ring.Equiv variable {α : Type*} namespace FirstOrder open FirstOrder inductive ringFunc : ℕ → Type | add : ringFunc 2 | mul : ringFunc 2 | neg : ringFunc 1 | zero : ringFunc 0 | one : ringFunc 0 deriving DecidableEq def Language.ring : Language := { Functions := ringFunc Relations := fun _ => Empty } namespace Ring open ringFunc Language instance (n : ℕ) : DecidableEq (Language.ring.Functions n) := by dsimp [Language.ring]; infer_instance instance (n : ℕ) : DecidableEq (Language.ring.Relations n) := by dsimp [Language.ring]; infer_instance abbrev addFunc : Language.ring.Functions 2 := add abbrev mulFunc : Language.ring.Functions 2 := mul abbrev negFunc : Language.ring.Functions 1 := neg abbrev zeroFunc : Language.ring.Functions 0 := zero abbrev oneFunc : Language.ring.Functions 0 := one instance (α : Type*) : Zero (Language.ring.Term α) := { zero := Constants.term zeroFunc } theorem zero_def (α : Type*) : (0 : Language.ring.Term α) = Constants.term zeroFunc := rfl instance (α : Type*) : One (Language.ring.Term α) := { one := Constants.term oneFunc } theorem one_def (α : Type*) : (1 : Language.ring.Term α) = Constants.term oneFunc := rfl instance (α : Type*) : Add (Language.ring.Term α) := { add := addFunc.apply₂ } theorem add_def (α : Type*) (t₁ t₂ : Language.ring.Term α) : t₁ + t₂ = addFunc.apply₂ t₁ t₂ := rfl instance (α : Type*) : Mul (Language.ring.Term α) := { mul := mulFunc.apply₂ } theorem mul_def (α : Type*) (t₁ t₂ : Language.ring.Term α) : t₁ * t₂ = mulFunc.apply₂ t₁ t₂ := rfl instance (α : Type*) : Neg (Language.ring.Term α) := { neg := negFunc.apply₁ } theorem neg_def (α : Type*) (t : Language.ring.Term α) : -t = negFunc.apply₁ t := rfl instance : Fintype Language.ring.Symbols := ⟨⟨Multiset.ofList [Sum.inl ⟨2, .add⟩, Sum.inl ⟨2, .mul⟩, Sum.inl ⟨1, .neg⟩, Sum.inl ⟨0, .zero⟩, Sum.inl ⟨0, .one⟩], by dsimp [Language.Symbols]; decide⟩, by intro x dsimp [Language.Symbols] rcases x with ⟨_, f⟩ | ⟨_, f⟩ · cases f <;> decide · cases f ⟩ @[simp] theorem card_ring : card Language.ring = 5 := by have : Fintype.card Language.ring.Symbols = 5 := rfl simp [Language.card, this] open Language ring Structure class CompatibleRing (R : Type*) [Add R] [Mul R] [Neg R] [One R] [Zero R] extends Language.ring.Structure R where funMap_add : ∀ x, funMap addFunc x = x 0 + x 1 funMap_mul : ∀ x, funMap mulFunc x = x 0 * x 1 funMap_neg : ∀ x, funMap negFunc x = -x 0 funMap_zero : ∀ x, funMap (zeroFunc : Language.ring.Constants) x = 0 funMap_one : ∀ x, funMap (oneFunc : Language.ring.Constants) x = 1 open CompatibleRing attribute [simp] funMap_add funMap_mul funMap_neg funMap_zero funMap_one section variable {R : Type*} [Add R] [Mul R] [Neg R] [One R] [Zero R] [CompatibleRing R] @[simp]
Mathlib/ModelTheory/Algebra/Ring/Basic.lean
180
182
theorem realize_add (x y : ring.Term α) (v : α → R) : Term.realize v (x + y) = Term.realize v x + Term.realize v y := by
simp [add_def, funMap_add]
[ " DecidableEq (ring.Functions n)", " DecidableEq (ringFunc n)", " DecidableEq (ring.Relations n)", " DecidableEq Empty", " (↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2, mul⟩, Sum.inl ⟨1, neg⟩, Sum.inl ⟨0, zero⟩, Sum.inl ⟨0, one⟩]).Nodup", " ∀ (x : ring.Symbols),\n x ∈\n { val := ↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2,...
[ " DecidableEq (ring.Functions n)", " DecidableEq (ringFunc n)", " DecidableEq (ring.Relations n)", " DecidableEq Empty", " (↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2, mul⟩, Sum.inl ⟨1, neg⟩, Sum.inl ⟨0, zero⟩, Sum.inl ⟨0, one⟩]).Nodup", " ∀ (x : ring.Symbols),\n x ∈\n { val := ↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2,...
import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.Algebra.Order.Sub.Defs import Mathlib.Util.AssertExists #align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce" open Function universe u variable {α : Type u} class OrderedAddCommGroup (α : Type u) extends AddCommGroup α, PartialOrder α where protected add_le_add_left : ∀ a b : α, a ≤ b → ∀ c : α, c + a ≤ c + b #align ordered_add_comm_group OrderedAddCommGroup class OrderedCommGroup (α : Type u) extends CommGroup α, PartialOrder α where protected mul_le_mul_left : ∀ a b : α, a ≤ b → ∀ c : α, c * a ≤ c * b #align ordered_comm_group OrderedCommGroup attribute [to_additive] OrderedCommGroup @[to_additive] instance OrderedCommGroup.to_covariantClass_left_le (α : Type u) [OrderedCommGroup α] : CovariantClass α α (· * ·) (· ≤ ·) where elim a b c bc := OrderedCommGroup.mul_le_mul_left b c bc a #align ordered_comm_group.to_covariant_class_left_le OrderedCommGroup.to_covariantClass_left_le #align ordered_add_comm_group.to_covariant_class_left_le OrderedAddCommGroup.to_covariantClass_left_le -- See note [lower instance priority] @[to_additive OrderedAddCommGroup.toOrderedCancelAddCommMonoid] instance (priority := 100) OrderedCommGroup.toOrderedCancelCommMonoid [OrderedCommGroup α] : OrderedCancelCommMonoid α := { ‹OrderedCommGroup α› with le_of_mul_le_mul_left := fun a b c ↦ le_of_mul_le_mul_left' } #align ordered_comm_group.to_ordered_cancel_comm_monoid OrderedCommGroup.toOrderedCancelCommMonoid #align ordered_add_comm_group.to_ordered_cancel_add_comm_monoid OrderedAddCommGroup.toOrderedCancelAddCommMonoid example (α : Type u) [OrderedAddCommGroup α] : CovariantClass α α (swap (· + ·)) (· < ·) := IsRightCancelAdd.covariant_swap_add_lt_of_covariant_swap_add_le α -- Porting note: this instance is not used, -- and causes timeouts after lean4#2210. -- It was introduced in https://github.com/leanprover-community/mathlib/pull/17564 -- but without the motivation clearly explained. @[to_additive "A choice-free shortcut instance."] theorem OrderedCommGroup.to_contravariantClass_left_le (α : Type u) [OrderedCommGroup α] : ContravariantClass α α (· * ·) (· ≤ ·) where elim a b c bc := by simpa using mul_le_mul_left' bc a⁻¹ #align ordered_comm_group.to_contravariant_class_left_le OrderedCommGroup.to_contravariantClass_left_le #align ordered_add_comm_group.to_contravariant_class_left_le OrderedAddCommGroup.to_contravariantClass_left_le -- Porting note: this instance is not used, -- and causes timeouts after lean4#2210. -- See further explanation on `OrderedCommGroup.to_contravariantClass_left_le`. @[to_additive "A choice-free shortcut instance."] theorem OrderedCommGroup.to_contravariantClass_right_le (α : Type u) [OrderedCommGroup α] : ContravariantClass α α (swap (· * ·)) (· ≤ ·) where elim a b c bc := by simpa using mul_le_mul_right' bc a⁻¹ #align ordered_comm_group.to_contravariant_class_right_le OrderedCommGroup.to_contravariantClass_right_le #align ordered_add_comm_group.to_contravariant_class_right_le OrderedAddCommGroup.to_contravariantClass_right_le section Group variable [Group α] section TypeclassesLeftLT variable [LT α] [CovariantClass α α (· * ·) (· < ·)] {a b c : α} @[to_additive (attr := simp) Left.neg_pos_iff "Uses `left` co(ntra)variant."] theorem Left.one_lt_inv_iff : 1 < a⁻¹ ↔ a < 1 := by rw [← mul_lt_mul_iff_left a, mul_inv_self, mul_one] #align left.one_lt_inv_iff Left.one_lt_inv_iff #align left.neg_pos_iff Left.neg_pos_iff @[to_additive (attr := simp) "Uses `left` co(ntra)variant."] theorem Left.inv_lt_one_iff : a⁻¹ < 1 ↔ 1 < a := by rw [← mul_lt_mul_iff_left a, mul_inv_self, mul_one] #align left.inv_lt_one_iff Left.inv_lt_one_iff #align left.neg_neg_iff Left.neg_neg_iff @[to_additive (attr := simp)] theorem lt_inv_mul_iff_mul_lt : b < a⁻¹ * c ↔ a * b < c := by rw [← mul_lt_mul_iff_left a] simp #align lt_inv_mul_iff_mul_lt lt_inv_mul_iff_mul_lt #align lt_neg_add_iff_add_lt lt_neg_add_iff_add_lt @[to_additive (attr := simp)] theorem inv_mul_lt_iff_lt_mul : b⁻¹ * a < c ↔ a < b * c := by rw [← mul_lt_mul_iff_left b, mul_inv_cancel_left] #align inv_mul_lt_iff_lt_mul inv_mul_lt_iff_lt_mul #align neg_add_lt_iff_lt_add neg_add_lt_iff_lt_add @[to_additive] theorem inv_lt_iff_one_lt_mul' : a⁻¹ < b ↔ 1 < a * b := (mul_lt_mul_iff_left a).symm.trans <| by rw [mul_inv_self] #align inv_lt_iff_one_lt_mul' inv_lt_iff_one_lt_mul' #align neg_lt_iff_pos_add' neg_lt_iff_pos_add' @[to_additive] theorem lt_inv_iff_mul_lt_one' : a < b⁻¹ ↔ b * a < 1 := (mul_lt_mul_iff_left b).symm.trans <| by rw [mul_inv_self] #align lt_inv_iff_mul_lt_one' lt_inv_iff_mul_lt_one' #align lt_neg_iff_add_neg' lt_neg_iff_add_neg' @[to_additive]
Mathlib/Algebra/Order/Group/Defs.lean
196
197
theorem lt_inv_mul_iff_lt : 1 < b⁻¹ * a ↔ b < a := by
rw [← mul_lt_mul_iff_left b, mul_one, mul_inv_cancel_left]
[ " b ≤ c", " 1 < a⁻¹ ↔ a < 1", " a⁻¹ < 1 ↔ 1 < a", " b < a⁻¹ * c ↔ a * b < c", " a * b < a * (a⁻¹ * c) ↔ a * b < c", " b⁻¹ * a < c ↔ a < b * c", " a * a⁻¹ < a * b ↔ 1 < a * b", " b * a < b * b⁻¹ ↔ b * a < 1", " 1 < b⁻¹ * a ↔ b < a" ]
[ " b ≤ c", " 1 < a⁻¹ ↔ a < 1", " a⁻¹ < 1 ↔ 1 < a", " b < a⁻¹ * c ↔ a * b < c", " a * b < a * (a⁻¹ * c) ↔ a * b < c", " b⁻¹ * a < c ↔ a < b * c", " a * a⁻¹ < a * b ↔ 1 < a * b", " b * a < b * b⁻¹ ↔ b * a < 1" ]
import Mathlib.Data.Finset.Basic import Mathlib.ModelTheory.Syntax import Mathlib.Data.List.ProdSigma #align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" universe u v w u' v' namespace FirstOrder namespace Language variable {L : Language.{u, v}} {L' : Language} variable {M : Type w} {N P : Type*} [L.Structure M] [L.Structure N] [L.Structure P] variable {α : Type u'} {β : Type v'} {γ : Type*} open FirstOrder Cardinal open Structure Cardinal Fin namespace Term -- Porting note: universes in different order def realize (v : α → M) : ∀ _t : L.Term α, M | var k => v k | func f ts => funMap f fun i => (ts i).realize v #align first_order.language.term.realize FirstOrder.Language.Term.realize @[simp] theorem realize_var (v : α → M) (k) : realize v (var k : L.Term α) = v k := rfl @[simp] theorem realize_func (v : α → M) {n} (f : L.Functions n) (ts) : realize v (func f ts : L.Term α) = funMap f fun i => (ts i).realize v := rfl @[simp] theorem realize_relabel {t : L.Term α} {g : α → β} {v : β → M} : (t.relabel g).realize v = t.realize (v ∘ g) := by induction' t with _ n f ts ih · rfl · simp [ih] #align first_order.language.term.realize_relabel FirstOrder.Language.Term.realize_relabel @[simp] theorem realize_liftAt {n n' m : ℕ} {t : L.Term (Sum α (Fin n))} {v : Sum α (Fin (n + n')) → M} : (t.liftAt n' m).realize v = t.realize (v ∘ Sum.map id fun i : Fin _ => if ↑i < m then Fin.castAdd n' i else Fin.addNat i n') := realize_relabel #align first_order.language.term.realize_lift_at FirstOrder.Language.Term.realize_liftAt @[simp] theorem realize_constants {c : L.Constants} {v : α → M} : c.term.realize v = c := funMap_eq_coe_constants #align first_order.language.term.realize_constants FirstOrder.Language.Term.realize_constants @[simp]
Mathlib/ModelTheory/Semantics.lean
109
113
theorem realize_functions_apply₁ {f : L.Functions 1} {t : L.Term α} {v : α → M} : (f.apply₁ t).realize v = funMap f ![t.realize v] := by
rw [Functions.apply₁, Term.realize] refine congr rfl (funext fun i => ?_) simp only [Matrix.cons_val_fin_one]
[ " realize v (relabel g t) = realize (v ∘ g) t", " realize v (relabel g (var a✝)) = realize (v ∘ g) (var a✝)", " realize v (relabel g (func f ts)) = realize (v ∘ g) (func f ts)", " realize v (f.apply₁ t) = funMap f ![realize v t]", " (funMap f fun i => realize v (![t] i)) = funMap f ![realize v t]", " real...
[ " realize v (relabel g t) = realize (v ∘ g) t", " realize v (relabel g (var a✝)) = realize (v ∘ g) (var a✝)", " realize v (relabel g (func f ts)) = realize (v ∘ g) (func f ts)" ]
import Mathlib.Topology.Order.IsLUB open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) variable {α β γ : Type*} section ConditionallyCompleteLinearOrder variable [ConditionallyCompleteLinearOrder α] [TopologicalSpace α] [OrderTopology α] [ConditionallyCompleteLinearOrder β] [TopologicalSpace β] [OrderClosedTopology β] [Nonempty γ] theorem Monotone.map_sSup_of_continuousAt' {f : α → β} {A : Set α} (Cf : ContinuousAt f (sSup A)) (Mf : Monotone f) (A_nonemp : A.Nonempty) (A_bdd : BddAbove A := by bddDefault) : f (sSup A) = sSup (f '' A) := --This is a particular case of the more general `IsLUB.isLUB_of_tendsto` .symm <| ((isLUB_csSup A_nonemp A_bdd).isLUB_of_tendsto (Mf.monotoneOn _) A_nonemp <| Cf.mono_left inf_le_left).csSup_eq (A_nonemp.image f) #align monotone.map_Sup_of_continuous_at' Monotone.map_sSup_of_continuousAt' theorem Monotone.map_iSup_of_continuousAt' {ι : Sort*} [Nonempty ι] {f : α → β} {g : ι → α} (Cf : ContinuousAt f (iSup g)) (Mf : Monotone f) (bdd : BddAbove (range g) := by bddDefault) : f (⨆ i, g i) = ⨆ i, f (g i) := by rw [iSup, Monotone.map_sSup_of_continuousAt' Cf Mf (range_nonempty g) bdd, ← range_comp, iSup] rfl #align monotone.map_supr_of_continuous_at' Monotone.map_iSup_of_continuousAt' theorem Monotone.map_sInf_of_continuousAt' {f : α → β} {A : Set α} (Cf : ContinuousAt f (sInf A)) (Mf : Monotone f) (A_nonemp : A.Nonempty) (A_bdd : BddBelow A := by bddDefault) : f (sInf A) = sInf (f '' A) := Monotone.map_sSup_of_continuousAt' (α := αᵒᵈ) (β := βᵒᵈ) Cf Mf.dual A_nonemp A_bdd #align monotone.map_Inf_of_continuous_at' Monotone.map_sInf_of_continuousAt' theorem Monotone.map_iInf_of_continuousAt' {ι : Sort*} [Nonempty ι] {f : α → β} {g : ι → α} (Cf : ContinuousAt f (iInf g)) (Mf : Monotone f) (bdd : BddBelow (range g) := by bddDefault) : f (⨅ i, g i) = ⨅ i, f (g i) := by rw [iInf, Monotone.map_sInf_of_continuousAt' Cf Mf (range_nonempty g) bdd, ← range_comp, iInf] rfl #align monotone.map_infi_of_continuous_at' Monotone.map_iInf_of_continuousAt' theorem Antitone.map_sInf_of_continuousAt' {f : α → β} {A : Set α} (Cf : ContinuousAt f (sInf A)) (Af : Antitone f) (A_nonemp : A.Nonempty) (A_bdd : BddBelow A := by bddDefault) : f (sInf A) = sSup (f '' A) := Monotone.map_sInf_of_continuousAt' (β := βᵒᵈ) Cf Af.dual_right A_nonemp A_bdd #align antitone.map_Inf_of_continuous_at' Antitone.map_sInf_of_continuousAt'
Mathlib/Topology/Order/Monotone.lean
75
79
theorem Antitone.map_iInf_of_continuousAt' {ι : Sort*} [Nonempty ι] {f : α → β} {g : ι → α} (Cf : ContinuousAt f (iInf g)) (Af : Antitone f) (bdd : BddBelow (range g) := by
bddDefault) : f (⨅ i, g i) = ⨆ i, f (g i) := by rw [iInf, Antitone.map_sInf_of_continuousAt' Cf Af (range_nonempty g) bdd, ← range_comp, iSup] rfl
[ " f (⨆ i, g i) = ⨆ i, f (g i)", " sSup (range (f ∘ g)) = sSup (range fun i => f (g i))", " f (⨅ i, g i) = ⨅ i, f (g i)", " sInf (range (f ∘ g)) = sInf (range fun i => f (g i))", " f (⨅ i, g i) = ⨆ i, f (g i)" ]
[ " f (⨆ i, g i) = ⨆ i, f (g i)", " sSup (range (f ∘ g)) = sSup (range fun i => f (g i))", " f (⨅ i, g i) = ⨅ i, f (g i)", " sInf (range (f ∘ g)) = sInf (range fun i => f (g i))" ]
import Mathlib.Data.Multiset.FinsetOps import Mathlib.Data.Multiset.Fold #align_import data.multiset.lattice from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" namespace Multiset variable {α : Type*} section Inf -- can be defined with just `[Top α]` where some lemmas hold without requiring `[OrderTop α]` variable [SemilatticeInf α] [OrderTop α] def inf (s : Multiset α) : α := s.fold (· ⊓ ·) ⊤ #align multiset.inf Multiset.inf @[simp] theorem inf_coe (l : List α) : inf (l : Multiset α) = l.foldr (· ⊓ ·) ⊤ := rfl #align multiset.inf_coe Multiset.inf_coe @[simp] theorem inf_zero : (0 : Multiset α).inf = ⊤ := fold_zero _ _ #align multiset.inf_zero Multiset.inf_zero @[simp] theorem inf_cons (a : α) (s : Multiset α) : (a ::ₘ s).inf = a ⊓ s.inf := fold_cons_left _ _ _ _ #align multiset.inf_cons Multiset.inf_cons @[simp] theorem inf_singleton {a : α} : ({a} : Multiset α).inf = a := inf_top_eq _ #align multiset.inf_singleton Multiset.inf_singleton @[simp] theorem inf_add (s₁ s₂ : Multiset α) : (s₁ + s₂).inf = s₁.inf ⊓ s₂.inf := Eq.trans (by simp [inf]) (fold_add _ _ _ _ _) #align multiset.inf_add Multiset.inf_add @[simp] theorem le_inf {s : Multiset α} {a : α} : a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b := Multiset.induction_on s (by simp) (by simp (config := { contextual := true }) [or_imp, forall_and]) #align multiset.le_inf Multiset.le_inf theorem inf_le {s : Multiset α} {a : α} (h : a ∈ s) : s.inf ≤ a := le_inf.1 le_rfl _ h #align multiset.inf_le Multiset.inf_le theorem inf_mono {s₁ s₂ : Multiset α} (h : s₁ ⊆ s₂) : s₂.inf ≤ s₁.inf := le_inf.2 fun _ hb => inf_le (h hb) #align multiset.inf_mono Multiset.inf_mono variable [DecidableEq α] @[simp] theorem inf_dedup (s : Multiset α) : (dedup s).inf = s.inf := fold_dedup_idem _ _ _ #align multiset.inf_dedup Multiset.inf_dedup @[simp] theorem inf_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).inf = s₁.inf ⊓ s₂.inf := by rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_add]; simp #align multiset.inf_ndunion Multiset.inf_ndunion @[simp] theorem inf_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).inf = s₁.inf ⊓ s₂.inf := by rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_add]; simp #align multiset.inf_union Multiset.inf_union @[simp]
Mathlib/Data/Multiset/Lattice.lean
173
174
theorem inf_ndinsert (a : α) (s : Multiset α) : (ndinsert a s).inf = a ⊓ s.inf := by
rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_cons]; simp
[ " (s₁ + s₂).inf = fold (fun x x_1 => x ⊓ x_1) (⊤ ⊓ ⊤) (s₁ + s₂)", " a ≤ inf 0 ↔ ∀ b ∈ 0, a ≤ b", " ∀ (a_1 : α) (s : Multiset α), (a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b) → (a ≤ (a_1 ::ₘ s).inf ↔ ∀ b ∈ a_1 ::ₘ s, a ≤ b)", " (s₁.ndunion s₂).inf = s₁.inf ⊓ s₂.inf", " ∀ (a : α), a ∈ s₁.ndunion s₂ ↔ a ∈ s₁ + s₂", " (s₁ ∪ ...
[ " (s₁ + s₂).inf = fold (fun x x_1 => x ⊓ x_1) (⊤ ⊓ ⊤) (s₁ + s₂)", " a ≤ inf 0 ↔ ∀ b ∈ 0, a ≤ b", " ∀ (a_1 : α) (s : Multiset α), (a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b) → (a ≤ (a_1 ::ₘ s).inf ↔ ∀ b ∈ a_1 ::ₘ s, a ≤ b)", " (s₁.ndunion s₂).inf = s₁.inf ⊓ s₂.inf", " ∀ (a : α), a ∈ s₁.ndunion s₂ ↔ a ∈ s₁ + s₂", " (s₁ ∪ ...
import Mathlib.Tactic.NormNum import Mathlib.Tactic.TryThis import Mathlib.Util.AtomM set_option autoImplicit true namespace Mathlib.Tactic.Abel open Lean Elab Meta Tactic Qq initialize registerTraceClass `abel initialize registerTraceClass `abel.detail structure Context where α : Expr univ : Level α0 : Expr isGroup : Bool inst : Expr def mkContext (e : Expr) : MetaM Context := do let α ← inferType e let c ← synthInstance (← mkAppM ``AddCommMonoid #[α]) let cg ← synthInstance? (← mkAppM ``AddCommGroup #[α]) let u ← mkFreshLevelMVar _ ← isDefEq (.sort (.succ u)) (← inferType α) let α0 ← Expr.ofNat α 0 match cg with | some cg => return ⟨α, u, α0, true, cg⟩ | _ => return ⟨α, u, α0, false, c⟩ abbrev M := ReaderT Context AtomM def Context.app (c : Context) (n : Name) (inst : Expr) : Array Expr → Expr := mkAppN (((@Expr.const n [c.univ]).app c.α).app inst) def Context.mkApp (c : Context) (n inst : Name) (l : Array Expr) : MetaM Expr := do return c.app n (← synthInstance ((Expr.const inst [c.univ]).app c.α)) l def addG : Name → Name | .str p s => .str p (s ++ "g") | n => n def iapp (n : Name) (xs : Array Expr) : M Expr := do let c ← read return c.app (if c.isGroup then addG n else n) c.inst xs def term {α} [AddCommMonoid α] (n : ℕ) (x a : α) : α := n • x + a def termg {α} [AddCommGroup α] (n : ℤ) (x a : α) : α := n • x + a def mkTerm (n x a : Expr) : M Expr := iapp ``term #[n, x, a] def intToExpr (n : ℤ) : M Expr := do Expr.ofInt (mkConst (if (← read).isGroup then ``Int else ``Nat) []) n inductive NormalExpr : Type | zero (e : Expr) : NormalExpr | nterm (e : Expr) (n : Expr × ℤ) (x : ℕ × Expr) (a : NormalExpr) : NormalExpr deriving Inhabited def NormalExpr.e : NormalExpr → Expr | .zero e => e | .nterm e .. => e instance : Coe NormalExpr Expr where coe := NormalExpr.e def NormalExpr.term' (n : Expr × ℤ) (x : ℕ × Expr) (a : NormalExpr) : M NormalExpr := return .nterm (← mkTerm n.1 x.2 a) n x a def NormalExpr.zero' : M NormalExpr := return NormalExpr.zero (← read).α0 open NormalExpr theorem const_add_term {α} [AddCommMonoid α] (k n x a a') (h : k + a = a') : k + @term α _ n x a = term n x a' := by simp [h.symm, term, add_comm, add_assoc] theorem const_add_termg {α} [AddCommGroup α] (k n x a a') (h : k + a = a') : k + @termg α _ n x a = termg n x a' := by simp [h.symm, termg, add_comm, add_assoc] theorem term_add_const {α} [AddCommMonoid α] (n x a k a') (h : a + k = a') : @term α _ n x a + k = term n x a' := by simp [h.symm, term, add_assoc] theorem term_add_constg {α} [AddCommGroup α] (n x a k a') (h : a + k = a') : @termg α _ n x a + k = termg n x a' := by simp [h.symm, termg, add_assoc] theorem term_add_term {α} [AddCommMonoid α] (n₁ x a₁ n₂ a₂ n' a') (h₁ : n₁ + n₂ = n') (h₂ : a₁ + a₂ = a') : @term α _ n₁ x a₁ + @term α _ n₂ x a₂ = term n' x a' := by simp [h₁.symm, h₂.symm, term, add_nsmul, add_assoc, add_left_comm] theorem term_add_termg {α} [AddCommGroup α] (n₁ x a₁ n₂ a₂ n' a') (h₁ : n₁ + n₂ = n') (h₂ : a₁ + a₂ = a') : @termg α _ n₁ x a₁ + @termg α _ n₂ x a₂ = termg n' x a' := by simp only [termg, h₁.symm, add_zsmul, h₂.symm] exact add_add_add_comm (n₁ • x) a₁ (n₂ • x) a₂
Mathlib/Tactic/Abel.lean
154
155
theorem zero_term {α} [AddCommMonoid α] (x a) : @term α _ 0 x a = a := by
simp [term, zero_nsmul, one_nsmul]
[ " k + term n x a = term n x a'", " k + termg n x a = termg n x a'", " term n x a + k = term n x a'", " termg n x a + k = termg n x a'", " term n₁ x a₁ + term n₂ x a₂ = term n' x a'", " termg n₁ x a₁ + termg n₂ x a₂ = termg n' x a'", " n₁ • x + a₁ + (n₂ • x + a₂) = n₁ • x + n₂ • x + (a₁ + a₂)", " term ...
[ " k + term n x a = term n x a'", " k + termg n x a = termg n x a'", " term n x a + k = term n x a'", " termg n x a + k = termg n x a'", " term n₁ x a₁ + term n₂ x a₂ = term n' x a'", " termg n₁ x a₁ + termg n₂ x a₂ = termg n' x a'", " n₁ • x + a₁ + (n₂ • x + a₂) = n₁ • x + n₂ • x + (a₁ + a₂)" ]
import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Fintype.BigOperators import Mathlib.LinearAlgebra.AffineSpace.AffineMap import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace import Mathlib.LinearAlgebra.Finsupp import Mathlib.Tactic.FinCases #align_import linear_algebra.affine_space.combination from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0" noncomputable section open Affine namespace Finset theorem univ_fin2 : (univ : Finset (Fin 2)) = {0, 1} := by ext x fin_cases x <;> simp #align finset.univ_fin2 Finset.univ_fin2 variable {k : Type*} {V : Type*} {P : Type*} [Ring k] [AddCommGroup V] [Module k V] variable [S : AffineSpace V P] variable {ι : Type*} (s : Finset ι) variable {ι₂ : Type*} (s₂ : Finset ι₂) def weightedVSubOfPoint (p : ι → P) (b : P) : (ι → k) →ₗ[k] V := ∑ i ∈ s, (LinearMap.proj i : (ι → k) →ₗ[k] k).smulRight (p i -ᵥ b) #align finset.weighted_vsub_of_point Finset.weightedVSubOfPoint @[simp] theorem weightedVSubOfPoint_apply (w : ι → k) (p : ι → P) (b : P) : s.weightedVSubOfPoint p b w = ∑ i ∈ s, w i • (p i -ᵥ b) := by simp [weightedVSubOfPoint, LinearMap.sum_apply] #align finset.weighted_vsub_of_point_apply Finset.weightedVSubOfPoint_apply @[simp (high)] theorem weightedVSubOfPoint_apply_const (w : ι → k) (p : P) (b : P) : s.weightedVSubOfPoint (fun _ => p) b w = (∑ i ∈ s, w i) • (p -ᵥ b) := by rw [weightedVSubOfPoint_apply, sum_smul] #align finset.weighted_vsub_of_point_apply_const Finset.weightedVSubOfPoint_apply_const theorem weightedVSubOfPoint_congr {w₁ w₂ : ι → k} (hw : ∀ i ∈ s, w₁ i = w₂ i) {p₁ p₂ : ι → P} (hp : ∀ i ∈ s, p₁ i = p₂ i) (b : P) : s.weightedVSubOfPoint p₁ b w₁ = s.weightedVSubOfPoint p₂ b w₂ := by simp_rw [weightedVSubOfPoint_apply] refine sum_congr rfl fun i hi => ?_ rw [hw i hi, hp i hi] #align finset.weighted_vsub_of_point_congr Finset.weightedVSubOfPoint_congr theorem weightedVSubOfPoint_eq_of_weights_eq (p : ι → P) (j : ι) (w₁ w₂ : ι → k) (hw : ∀ i, i ≠ j → w₁ i = w₂ i) : s.weightedVSubOfPoint p (p j) w₁ = s.weightedVSubOfPoint p (p j) w₂ := by simp only [Finset.weightedVSubOfPoint_apply] congr ext i rcases eq_or_ne i j with h | h · simp [h] · simp [hw i h] #align finset.weighted_vsub_of_point_eq_of_weights_eq Finset.weightedVSubOfPoint_eq_of_weights_eq theorem weightedVSubOfPoint_eq_of_sum_eq_zero (w : ι → k) (p : ι → P) (h : ∑ i ∈ s, w i = 0) (b₁ b₂ : P) : s.weightedVSubOfPoint p b₁ w = s.weightedVSubOfPoint p b₂ w := by apply eq_of_sub_eq_zero rw [weightedVSubOfPoint_apply, weightedVSubOfPoint_apply, ← sum_sub_distrib] conv_lhs => congr · skip · ext rw [← smul_sub, vsub_sub_vsub_cancel_left] rw [← sum_smul, h, zero_smul] #align finset.weighted_vsub_of_point_eq_of_sum_eq_zero Finset.weightedVSubOfPoint_eq_of_sum_eq_zero theorem weightedVSubOfPoint_vadd_eq_of_sum_eq_one (w : ι → k) (p : ι → P) (h : ∑ i ∈ s, w i = 1) (b₁ b₂ : P) : s.weightedVSubOfPoint p b₁ w +ᵥ b₁ = s.weightedVSubOfPoint p b₂ w +ᵥ b₂ := by erw [weightedVSubOfPoint_apply, weightedVSubOfPoint_apply, ← @vsub_eq_zero_iff_eq V, vadd_vsub_assoc, vsub_vadd_eq_vsub_sub, ← add_sub_assoc, add_comm, add_sub_assoc, ← sum_sub_distrib] conv_lhs => congr · skip · congr · skip · ext rw [← smul_sub, vsub_sub_vsub_cancel_left] rw [← sum_smul, h, one_smul, vsub_add_vsub_cancel, vsub_self] #align finset.weighted_vsub_of_point_vadd_eq_of_sum_eq_one Finset.weightedVSubOfPoint_vadd_eq_of_sum_eq_one @[simp (high)]
Mathlib/LinearAlgebra/AffineSpace/Combination.lean
141
145
theorem weightedVSubOfPoint_erase [DecidableEq ι] (w : ι → k) (p : ι → P) (i : ι) : (s.erase i).weightedVSubOfPoint p (p i) w = s.weightedVSubOfPoint p (p i) w := by
rw [weightedVSubOfPoint_apply, weightedVSubOfPoint_apply] apply sum_erase rw [vsub_self, smul_zero]
[ " univ = {0, 1}", " x ∈ univ ↔ x ∈ {0, 1}", " ⟨0, ⋯⟩ ∈ univ ↔ ⟨0, ⋯⟩ ∈ {0, 1}", " ⟨1, ⋯⟩ ∈ univ ↔ ⟨1, ⋯⟩ ∈ {0, 1}", " (s.weightedVSubOfPoint p b) w = ∑ i ∈ s, w i • (p i -ᵥ b)", " (s.weightedVSubOfPoint (fun x => p) b) w = (∑ i ∈ s, w i) • (p -ᵥ b)", " (s.weightedVSubOfPoint p₁ b) w₁ = (s.weightedVSubOf...
[ " univ = {0, 1}", " x ∈ univ ↔ x ∈ {0, 1}", " ⟨0, ⋯⟩ ∈ univ ↔ ⟨0, ⋯⟩ ∈ {0, 1}", " ⟨1, ⋯⟩ ∈ univ ↔ ⟨1, ⋯⟩ ∈ {0, 1}", " (s.weightedVSubOfPoint p b) w = ∑ i ∈ s, w i • (p i -ᵥ b)", " (s.weightedVSubOfPoint (fun x => p) b) w = (∑ i ∈ s, w i) • (p -ᵥ b)", " (s.weightedVSubOfPoint p₁ b) w₁ = (s.weightedVSubOf...
import Mathlib.Analysis.SpecialFunctions.Pow.Real #align_import analysis.special_functions.pow.nnreal from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" noncomputable section open scoped Classical open Real NNReal ENNReal ComplexConjugate open Finset Function Set namespace NNReal variable {w x y z : ℝ} noncomputable def rpow (x : ℝ≥0) (y : ℝ) : ℝ≥0 := ⟨(x : ℝ) ^ y, Real.rpow_nonneg x.2 y⟩ #align nnreal.rpow NNReal.rpow noncomputable instance : Pow ℝ≥0 ℝ := ⟨rpow⟩ @[simp] theorem rpow_eq_pow (x : ℝ≥0) (y : ℝ) : rpow x y = x ^ y := rfl #align nnreal.rpow_eq_pow NNReal.rpow_eq_pow @[simp, norm_cast] theorem coe_rpow (x : ℝ≥0) (y : ℝ) : ((x ^ y : ℝ≥0) : ℝ) = (x : ℝ) ^ y := rfl #align nnreal.coe_rpow NNReal.coe_rpow @[simp] theorem rpow_zero (x : ℝ≥0) : x ^ (0 : ℝ) = 1 := NNReal.eq <| Real.rpow_zero _ #align nnreal.rpow_zero NNReal.rpow_zero @[simp] theorem rpow_eq_zero_iff {x : ℝ≥0} {y : ℝ} : x ^ y = 0 ↔ x = 0 ∧ y ≠ 0 := by rw [← NNReal.coe_inj, coe_rpow, ← NNReal.coe_eq_zero] exact Real.rpow_eq_zero_iff_of_nonneg x.2 #align nnreal.rpow_eq_zero_iff NNReal.rpow_eq_zero_iff @[simp] theorem zero_rpow {x : ℝ} (h : x ≠ 0) : (0 : ℝ≥0) ^ x = 0 := NNReal.eq <| Real.zero_rpow h #align nnreal.zero_rpow NNReal.zero_rpow @[simp] theorem rpow_one (x : ℝ≥0) : x ^ (1 : ℝ) = x := NNReal.eq <| Real.rpow_one _ #align nnreal.rpow_one NNReal.rpow_one @[simp] theorem one_rpow (x : ℝ) : (1 : ℝ≥0) ^ x = 1 := NNReal.eq <| Real.one_rpow _ #align nnreal.one_rpow NNReal.one_rpow theorem rpow_add {x : ℝ≥0} (hx : x ≠ 0) (y z : ℝ) : x ^ (y + z) = x ^ y * x ^ z := NNReal.eq <| Real.rpow_add (pos_iff_ne_zero.2 hx) _ _ #align nnreal.rpow_add NNReal.rpow_add theorem rpow_add' (x : ℝ≥0) {y z : ℝ} (h : y + z ≠ 0) : x ^ (y + z) = x ^ y * x ^ z := NNReal.eq <| Real.rpow_add' x.2 h #align nnreal.rpow_add' NNReal.rpow_add' lemma rpow_of_add_eq (x : ℝ≥0) (hw : w ≠ 0) (h : y + z = w) : x ^ w = x ^ y * x ^ z := by rw [← h, rpow_add']; rwa [h] theorem rpow_mul (x : ℝ≥0) (y z : ℝ) : x ^ (y * z) = (x ^ y) ^ z := NNReal.eq <| Real.rpow_mul x.2 y z #align nnreal.rpow_mul NNReal.rpow_mul theorem rpow_neg (x : ℝ≥0) (y : ℝ) : x ^ (-y) = (x ^ y)⁻¹ := NNReal.eq <| Real.rpow_neg x.2 _ #align nnreal.rpow_neg NNReal.rpow_neg theorem rpow_neg_one (x : ℝ≥0) : x ^ (-1 : ℝ) = x⁻¹ := by simp [rpow_neg] #align nnreal.rpow_neg_one NNReal.rpow_neg_one theorem rpow_sub {x : ℝ≥0} (hx : x ≠ 0) (y z : ℝ) : x ^ (y - z) = x ^ y / x ^ z := NNReal.eq <| Real.rpow_sub (pos_iff_ne_zero.2 hx) y z #align nnreal.rpow_sub NNReal.rpow_sub theorem rpow_sub' (x : ℝ≥0) {y z : ℝ} (h : y - z ≠ 0) : x ^ (y - z) = x ^ y / x ^ z := NNReal.eq <| Real.rpow_sub' x.2 h #align nnreal.rpow_sub' NNReal.rpow_sub' theorem rpow_inv_rpow_self {y : ℝ} (hy : y ≠ 0) (x : ℝ≥0) : (x ^ y) ^ (1 / y) = x := by field_simp [← rpow_mul] #align nnreal.rpow_inv_rpow_self NNReal.rpow_inv_rpow_self theorem rpow_self_rpow_inv {y : ℝ} (hy : y ≠ 0) (x : ℝ≥0) : (x ^ (1 / y)) ^ y = x := by field_simp [← rpow_mul] #align nnreal.rpow_self_rpow_inv NNReal.rpow_self_rpow_inv theorem inv_rpow (x : ℝ≥0) (y : ℝ) : x⁻¹ ^ y = (x ^ y)⁻¹ := NNReal.eq <| Real.inv_rpow x.2 y #align nnreal.inv_rpow NNReal.inv_rpow theorem div_rpow (x y : ℝ≥0) (z : ℝ) : (x / y) ^ z = x ^ z / y ^ z := NNReal.eq <| Real.div_rpow x.2 y.2 z #align nnreal.div_rpow NNReal.div_rpow
Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
124
127
theorem sqrt_eq_rpow (x : ℝ≥0) : sqrt x = x ^ (1 / (2 : ℝ)) := by
refine NNReal.eq ?_ push_cast exact Real.sqrt_eq_rpow x.1
[ " x ^ y = 0 ↔ x = 0 ∧ y ≠ 0", " ↑x ^ y = ↑0 ↔ ↑x = 0 ∧ y ≠ 0", " x ^ w = x ^ y * x ^ z", " y + z ≠ 0", " x ^ (-1) = x⁻¹", " (x ^ y) ^ (1 / y) = x", " (x ^ (1 / y)) ^ y = x", " sqrt x = x ^ (1 / 2)", " ↑(sqrt x) = ↑(x ^ (1 / 2))", " √↑x = ↑x ^ (1 / 2)" ]
[ " x ^ y = 0 ↔ x = 0 ∧ y ≠ 0", " ↑x ^ y = ↑0 ↔ ↑x = 0 ∧ y ≠ 0", " x ^ w = x ^ y * x ^ z", " y + z ≠ 0", " x ^ (-1) = x⁻¹", " (x ^ y) ^ (1 / y) = x", " (x ^ (1 / y)) ^ y = x" ]
import Mathlib.Analysis.Complex.UpperHalfPlane.Topology import Mathlib.Analysis.SpecialFunctions.Arsinh import Mathlib.Geometry.Euclidean.Inversion.Basic #align_import analysis.complex.upper_half_plane.metric from "leanprover-community/mathlib"@"caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c" noncomputable section open scoped UpperHalfPlane ComplexConjugate NNReal Topology MatrixGroups open Set Metric Filter Real variable {z w : ℍ} {r R : ℝ} namespace UpperHalfPlane instance : Dist ℍ := ⟨fun z w => 2 * arsinh (dist (z : ℂ) w / (2 * √(z.im * w.im)))⟩ theorem dist_eq (z w : ℍ) : dist z w = 2 * arsinh (dist (z : ℂ) w / (2 * √(z.im * w.im))) := rfl #align upper_half_plane.dist_eq UpperHalfPlane.dist_eq theorem sinh_half_dist (z w : ℍ) : sinh (dist z w / 2) = dist (z : ℂ) w / (2 * √(z.im * w.im)) := by rw [dist_eq, mul_div_cancel_left₀ (arsinh _) two_ne_zero, sinh_arsinh] #align upper_half_plane.sinh_half_dist UpperHalfPlane.sinh_half_dist theorem cosh_half_dist (z w : ℍ) : cosh (dist z w / 2) = dist (z : ℂ) (conj (w : ℂ)) / (2 * √(z.im * w.im)) := by rw [← sq_eq_sq, cosh_sq', sinh_half_dist, div_pow, div_pow, one_add_div, mul_pow, sq_sqrt] · congr 1 simp only [Complex.dist_eq, Complex.sq_abs, Complex.normSq_sub, Complex.normSq_conj, Complex.conj_conj, Complex.mul_re, Complex.conj_re, Complex.conj_im, coe_im] ring all_goals positivity #align upper_half_plane.cosh_half_dist UpperHalfPlane.cosh_half_dist theorem tanh_half_dist (z w : ℍ) : tanh (dist z w / 2) = dist (z : ℂ) w / dist (z : ℂ) (conj ↑w) := by rw [tanh_eq_sinh_div_cosh, sinh_half_dist, cosh_half_dist, div_div_div_comm, div_self, div_one] positivity #align upper_half_plane.tanh_half_dist UpperHalfPlane.tanh_half_dist theorem exp_half_dist (z w : ℍ) : exp (dist z w / 2) = (dist (z : ℂ) w + dist (z : ℂ) (conj ↑w)) / (2 * √(z.im * w.im)) := by rw [← sinh_add_cosh, sinh_half_dist, cosh_half_dist, add_div] #align upper_half_plane.exp_half_dist UpperHalfPlane.exp_half_dist theorem cosh_dist (z w : ℍ) : cosh (dist z w) = 1 + dist (z : ℂ) w ^ 2 / (2 * z.im * w.im) := by rw [dist_eq, cosh_two_mul, cosh_sq', add_assoc, ← two_mul, sinh_arsinh, div_pow, mul_pow, sq_sqrt, sq (2 : ℝ), mul_assoc, ← mul_div_assoc, mul_assoc, mul_div_mul_left] <;> positivity #align upper_half_plane.cosh_dist UpperHalfPlane.cosh_dist theorem sinh_half_dist_add_dist (a b c : ℍ) : sinh ((dist a b + dist b c) / 2) = (dist (a : ℂ) b * dist (c : ℂ) (conj ↑b) + dist (b : ℂ) c * dist (a : ℂ) (conj ↑b)) / (2 * √(a.im * c.im) * dist (b : ℂ) (conj ↑b)) := by simp only [add_div _ _ (2 : ℝ), sinh_add, sinh_half_dist, cosh_half_dist, div_mul_div_comm] rw [← add_div, Complex.dist_self_conj, coe_im, abs_of_pos b.im_pos, mul_comm (dist (b : ℂ) _), dist_comm (b : ℂ), Complex.dist_conj_comm, mul_mul_mul_comm, mul_mul_mul_comm _ _ _ b.im] congr 2 rw [sqrt_mul, sqrt_mul, sqrt_mul, mul_comm (√a.im), mul_mul_mul_comm, mul_self_sqrt, mul_comm] <;> exact (im_pos _).le #align upper_half_plane.sinh_half_dist_add_dist UpperHalfPlane.sinh_half_dist_add_dist protected theorem dist_comm (z w : ℍ) : dist z w = dist w z := by simp only [dist_eq, dist_comm (z : ℂ), mul_comm] #align upper_half_plane.dist_comm UpperHalfPlane.dist_comm theorem dist_le_iff_le_sinh : dist z w ≤ r ↔ dist (z : ℂ) w / (2 * √(z.im * w.im)) ≤ sinh (r / 2) := by rw [← div_le_div_right (zero_lt_two' ℝ), ← sinh_le_sinh, sinh_half_dist] #align upper_half_plane.dist_le_iff_le_sinh UpperHalfPlane.dist_le_iff_le_sinh
Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean
96
98
theorem dist_eq_iff_eq_sinh : dist z w = r ↔ dist (z : ℂ) w / (2 * √(z.im * w.im)) = sinh (r / 2) := by
rw [← div_left_inj' (two_ne_zero' ℝ), ← sinh_inj, sinh_half_dist]
[ " (dist z w / 2).sinh = dist ↑z ↑w / (2 * √(z.im * w.im))", " (dist z w / 2).cosh = dist (↑z) ((starRingEnd ℂ) ↑w) / (2 * √(z.im * w.im))", " (2 ^ 2 * (z.im * w.im) + dist ↑z ↑w ^ 2) / (2 ^ 2 * (z.im * w.im)) =\n dist (↑z) ((starRingEnd ℂ) ↑w) ^ 2 / (2 ^ 2 * (z.im * w.im))", " 2 ^ 2 * (z.im * w.im) + dist ...
[ " (dist z w / 2).sinh = dist ↑z ↑w / (2 * √(z.im * w.im))", " (dist z w / 2).cosh = dist (↑z) ((starRingEnd ℂ) ↑w) / (2 * √(z.im * w.im))", " (2 ^ 2 * (z.im * w.im) + dist ↑z ↑w ^ 2) / (2 ^ 2 * (z.im * w.im)) =\n dist (↑z) ((starRingEnd ℂ) ↑w) ^ 2 / (2 ^ 2 * (z.im * w.im))", " 2 ^ 2 * (z.im * w.im) + dist ...
import Mathlib.Analysis.Normed.Field.Basic #align_import topology.metric_space.cau_seq_filter from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" universe u v open Set Filter open scoped Classical open Topology variable {β : Type v} theorem CauSeq.tendsto_limit [NormedRing β] [hn : IsAbsoluteValue (norm : β → ℝ)] (f : CauSeq β norm) [CauSeq.IsComplete β norm] : Tendsto f atTop (𝓝 f.lim) := tendsto_nhds.mpr (by intro s os lfs suffices ∃ a : ℕ, ∀ b : ℕ, b ≥ a → f b ∈ s by simpa using this rcases Metric.isOpen_iff.1 os _ lfs with ⟨ε, ⟨hε, hεs⟩⟩ cases' Setoid.symm (CauSeq.equiv_lim f) _ hε with N hN exists N intro b hb apply hεs dsimp [Metric.ball] rw [dist_comm, dist_eq_norm] solve_by_elim) #align cau_seq.tendsto_limit CauSeq.tendsto_limit variable [NormedField β] open Metric
Mathlib/Topology/MetricSpace/CauSeqFilter.lean
55
64
theorem CauchySeq.isCauSeq {f : ℕ → β} (hf : CauchySeq f) : IsCauSeq norm f := by
cases' cauchy_iff.1 hf with hf1 hf2 intro ε hε rcases hf2 { x | dist x.1 x.2 < ε } (dist_mem_uniformity hε) with ⟨t, ⟨ht, htsub⟩⟩ simp only [mem_map, mem_atTop_sets, ge_iff_le, mem_preimage] at ht; cases' ht with N hN exists N intro j hj rw [← dist_eq_norm] apply @htsub (f j, f N) apply Set.mk_mem_prod <;> solve_by_elim [le_refl]
[ " ∀ (s : Set β), IsOpen s → f.lim ∈ s → ↑f ⁻¹' s ∈ atTop", " ↑f ⁻¹' s ∈ atTop", " ∃ a, ∀ b ≥ a, ↑f b ∈ s", " ∀ b ≥ N, ↑f b ∈ s", " ↑f b ∈ s", " ↑f b ∈ Metric.ball f.lim ε", " dist (↑f b) f.lim < ε", " ‖f.lim - ↑f b‖ < ε", " IsCauSeq norm f", " ∃ i, ∀ j ≥ i, ‖f j - f i‖ < ε", " ∀ j ≥ N, ‖f j - f ...
[ " ∀ (s : Set β), IsOpen s → f.lim ∈ s → ↑f ⁻¹' s ∈ atTop", " ↑f ⁻¹' s ∈ atTop", " ∃ a, ∀ b ≥ a, ↑f b ∈ s", " ∀ b ≥ N, ↑f b ∈ s", " ↑f b ∈ s", " ↑f b ∈ Metric.ball f.lim ε", " dist (↑f b) f.lim < ε", " ‖f.lim - ↑f b‖ < ε" ]
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.CPolynomial import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.fderiv_analytic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Filter Asymptotics open scoped ENNReal universe u v variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] variable {E : Type u} [NormedAddCommGroup E] [NormedSpace 𝕜 E] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace 𝕜 F] section fderiv variable {p : FormalMultilinearSeries 𝕜 E F} {r : ℝ≥0∞} variable {f : E → F} {x : E} {s : Set E} theorem HasFPowerSeriesAt.hasStrictFDerivAt (h : HasFPowerSeriesAt f p x) : HasStrictFDerivAt f (continuousMultilinearCurryFin1 𝕜 E F (p 1)) x := by refine h.isBigO_image_sub_norm_mul_norm_sub.trans_isLittleO (IsLittleO.of_norm_right ?_) refine isLittleO_iff_exists_eq_mul.2 ⟨fun y => ‖y - (x, x)‖, ?_, EventuallyEq.rfl⟩ refine (continuous_id.sub continuous_const).norm.tendsto' _ _ ?_ rw [_root_.id, sub_self, norm_zero] #align has_fpower_series_at.has_strict_fderiv_at HasFPowerSeriesAt.hasStrictFDerivAt theorem HasFPowerSeriesAt.hasFDerivAt (h : HasFPowerSeriesAt f p x) : HasFDerivAt f (continuousMultilinearCurryFin1 𝕜 E F (p 1)) x := h.hasStrictFDerivAt.hasFDerivAt #align has_fpower_series_at.has_fderiv_at HasFPowerSeriesAt.hasFDerivAt theorem HasFPowerSeriesAt.differentiableAt (h : HasFPowerSeriesAt f p x) : DifferentiableAt 𝕜 f x := h.hasFDerivAt.differentiableAt #align has_fpower_series_at.differentiable_at HasFPowerSeriesAt.differentiableAt theorem AnalyticAt.differentiableAt : AnalyticAt 𝕜 f x → DifferentiableAt 𝕜 f x | ⟨_, hp⟩ => hp.differentiableAt #align analytic_at.differentiable_at AnalyticAt.differentiableAt theorem AnalyticAt.differentiableWithinAt (h : AnalyticAt 𝕜 f x) : DifferentiableWithinAt 𝕜 f s x := h.differentiableAt.differentiableWithinAt #align analytic_at.differentiable_within_at AnalyticAt.differentiableWithinAt theorem HasFPowerSeriesAt.fderiv_eq (h : HasFPowerSeriesAt f p x) : fderiv 𝕜 f x = continuousMultilinearCurryFin1 𝕜 E F (p 1) := h.hasFDerivAt.fderiv #align has_fpower_series_at.fderiv_eq HasFPowerSeriesAt.fderiv_eq theorem HasFPowerSeriesOnBall.differentiableOn [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) : DifferentiableOn 𝕜 f (EMetric.ball x r) := fun _ hy => (h.analyticAt_of_mem hy).differentiableWithinAt #align has_fpower_series_on_ball.differentiable_on HasFPowerSeriesOnBall.differentiableOn theorem AnalyticOn.differentiableOn (h : AnalyticOn 𝕜 f s) : DifferentiableOn 𝕜 f s := fun y hy => (h y hy).differentiableWithinAt #align analytic_on.differentiable_on AnalyticOn.differentiableOn theorem HasFPowerSeriesOnBall.hasFDerivAt [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) {y : E} (hy : (‖y‖₊ : ℝ≥0∞) < r) : HasFDerivAt f (continuousMultilinearCurryFin1 𝕜 E F (p.changeOrigin y 1)) (x + y) := (h.changeOrigin hy).hasFPowerSeriesAt.hasFDerivAt #align has_fpower_series_on_ball.has_fderiv_at HasFPowerSeriesOnBall.hasFDerivAt theorem HasFPowerSeriesOnBall.fderiv_eq [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) {y : E} (hy : (‖y‖₊ : ℝ≥0∞) < r) : fderiv 𝕜 f (x + y) = continuousMultilinearCurryFin1 𝕜 E F (p.changeOrigin y 1) := (h.hasFDerivAt hy).fderiv #align has_fpower_series_on_ball.fderiv_eq HasFPowerSeriesOnBall.fderiv_eq theorem HasFPowerSeriesOnBall.fderiv [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) : HasFPowerSeriesOnBall (fderiv 𝕜 f) p.derivSeries x r := by refine .congr (f := fun z ↦ continuousMultilinearCurryFin1 𝕜 E F (p.changeOrigin (z - x) 1)) ?_ fun z hz ↦ ?_ · refine continuousMultilinearCurryFin1 𝕜 E F |>.toContinuousLinearEquiv.toContinuousLinearMap.comp_hasFPowerSeriesOnBall ?_ simpa using ((p.hasFPowerSeriesOnBall_changeOrigin 1 (h.r_pos.trans_le h.r_le)).mono h.r_pos h.r_le).comp_sub x dsimp only rw [← h.fderiv_eq, add_sub_cancel] simpa only [edist_eq_coe_nnnorm_sub, EMetric.mem_ball] using hz #align has_fpower_series_on_ball.fderiv HasFPowerSeriesOnBall.fderiv theorem AnalyticOn.fderiv [CompleteSpace F] (h : AnalyticOn 𝕜 f s) : AnalyticOn 𝕜 (fderiv 𝕜 f) s := by intro y hy rcases h y hy with ⟨p, r, hp⟩ exact hp.fderiv.analyticAt #align analytic_on.fderiv AnalyticOn.fderiv
Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
113
122
theorem AnalyticOn.iteratedFDeriv [CompleteSpace F] (h : AnalyticOn 𝕜 f s) (n : ℕ) : AnalyticOn 𝕜 (iteratedFDeriv 𝕜 n f) s := by
induction' n with n IH · rw [iteratedFDeriv_zero_eq_comp] exact ((continuousMultilinearCurryFin0 𝕜 E F).symm : F →L[𝕜] E[×0]→L[𝕜] F).comp_analyticOn h · rw [iteratedFDeriv_succ_eq_comp_left] -- Porting note: for reasons that I do not understand at all, `?g` cannot be inlined. convert ContinuousLinearMap.comp_analyticOn ?g IH.fderiv case g => exact ↑(continuousMultilinearCurryLeftEquiv 𝕜 (fun _ : Fin (n + 1) ↦ E) F) simp
[ " HasStrictFDerivAt f ((continuousMultilinearCurryFin1 𝕜 E F) (p 1)) x", " (fun y => ‖y - (x, x)‖ * ‖y.1 - y.2‖) =o[nhds (x, x)] fun x => ‖x.1 - x.2‖", " Tendsto (fun y => ‖y - (x, x)‖) (nhds (x, x)) (nhds 0)", " ‖id (x, x) - (x, x)‖ = 0", " HasFPowerSeriesOnBall (_root_.fderiv 𝕜 f) p.derivSeries x r", ...
[ " HasStrictFDerivAt f ((continuousMultilinearCurryFin1 𝕜 E F) (p 1)) x", " (fun y => ‖y - (x, x)‖ * ‖y.1 - y.2‖) =o[nhds (x, x)] fun x => ‖x.1 - x.2‖", " Tendsto (fun y => ‖y - (x, x)‖) (nhds (x, x)) (nhds 0)", " ‖id (x, x) - (x, x)‖ = 0", " HasFPowerSeriesOnBall (_root_.fderiv 𝕜 f) p.derivSeries x r", ...
import Mathlib.Algebra.Order.Ring.Nat #align_import data.nat.dist from "leanprover-community/mathlib"@"d50b12ae8e2bd910d08a94823976adae9825718b" namespace Nat def dist (n m : ℕ) := n - m + (m - n) #align nat.dist Nat.dist -- Should be aligned to `Nat.dist.eq_def`, but that is generated on demand and isn't present yet. #noalign nat.dist.def theorem dist_comm (n m : ℕ) : dist n m = dist m n := by simp [dist, add_comm] #align nat.dist_comm Nat.dist_comm @[simp] theorem dist_self (n : ℕ) : dist n n = 0 := by simp [dist, tsub_self] #align nat.dist_self Nat.dist_self theorem eq_of_dist_eq_zero {n m : ℕ} (h : dist n m = 0) : n = m := have : n - m = 0 := Nat.eq_zero_of_add_eq_zero_right h have : n ≤ m := tsub_eq_zero_iff_le.mp this have : m - n = 0 := Nat.eq_zero_of_add_eq_zero_left h have : m ≤ n := tsub_eq_zero_iff_le.mp this le_antisymm ‹n ≤ m› ‹m ≤ n› #align nat.eq_of_dist_eq_zero Nat.eq_of_dist_eq_zero theorem dist_eq_zero {n m : ℕ} (h : n = m) : dist n m = 0 := by rw [h, dist_self] #align nat.dist_eq_zero Nat.dist_eq_zero theorem dist_eq_sub_of_le {n m : ℕ} (h : n ≤ m) : dist n m = m - n := by rw [dist, tsub_eq_zero_iff_le.mpr h, zero_add] #align nat.dist_eq_sub_of_le Nat.dist_eq_sub_of_le theorem dist_eq_sub_of_le_right {n m : ℕ} (h : m ≤ n) : dist n m = n - m := by rw [dist_comm]; apply dist_eq_sub_of_le h #align nat.dist_eq_sub_of_le_right Nat.dist_eq_sub_of_le_right theorem dist_tri_left (n m : ℕ) : m ≤ dist n m + n := le_trans le_tsub_add (add_le_add_right (Nat.le_add_left _ _) _) #align nat.dist_tri_left Nat.dist_tri_left theorem dist_tri_right (n m : ℕ) : m ≤ n + dist n m := by rw [add_comm]; apply dist_tri_left #align nat.dist_tri_right Nat.dist_tri_right theorem dist_tri_left' (n m : ℕ) : n ≤ dist n m + m := by rw [dist_comm]; apply dist_tri_left #align nat.dist_tri_left' Nat.dist_tri_left' theorem dist_tri_right' (n m : ℕ) : n ≤ m + dist n m := by rw [dist_comm]; apply dist_tri_right #align nat.dist_tri_right' Nat.dist_tri_right' theorem dist_zero_right (n : ℕ) : dist n 0 = n := Eq.trans (dist_eq_sub_of_le_right (zero_le n)) (tsub_zero n) #align nat.dist_zero_right Nat.dist_zero_right theorem dist_zero_left (n : ℕ) : dist 0 n = n := Eq.trans (dist_eq_sub_of_le (zero_le n)) (tsub_zero n) #align nat.dist_zero_left Nat.dist_zero_left theorem dist_add_add_right (n k m : ℕ) : dist (n + k) (m + k) = dist n m := calc dist (n + k) (m + k) = n + k - (m + k) + (m + k - (n + k)) := rfl _ = n - m + (m + k - (n + k)) := by rw [@add_tsub_add_eq_tsub_right] _ = n - m + (m - n) := by rw [@add_tsub_add_eq_tsub_right] #align nat.dist_add_add_right Nat.dist_add_add_right theorem dist_add_add_left (k n m : ℕ) : dist (k + n) (k + m) = dist n m := by rw [add_comm k n, add_comm k m]; apply dist_add_add_right #align nat.dist_add_add_left Nat.dist_add_add_left theorem dist_eq_intro {n m k l : ℕ} (h : n + m = k + l) : dist n k = dist l m := calc dist n k = dist (n + m) (k + m) := by rw [dist_add_add_right] _ = dist (k + l) (k + m) := by rw [h] _ = dist l m := by rw [dist_add_add_left] #align nat.dist_eq_intro Nat.dist_eq_intro theorem dist.triangle_inequality (n m k : ℕ) : dist n k ≤ dist n m + dist m k := by have : dist n m + dist m k = n - m + (m - k) + (k - m + (m - n)) := by simp [dist, add_comm, add_left_comm, add_assoc] rw [this, dist] exact add_le_add tsub_le_tsub_add_tsub tsub_le_tsub_add_tsub #align nat.dist.triangle_inequality Nat.dist.triangle_inequality
Mathlib/Data/Nat/Dist.lean
99
100
theorem dist_mul_right (n k m : ℕ) : dist (n * k) (m * k) = dist n m * k := by
rw [dist, dist, right_distrib, tsub_mul n, tsub_mul m]
[ " n.dist m = m.dist n", " n.dist n = 0", " n.dist m = 0", " n.dist m = m - n", " n.dist m = n - m", " m.dist n = n - m", " m ≤ n + n.dist m", " m ≤ n.dist m + n", " n ≤ n.dist m + m", " n ≤ m.dist n + m", " n ≤ m + n.dist m", " n ≤ m + m.dist n", " n + k - (m + k) + (m + k - (n + k)) = n - m...
[ " n.dist m = m.dist n", " n.dist n = 0", " n.dist m = 0", " n.dist m = m - n", " n.dist m = n - m", " m.dist n = n - m", " m ≤ n + n.dist m", " m ≤ n.dist m + n", " n ≤ n.dist m + m", " n ≤ m.dist n + m", " n ≤ m + n.dist m", " n ≤ m + m.dist n", " n + k - (m + k) + (m + k - (n + k)) = n - m...
import Mathlib.MeasureTheory.OuterMeasure.Operations import Mathlib.Analysis.SpecificLimits.Basic #align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set Function Filter open scoped Classical NNReal Topology ENNReal namespace MeasureTheory namespace OuterMeasure section OfFunction -- Porting note: "set_option eqn_compiler.zeta true" removed variable {α : Type*} (m : Set α → ℝ≥0∞) (m_empty : m ∅ = 0) protected def ofFunction : OuterMeasure α := let μ s := ⨅ (f : ℕ → Set α) (_ : s ⊆ ⋃ i, f i), ∑' i, m (f i) { measureOf := μ empty := le_antisymm ((iInf_le_of_le fun _ => ∅) <| iInf_le_of_le (empty_subset _) <| by simp [m_empty]) (zero_le _) mono := fun {s₁ s₂} hs => iInf_mono fun f => iInf_mono' fun hb => ⟨hs.trans hb, le_rfl⟩ iUnion_nat := fun s _ => ENNReal.le_of_forall_pos_le_add <| by intro ε hε (hb : (∑' i, μ (s i)) < ∞) rcases ENNReal.exists_pos_sum_of_countable (ENNReal.coe_pos.2 hε).ne' ℕ with ⟨ε', hε', hl⟩ refine le_trans ?_ (add_le_add_left (le_of_lt hl) _) rw [← ENNReal.tsum_add] choose f hf using show ∀ i, ∃ f : ℕ → Set α, (s i ⊆ ⋃ i, f i) ∧ (∑' i, m (f i)) < μ (s i) + ε' i by intro i have : μ (s i) < μ (s i) + ε' i := ENNReal.lt_add_right (ne_top_of_le_ne_top hb.ne <| ENNReal.le_tsum _) (by simpa using (hε' i).ne') rcases iInf_lt_iff.mp this with ⟨t, ht⟩ exists t contrapose! ht exact le_iInf ht refine le_trans ?_ (ENNReal.tsum_le_tsum fun i => le_of_lt (hf i).2) rw [← ENNReal.tsum_prod, ← Nat.pairEquiv.symm.tsum_eq] refine iInf_le_of_le _ (iInf_le _ ?_) apply iUnion_subset intro i apply Subset.trans (hf i).1 apply iUnion_subset simp only [Nat.pairEquiv_symm_apply] rw [iUnion_unpair] intro j apply subset_iUnion₂ i } #align measure_theory.outer_measure.of_function MeasureTheory.OuterMeasure.ofFunction theorem ofFunction_apply (s : Set α) : OuterMeasure.ofFunction m m_empty s = ⨅ (t : ℕ → Set α) (_ : s ⊆ iUnion t), ∑' n, m (t n) := rfl #align measure_theory.outer_measure.of_function_apply MeasureTheory.OuterMeasure.ofFunction_apply variable {m m_empty} theorem ofFunction_le (s : Set α) : OuterMeasure.ofFunction m m_empty s ≤ m s := let f : ℕ → Set α := fun i => Nat.casesOn i s fun _ => ∅ iInf_le_of_le f <| iInf_le_of_le (subset_iUnion f 0) <| le_of_eq <| tsum_eq_single 0 <| by rintro (_ | i) · simp · simp [m_empty] #align measure_theory.outer_measure.of_function_le MeasureTheory.OuterMeasure.ofFunction_le theorem ofFunction_eq (s : Set α) (m_mono : ∀ ⦃t : Set α⦄, s ⊆ t → m s ≤ m t) (m_subadd : ∀ s : ℕ → Set α, m (⋃ i, s i) ≤ ∑' i, m (s i)) : OuterMeasure.ofFunction m m_empty s = m s := le_antisymm (ofFunction_le s) <| le_iInf fun f => le_iInf fun hf => le_trans (m_mono hf) (m_subadd f) #align measure_theory.outer_measure.of_function_eq MeasureTheory.OuterMeasure.ofFunction_eq theorem le_ofFunction {μ : OuterMeasure α} : μ ≤ OuterMeasure.ofFunction m m_empty ↔ ∀ s, μ s ≤ m s := ⟨fun H s => le_trans (H s) (ofFunction_le s), fun H _ => le_iInf fun f => le_iInf fun hs => le_trans (μ.mono hs) <| le_trans (measure_iUnion_le f) <| ENNReal.tsum_le_tsum fun _ => H _⟩ #align measure_theory.outer_measure.le_of_function MeasureTheory.OuterMeasure.le_ofFunction theorem isGreatest_ofFunction : IsGreatest { μ : OuterMeasure α | ∀ s, μ s ≤ m s } (OuterMeasure.ofFunction m m_empty) := ⟨fun _ => ofFunction_le _, fun _ => le_ofFunction.2⟩ #align measure_theory.outer_measure.is_greatest_of_function MeasureTheory.OuterMeasure.isGreatest_ofFunction theorem ofFunction_eq_sSup : OuterMeasure.ofFunction m m_empty = sSup { μ | ∀ s, μ s ≤ m s } := (@isGreatest_ofFunction α m m_empty).isLUB.sSup_eq.symm #align measure_theory.outer_measure.of_function_eq_Sup MeasureTheory.OuterMeasure.ofFunction_eq_sSup
Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean
139
169
theorem ofFunction_union_of_top_of_nonempty_inter {s t : Set α} (h : ∀ u, (s ∩ u).Nonempty → (t ∩ u).Nonempty → m u = ∞) : OuterMeasure.ofFunction m m_empty (s ∪ t) = OuterMeasure.ofFunction m m_empty s + OuterMeasure.ofFunction m m_empty t := by
refine le_antisymm (measure_union_le _ _) (le_iInf₂ fun f hf ↦ ?_) set μ := OuterMeasure.ofFunction m m_empty rcases Classical.em (∃ i, (s ∩ f i).Nonempty ∧ (t ∩ f i).Nonempty) with (⟨i, hs, ht⟩ | he) · calc μ s + μ t ≤ ∞ := le_top _ = m (f i) := (h (f i) hs ht).symm _ ≤ ∑' i, m (f i) := ENNReal.le_tsum i set I := fun s => { i : ℕ | (s ∩ f i).Nonempty } have hd : Disjoint (I s) (I t) := disjoint_iff_inf_le.mpr fun i hi => he ⟨i, hi⟩ have hI : ∀ u ⊆ s ∪ t, μ u ≤ ∑' i : I u, μ (f i) := fun u hu => calc μ u ≤ μ (⋃ i : I u, f i) := μ.mono fun x hx => let ⟨i, hi⟩ := mem_iUnion.1 (hf (hu hx)) mem_iUnion.2 ⟨⟨i, ⟨x, hx, hi⟩⟩, hi⟩ _ ≤ ∑' i : I u, μ (f i) := measure_iUnion_le _ calc μ s + μ t ≤ (∑' i : I s, μ (f i)) + ∑' i : I t, μ (f i) := add_le_add (hI _ subset_union_left) (hI _ subset_union_right) _ = ∑' i : ↑(I s ∪ I t), μ (f i) := (tsum_union_disjoint (f := fun i => μ (f i)) hd ENNReal.summable ENNReal.summable).symm _ ≤ ∑' i, μ (f i) := (tsum_le_tsum_of_inj (↑) Subtype.coe_injective (fun _ _ => zero_le _) (fun _ => le_rfl) ENNReal.summable ENNReal.summable) _ ≤ ∑' i, m (f i) := ENNReal.tsum_le_tsum fun i => ofFunction_le _
[ " ∑' (i : ℕ), m ((fun x => ∅) i) ≤ 0", " ∀ (ε : ℝ≥0), 0 < ε → ∑' (i : ℕ), μ (s i) < ⊤ → μ (⋃ i, s i) ≤ ∑' (i : ℕ), μ (s i) + ↑ε", " μ (⋃ i, s i) ≤ ∑' (i : ℕ), μ (s i) + ↑ε", " μ (⋃ i, s i) ≤ ∑' (i : ℕ), μ (s i) + ∑' (i : ℕ), ↑(ε' i)", " μ (⋃ i, s i) ≤ ∑' (a : ℕ), (μ (s a) + ↑(ε' a))", " ∀ (i : ℕ), ∃ f, s ...
[ " ∑' (i : ℕ), m ((fun x => ∅) i) ≤ 0", " ∀ (ε : ℝ≥0), 0 < ε → ∑' (i : ℕ), μ (s i) < ⊤ → μ (⋃ i, s i) ≤ ∑' (i : ℕ), μ (s i) + ↑ε", " μ (⋃ i, s i) ≤ ∑' (i : ℕ), μ (s i) + ↑ε", " μ (⋃ i, s i) ≤ ∑' (i : ℕ), μ (s i) + ∑' (i : ℕ), ↑(ε' i)", " μ (⋃ i, s i) ≤ ∑' (a : ℕ), (μ (s a) + ↑(ε' a))", " ∀ (i : ℕ), ∃ f, s ...
import Mathlib.FieldTheory.Minpoly.Field #align_import ring_theory.power_basis from "leanprover-community/mathlib"@"d1d69e99ed34c95266668af4e288fc1c598b9a7f" open Polynomial open Polynomial variable {R S T : Type*} [CommRing R] [Ring S] [Algebra R S] variable {A B : Type*} [CommRing A] [CommRing B] [IsDomain B] [Algebra A B] variable {K : Type*} [Field K] -- Porting note(#5171): this linter isn't ported yet. -- @[nolint has_nonempty_instance] structure PowerBasis (R S : Type*) [CommRing R] [Ring S] [Algebra R S] where gen : S dim : ℕ basis : Basis (Fin dim) R S basis_eq_pow : ∀ (i), basis i = gen ^ (i : ℕ) #align power_basis PowerBasis -- this is usually not needed because of `basis_eq_pow` but can be needed in some cases; -- in such circumstances, add it manually using `@[simps dim gen basis]`. initialize_simps_projections PowerBasis (-basis) namespace PowerBasis @[simp] theorem coe_basis (pb : PowerBasis R S) : ⇑pb.basis = fun i : Fin pb.dim => pb.gen ^ (i : ℕ) := funext pb.basis_eq_pow #align power_basis.coe_basis PowerBasis.coe_basis theorem finite (pb : PowerBasis R S) : Module.Finite R S := .of_basis pb.basis #align power_basis.finite_dimensional PowerBasis.finite @[deprecated] alias finiteDimensional := PowerBasis.finite theorem finrank [StrongRankCondition R] (pb : PowerBasis R S) : FiniteDimensional.finrank R S = pb.dim := by rw [FiniteDimensional.finrank_eq_card_basis pb.basis, Fintype.card_fin] #align power_basis.finrank PowerBasis.finrank theorem mem_span_pow' {x y : S} {d : ℕ} : y ∈ Submodule.span R (Set.range fun i : Fin d => x ^ (i : ℕ)) ↔ ∃ f : R[X], f.degree < d ∧ y = aeval x f := by have : (Set.range fun i : Fin d => x ^ (i : ℕ)) = (fun i : ℕ => x ^ i) '' ↑(Finset.range d) := by ext n simp_rw [Set.mem_range, Set.mem_image, Finset.mem_coe, Finset.mem_range] exact ⟨fun ⟨⟨i, hi⟩, hy⟩ => ⟨i, hi, hy⟩, fun ⟨i, hi, hy⟩ => ⟨⟨i, hi⟩, hy⟩⟩ simp only [this, Finsupp.mem_span_image_iff_total, degree_lt_iff_coeff_zero, support, exists_iff_exists_finsupp, coeff, aeval_def, eval₂RingHom', eval₂_eq_sum, Polynomial.sum, Finsupp.mem_supported', Finsupp.total, Finsupp.sum, Algebra.smul_def, eval₂_zero, exists_prop, LinearMap.id_coe, eval₂_one, id, not_lt, Finsupp.coe_lsum, LinearMap.coe_smulRight, Finset.mem_range, AlgHom.coe_mks, Finset.mem_coe] simp_rw [@eq_comm _ y] exact Iff.rfl #align power_basis.mem_span_pow' PowerBasis.mem_span_pow' theorem mem_span_pow {x y : S} {d : ℕ} (hd : d ≠ 0) : y ∈ Submodule.span R (Set.range fun i : Fin d => x ^ (i : ℕ)) ↔ ∃ f : R[X], f.natDegree < d ∧ y = aeval x f := by rw [mem_span_pow'] constructor <;> · rintro ⟨f, h, hy⟩ refine ⟨f, ?_, hy⟩ by_cases hf : f = 0 · simp only [hf, natDegree_zero, degree_zero] at h ⊢ first | exact lt_of_le_of_ne (Nat.zero_le d) hd.symm | exact WithBot.bot_lt_coe d simp_all only [degree_eq_natDegree hf] · first | exact WithBot.coe_lt_coe.1 h | exact WithBot.coe_lt_coe.2 h #align power_basis.mem_span_pow PowerBasis.mem_span_pow theorem dim_ne_zero [Nontrivial S] (pb : PowerBasis R S) : pb.dim ≠ 0 := fun h => not_nonempty_iff.mpr (h.symm ▸ Fin.isEmpty : IsEmpty (Fin pb.dim)) pb.basis.index_nonempty #align power_basis.dim_ne_zero PowerBasis.dim_ne_zero theorem dim_pos [Nontrivial S] (pb : PowerBasis R S) : 0 < pb.dim := Nat.pos_of_ne_zero pb.dim_ne_zero #align power_basis.dim_pos PowerBasis.dim_pos theorem exists_eq_aeval [Nontrivial S] (pb : PowerBasis R S) (y : S) : ∃ f : R[X], f.natDegree < pb.dim ∧ y = aeval pb.gen f := (mem_span_pow pb.dim_ne_zero).mp (by simpa using pb.basis.mem_span y) #align power_basis.exists_eq_aeval PowerBasis.exists_eq_aeval theorem exists_eq_aeval' (pb : PowerBasis R S) (y : S) : ∃ f : R[X], y = aeval pb.gen f := by nontriviality S obtain ⟨f, _, hf⟩ := exists_eq_aeval pb y exact ⟨f, hf⟩ #align power_basis.exists_eq_aeval' PowerBasis.exists_eq_aeval' theorem algHom_ext {S' : Type*} [Semiring S'] [Algebra R S'] (pb : PowerBasis R S) ⦃f g : S →ₐ[R] S'⦄ (h : f pb.gen = g pb.gen) : f = g := by ext x obtain ⟨f, rfl⟩ := pb.exists_eq_aeval' x rw [← Polynomial.aeval_algHom_apply, ← Polynomial.aeval_algHom_apply, h] #align power_basis.alg_hom_ext PowerBasis.algHom_ext open PowerBasis
Mathlib/RingTheory/PowerBasis.lean
425
438
theorem linearIndependent_pow [Algebra K S] (x : S) : LinearIndependent K fun i : Fin (minpoly K x).natDegree => x ^ (i : ℕ) := by
by_cases h : IsIntegral K x; swap · rw [minpoly.eq_zero h, natDegree_zero] exact linearIndependent_empty_type refine Fintype.linearIndependent_iff.2 fun g hg i => ?_ simp only at hg simp_rw [Algebra.smul_def, ← aeval_monomial, ← map_sum] at hg apply (fun hn0 => (minpoly.degree_le_of_ne_zero K x (mt (fun h0 => ?_) hn0) hg).not_lt).mtr · simp_rw [← C_mul_X_pow_eq_monomial] exact (degree_eq_natDegree <| minpoly.ne_zero h).symm ▸ degree_sum_fin_lt _ · apply_fun lcoeff K i at h0 simp_rw [map_sum, lcoeff_apply, coeff_monomial, Fin.val_eq_val, Finset.sum_ite_eq'] at h0 exact (if_pos <| Finset.mem_univ _).symm.trans h0
[ " FiniteDimensional.finrank R S = pb.dim", " y ∈ Submodule.span R (Set.range fun i => x ^ ↑i) ↔ ∃ f, f.degree < ↑d ∧ y = (aeval x) f", " (Set.range fun i => x ^ ↑i) = (fun i => x ^ i) '' ↑(Finset.range d)", " (n ∈ Set.range fun i => x ^ ↑i) ↔ n ∈ (fun i => x ^ i) '' ↑(Finset.range d)", " (∃ y, x ^ ↑y = n) ↔...
[ " FiniteDimensional.finrank R S = pb.dim", " y ∈ Submodule.span R (Set.range fun i => x ^ ↑i) ↔ ∃ f, f.degree < ↑d ∧ y = (aeval x) f", " (Set.range fun i => x ^ ↑i) = (fun i => x ^ i) '' ↑(Finset.range d)", " (n ∈ Set.range fun i => x ^ ↑i) ↔ n ∈ (fun i => x ^ i) '' ↑(Finset.range d)", " (∃ y, x ^ ↑y = n) ↔...
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation import Mathlib.LinearAlgebra.CliffordAlgebra.Even import Mathlib.LinearAlgebra.QuadraticForm.Prod import Mathlib.Tactic.LiftLets #align_import linear_algebra.clifford_algebra.even_equiv from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" namespace CliffordAlgebra variable {R M : Type*} [CommRing R] [AddCommGroup M] [Module R M] variable (Q : QuadraticForm R M) namespace EquivEven abbrev Q' : QuadraticForm R (M × R) := Q.prod <| -@QuadraticForm.sq R _ set_option linter.uppercaseLean3 false in #align clifford_algebra.equiv_even.Q' CliffordAlgebra.EquivEven.Q' theorem Q'_apply (m : M × R) : Q' Q m = Q m.1 - m.2 * m.2 := (sub_eq_add_neg _ _).symm set_option linter.uppercaseLean3 false in #align clifford_algebra.equiv_even.Q'_apply CliffordAlgebra.EquivEven.Q'_apply def e0 : CliffordAlgebra (Q' Q) := ι (Q' Q) (0, 1) #align clifford_algebra.equiv_even.e0 CliffordAlgebra.EquivEven.e0 def v : M →ₗ[R] CliffordAlgebra (Q' Q) := ι (Q' Q) ∘ₗ LinearMap.inl _ _ _ #align clifford_algebra.equiv_even.v CliffordAlgebra.EquivEven.v theorem ι_eq_v_add_smul_e0 (m : M) (r : R) : ι (Q' Q) (m, r) = v Q m + r • e0 Q := by rw [e0, v, LinearMap.comp_apply, LinearMap.inl_apply, ← LinearMap.map_smul, Prod.smul_mk, smul_zero, smul_eq_mul, mul_one, ← LinearMap.map_add, Prod.mk_add_mk, zero_add, add_zero] #align clifford_algebra.equiv_even.ι_eq_v_add_smul_e0 CliffordAlgebra.EquivEven.ι_eq_v_add_smul_e0 theorem e0_mul_e0 : e0 Q * e0 Q = -1 := (ι_sq_scalar _ _).trans <| by simp #align clifford_algebra.equiv_even.e0_mul_e0 CliffordAlgebra.EquivEven.e0_mul_e0 theorem v_sq_scalar (m : M) : v Q m * v Q m = algebraMap _ _ (Q m) := (ι_sq_scalar _ _).trans <| by simp #align clifford_algebra.equiv_even.v_sq_scalar CliffordAlgebra.EquivEven.v_sq_scalar theorem neg_e0_mul_v (m : M) : -(e0 Q * v Q m) = v Q m * e0 Q := by refine neg_eq_of_add_eq_zero_right ((ι_mul_ι_add_swap _ _).trans ?_) dsimp [QuadraticForm.polar] simp only [add_zero, mul_zero, mul_one, zero_add, neg_zero, QuadraticForm.map_zero, add_sub_cancel_right, sub_self, map_zero, zero_sub] #align clifford_algebra.equiv_even.neg_e0_mul_v CliffordAlgebra.EquivEven.neg_e0_mul_v theorem neg_v_mul_e0 (m : M) : -(v Q m * e0 Q) = e0 Q * v Q m := by rw [neg_eq_iff_eq_neg] exact (neg_e0_mul_v _ m).symm #align clifford_algebra.equiv_even.neg_v_mul_e0 CliffordAlgebra.EquivEven.neg_v_mul_e0 @[simp]
Mathlib/LinearAlgebra/CliffordAlgebra/EvenEquiv.lean
95
96
theorem e0_mul_v_mul_e0 (m : M) : e0 Q * v Q m * e0 Q = v Q m := by
rw [← neg_v_mul_e0, ← neg_mul, mul_assoc, e0_mul_e0, mul_neg_one, neg_neg]
[ " (ι (Q' Q)) (m, r) = (v Q) m + r • e0 Q", " (algebraMap R (CliffordAlgebra (Q' Q))) ((Q' Q) (0, 1)) = -1", " (algebraMap R (CliffordAlgebra (Q' Q))) ((Q' Q) ((LinearMap.inl R M R) m)) =\n (algebraMap R (CliffordAlgebra (Q' Q))) (Q m)", " -(e0 Q * (v Q) m) = (v Q) m * e0 Q", " (algebraMap R (CliffordAlge...
[ " (ι (Q' Q)) (m, r) = (v Q) m + r • e0 Q", " (algebraMap R (CliffordAlgebra (Q' Q))) ((Q' Q) (0, 1)) = -1", " (algebraMap R (CliffordAlgebra (Q' Q))) ((Q' Q) ((LinearMap.inl R M R) m)) =\n (algebraMap R (CliffordAlgebra (Q' Q))) (Q m)", " -(e0 Q * (v Q) m) = (v Q) m * e0 Q", " (algebraMap R (CliffordAlge...
import Mathlib.Data.Int.ModEq import Mathlib.GroupTheory.QuotientGroup #align_import algebra.modeq from "leanprover-community/mathlib"@"a07d750983b94c530ab69a726862c2ab6802b38c" namespace AddCommGroup variable {α : Type*} section AddCommGroup variable [AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ} def ModEq (p a b : α) : Prop := ∃ z : ℤ, b - a = z • p #align add_comm_group.modeq AddCommGroup.ModEq @[inherit_doc] notation:50 a " ≡ " b " [PMOD " p "]" => ModEq p a b @[refl, simp] theorem modEq_refl (a : α) : a ≡ a [PMOD p] := ⟨0, by simp⟩ #align add_comm_group.modeq_refl AddCommGroup.modEq_refl theorem modEq_rfl : a ≡ a [PMOD p] := modEq_refl _ #align add_comm_group.modeq_rfl AddCommGroup.modEq_rfl theorem modEq_comm : a ≡ b [PMOD p] ↔ b ≡ a [PMOD p] := (Equiv.neg _).exists_congr_left.trans <| by simp [ModEq, ← neg_eq_iff_eq_neg] #align add_comm_group.modeq_comm AddCommGroup.modEq_comm alias ⟨ModEq.symm, _⟩ := modEq_comm #align add_comm_group.modeq.symm AddCommGroup.ModEq.symm attribute [symm] ModEq.symm @[trans] theorem ModEq.trans : a ≡ b [PMOD p] → b ≡ c [PMOD p] → a ≡ c [PMOD p] := fun ⟨m, hm⟩ ⟨n, hn⟩ => ⟨m + n, by simp [add_smul, ← hm, ← hn]⟩ #align add_comm_group.modeq.trans AddCommGroup.ModEq.trans instance : IsRefl _ (ModEq p) := ⟨modEq_refl⟩ @[simp] theorem neg_modEq_neg : -a ≡ -b [PMOD p] ↔ a ≡ b [PMOD p] := modEq_comm.trans <| by simp [ModEq, neg_add_eq_sub] #align add_comm_group.neg_modeq_neg AddCommGroup.neg_modEq_neg alias ⟨ModEq.of_neg, ModEq.neg⟩ := neg_modEq_neg #align add_comm_group.modeq.of_neg AddCommGroup.ModEq.of_neg #align add_comm_group.modeq.neg AddCommGroup.ModEq.neg @[simp] theorem modEq_neg : a ≡ b [PMOD -p] ↔ a ≡ b [PMOD p] := modEq_comm.trans <| by simp [ModEq, ← neg_eq_iff_eq_neg] #align add_comm_group.modeq_neg AddCommGroup.modEq_neg alias ⟨ModEq.of_neg', ModEq.neg'⟩ := modEq_neg #align add_comm_group.modeq.of_neg' AddCommGroup.ModEq.of_neg' #align add_comm_group.modeq.neg' AddCommGroup.ModEq.neg' theorem modEq_sub (a b : α) : a ≡ b [PMOD b - a] := ⟨1, (one_smul _ _).symm⟩ #align add_comm_group.modeq_sub AddCommGroup.modEq_sub @[simp] theorem modEq_zero : a ≡ b [PMOD 0] ↔ a = b := by simp [ModEq, sub_eq_zero, eq_comm] #align add_comm_group.modeq_zero AddCommGroup.modEq_zero @[simp] theorem self_modEq_zero : p ≡ 0 [PMOD p] := ⟨-1, by simp⟩ #align add_comm_group.self_modeq_zero AddCommGroup.self_modEq_zero @[simp] theorem zsmul_modEq_zero (z : ℤ) : z • p ≡ 0 [PMOD p] := ⟨-z, by simp⟩ #align add_comm_group.zsmul_modeq_zero AddCommGroup.zsmul_modEq_zero theorem add_zsmul_modEq (z : ℤ) : a + z • p ≡ a [PMOD p] := ⟨-z, by simp⟩ #align add_comm_group.add_zsmul_modeq AddCommGroup.add_zsmul_modEq theorem zsmul_add_modEq (z : ℤ) : z • p + a ≡ a [PMOD p] := ⟨-z, by simp [← sub_sub]⟩ #align add_comm_group.zsmul_add_modeq AddCommGroup.zsmul_add_modEq theorem add_nsmul_modEq (n : ℕ) : a + n • p ≡ a [PMOD p] := ⟨-n, by simp⟩ #align add_comm_group.add_nsmul_modeq AddCommGroup.add_nsmul_modEq theorem nsmul_add_modEq (n : ℕ) : n • p + a ≡ a [PMOD p] := ⟨-n, by simp [← sub_sub]⟩ #align add_comm_group.nsmul_add_modeq AddCommGroup.nsmul_add_modEq
Mathlib/Algebra/ModEq.lean
262
263
theorem modEq_sub_iff_add_modEq' : a ≡ b - c [PMOD p] ↔ c + a ≡ b [PMOD p] := by
simp [ModEq, sub_sub]
[ " a - a = 0 • p", " (∃ b_1, b - a = (Equiv.symm (Equiv.neg ℤ)) b_1 • p) ↔ b ≡ a [PMOD p]", " c - a = (m + n) • p", " -b ≡ -a [PMOD p] ↔ a ≡ b [PMOD p]", " b ≡ a [PMOD -p] ↔ a ≡ b [PMOD p]", " a ≡ b [PMOD 0] ↔ a = b", " 0 - p = -1 • p", " 0 - z • p = -z • p", " a - (a + z • p) = -z • p", " a - (z •...
[ " a - a = 0 • p", " (∃ b_1, b - a = (Equiv.symm (Equiv.neg ℤ)) b_1 • p) ↔ b ≡ a [PMOD p]", " c - a = (m + n) • p", " -b ≡ -a [PMOD p] ↔ a ≡ b [PMOD p]", " b ≡ a [PMOD -p] ↔ a ≡ b [PMOD p]", " a ≡ b [PMOD 0] ↔ a = b", " 0 - p = -1 • p", " 0 - z • p = -z • p", " a - (a + z • p) = -z • p", " a - (z •...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.LinearAlgebra.AffineSpace.Slope #align_import analysis.calculus.deriv.slope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open Topology Filter TopologicalSpace open Filter Set section NormedField variable {𝕜 : Type u} [NontriviallyNormedField 𝕜] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace 𝕜 F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace 𝕜 E] variable {f f₀ f₁ g : 𝕜 → F} variable {f' f₀' f₁' g' : F} variable {x : 𝕜} variable {s t : Set 𝕜} variable {L L₁ L₂ : Filter 𝕜} theorem hasDerivAtFilter_iff_tendsto_slope {x : 𝕜} {L : Filter 𝕜} : HasDerivAtFilter f f' x L ↔ Tendsto (slope f x) (L ⊓ 𝓟 {x}ᶜ) (𝓝 f') := calc HasDerivAtFilter f f' x L ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ • (y - x) • f') L (𝓝 0) := by simp only [hasDerivAtFilter_iff_tendsto, ← norm_inv, ← norm_smul, ← tendsto_zero_iff_norm_tendsto_zero, slope_def_module, smul_sub] _ ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ • (y - x) • f') (L ⊓ 𝓟 {x}ᶜ) (𝓝 0) := .symm <| tendsto_inf_principal_nhds_iff_of_forall_eq <| by simp _ ↔ Tendsto (fun y ↦ slope f x y - f') (L ⊓ 𝓟 {x}ᶜ) (𝓝 0) := tendsto_congr' <| by refine (EqOn.eventuallyEq fun y hy ↦ ?_).filter_mono inf_le_right rw [inv_smul_smul₀ (sub_ne_zero.2 hy) f'] _ ↔ Tendsto (slope f x) (L ⊓ 𝓟 {x}ᶜ) (𝓝 f') := by rw [← nhds_translation_sub f', tendsto_comap_iff]; rfl #align has_deriv_at_filter_iff_tendsto_slope hasDerivAtFilter_iff_tendsto_slope theorem hasDerivWithinAt_iff_tendsto_slope : HasDerivWithinAt f f' s x ↔ Tendsto (slope f x) (𝓝[s \ {x}] x) (𝓝 f') := by simp only [HasDerivWithinAt, nhdsWithin, diff_eq, ← inf_assoc, inf_principal.symm] exact hasDerivAtFilter_iff_tendsto_slope #align has_deriv_within_at_iff_tendsto_slope hasDerivWithinAt_iff_tendsto_slope
Mathlib/Analysis/Calculus/Deriv/Slope.lean
72
74
theorem hasDerivWithinAt_iff_tendsto_slope' (hs : x ∉ s) : HasDerivWithinAt f f' s x ↔ Tendsto (slope f x) (𝓝[s] x) (𝓝 f') := by
rw [hasDerivWithinAt_iff_tendsto_slope, diff_singleton_eq_self hs]
[ " HasDerivAtFilter f f' x L ↔ Tendsto (fun y => slope f x y - (y - x)⁻¹ • (y - x) • f') L (𝓝 0)", " ∀ a ∉ {x}ᶜ, slope f x a - (a - x)⁻¹ • (a - x) • f' = 0", " (fun y => slope f x y - (y - x)⁻¹ • (y - x) • f') =ᶠ[L ⊓ 𝓟 {x}ᶜ] fun y => slope f x y - f'", " slope f x y - (y - x)⁻¹ • (y - x) • f' = slope f x y -...
[ " HasDerivAtFilter f f' x L ↔ Tendsto (fun y => slope f x y - (y - x)⁻¹ • (y - x) • f') L (𝓝 0)", " ∀ a ∉ {x}ᶜ, slope f x a - (a - x)⁻¹ • (a - x) • f' = 0", " (fun y => slope f x y - (y - x)⁻¹ • (y - x) • f') =ᶠ[L ⊓ 𝓟 {x}ᶜ] fun y => slope f x y - f'", " slope f x y - (y - x)⁻¹ • (y - x) • f' = slope f x y -...
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Topology.Algebra.InfiniteSum.Order import Mathlib.Topology.Instances.Real import Mathlib.Topology.Instances.ENNReal #align_import topology.algebra.infinite_sum.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" open Filter Finset NNReal Topology variable {α β : Type*} [PseudoMetricSpace α] {f : ℕ → α} {a : α} theorem cauchySeq_of_dist_le_of_summable (d : ℕ → ℝ) (hf : ∀ n, dist (f n) (f n.succ) ≤ d n) (hd : Summable d) : CauchySeq f := by lift d to ℕ → ℝ≥0 using fun n ↦ dist_nonneg.trans (hf n) apply cauchySeq_of_edist_le_of_summable d (α := α) (f := f) · exact_mod_cast hf · exact_mod_cast hd #align cauchy_seq_of_dist_le_of_summable cauchySeq_of_dist_le_of_summable theorem cauchySeq_of_summable_dist (h : Summable fun n ↦ dist (f n) (f n.succ)) : CauchySeq f := cauchySeq_of_dist_le_of_summable _ (fun _ ↦ le_rfl) h #align cauchy_seq_of_summable_dist cauchySeq_of_summable_dist
Mathlib/Topology/Algebra/InfiniteSum/Real.lean
39
46
theorem dist_le_tsum_of_dist_le_of_tendsto (d : ℕ → ℝ) (hf : ∀ n, dist (f n) (f n.succ) ≤ d n) (hd : Summable d) {a : α} (ha : Tendsto f atTop (𝓝 a)) (n : ℕ) : dist (f n) a ≤ ∑' m, d (n + m) := by
refine le_of_tendsto (tendsto_const_nhds.dist ha) (eventually_atTop.2 ⟨n, fun m hnm ↦ ?_⟩) refine le_trans (dist_le_Ico_sum_of_dist_le hnm fun _ _ ↦ hf _) ?_ rw [sum_Ico_eq_sum_range] refine sum_le_tsum (range _) (fun _ _ ↦ le_trans dist_nonneg (hf _)) ?_ exact hd.comp_injective (add_right_injective n)
[ " CauchySeq f", " ∀ (n : ℕ), edist (f n) (f n.succ) ≤ ↑(d n)", " Summable d", " dist (f n) a ≤ ∑' (m : ℕ), d (n + m)", " dist (f n) (f m) ≤ ∑' (m : ℕ), d (n + m)", " ∑ i ∈ Ico n m, d i ≤ ∑' (m : ℕ), d (n + m)", " ∑ k ∈ range (m - n), d (n + k) ≤ ∑' (m : ℕ), d (n + m)", " Summable fun k => d (n + k)" ]
[ " CauchySeq f", " ∀ (n : ℕ), edist (f n) (f n.succ) ≤ ↑(d n)", " Summable d" ]
import Mathlib.SetTheory.Cardinal.Ordinal #align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925" namespace Cardinal universe u v open Cardinal def continuum : Cardinal.{u} := 2 ^ ℵ₀ #align cardinal.continuum Cardinal.continuum scoped notation "𝔠" => Cardinal.continuum @[simp] theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} := rfl #align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0 @[simp]
Mathlib/SetTheory/Cardinal/Continuum.lean
41
42
theorem lift_continuum : lift.{v} 𝔠 = 𝔠 := by
rw [← two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0]
[ " lift.{v, u_1} 𝔠 = 𝔠" ]
[]
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
[ " Tendsto Real.toNNReal atTop atTop", " Tendsto (fun a => ↑a.toNNReal) atTop atTop" ]
[]
import Mathlib.Probability.Independence.Basic import Mathlib.Probability.Independence.Conditional #align_import probability.independence.zero_one from "leanprover-community/mathlib"@"2f8347015b12b0864dfaf366ec4909eb70c78740" open MeasureTheory MeasurableSpace open scoped MeasureTheory ENNReal namespace ProbabilityTheory variable {α Ω ι : Type*} {_mα : MeasurableSpace α} {s : ι → MeasurableSpace Ω} {m m0 : MeasurableSpace Ω} {κ : kernel α Ω} {μα : Measure α} {μ : Measure Ω} theorem kernel.measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω} (h_indep : kernel.IndepSet t t κ μα) : ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 ∨ κ a t = ∞ := by specialize h_indep t t (measurableSet_generateFrom (Set.mem_singleton t)) (measurableSet_generateFrom (Set.mem_singleton t)) filter_upwards [h_indep] with a ha by_cases h0 : κ a t = 0 · exact Or.inl h0 by_cases h_top : κ a t = ∞ · exact Or.inr (Or.inr h_top) rw [← one_mul (κ a (t ∩ t)), Set.inter_self, ENNReal.mul_eq_mul_right h0 h_top] at ha exact Or.inr (Or.inl ha.symm) theorem measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω} (h_indep : IndepSet t t μ) : μ t = 0 ∨ μ t = 1 ∨ μ t = ∞ := by simpa only [ae_dirac_eq, Filter.eventually_pure] using kernel.measure_eq_zero_or_one_or_top_of_indepSet_self h_indep #align probability_theory.measure_eq_zero_or_one_or_top_of_indep_set_self ProbabilityTheory.measure_eq_zero_or_one_or_top_of_indepSet_self theorem kernel.measure_eq_zero_or_one_of_indepSet_self [∀ a, IsFiniteMeasure (κ a)] {t : Set Ω} (h_indep : IndepSet t t κ μα) : ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 := by filter_upwards [measure_eq_zero_or_one_or_top_of_indepSet_self h_indep] with a h_0_1_top simpa only [measure_ne_top (κ a), or_false] using h_0_1_top
Mathlib/Probability/Independence/ZeroOne.lean
58
61
theorem measure_eq_zero_or_one_of_indepSet_self [IsFiniteMeasure μ] {t : Set Ω} (h_indep : IndepSet t t μ) : μ t = 0 ∨ μ t = 1 := by
simpa only [ae_dirac_eq, Filter.eventually_pure] using kernel.measure_eq_zero_or_one_of_indepSet_self h_indep
[ " ∀ᵐ (a : α) ∂μα, (κ a) t = 0 ∨ (κ a) t = 1 ∨ (κ a) t = ⊤", " (κ a) t = 0 ∨ (κ a) t = 1 ∨ (κ a) t = ⊤", " μ t = 0 ∨ μ t = 1 ∨ μ t = ⊤", " ∀ᵐ (a : α) ∂μα, (κ a) t = 0 ∨ (κ a) t = 1", " (κ a) t = 0 ∨ (κ a) t = 1", " μ t = 0 ∨ μ t = 1" ]
[ " ∀ᵐ (a : α) ∂μα, (κ a) t = 0 ∨ (κ a) t = 1 ∨ (κ a) t = ⊤", " (κ a) t = 0 ∨ (κ a) t = 1 ∨ (κ a) t = ⊤", " μ t = 0 ∨ μ t = 1 ∨ μ t = ⊤", " ∀ᵐ (a : α) ∂μα, (κ a) t = 0 ∨ (κ a) t = 1", " (κ a) t = 0 ∨ (κ a) t = 1" ]
import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.Algebra.Order.Sub.Defs import Mathlib.Util.AssertExists #align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce" open Function universe u variable {α : Type u} class OrderedAddCommGroup (α : Type u) extends AddCommGroup α, PartialOrder α where protected add_le_add_left : ∀ a b : α, a ≤ b → ∀ c : α, c + a ≤ c + b #align ordered_add_comm_group OrderedAddCommGroup class OrderedCommGroup (α : Type u) extends CommGroup α, PartialOrder α where protected mul_le_mul_left : ∀ a b : α, a ≤ b → ∀ c : α, c * a ≤ c * b #align ordered_comm_group OrderedCommGroup attribute [to_additive] OrderedCommGroup @[to_additive] instance OrderedCommGroup.to_covariantClass_left_le (α : Type u) [OrderedCommGroup α] : CovariantClass α α (· * ·) (· ≤ ·) where elim a b c bc := OrderedCommGroup.mul_le_mul_left b c bc a #align ordered_comm_group.to_covariant_class_left_le OrderedCommGroup.to_covariantClass_left_le #align ordered_add_comm_group.to_covariant_class_left_le OrderedAddCommGroup.to_covariantClass_left_le -- See note [lower instance priority] @[to_additive OrderedAddCommGroup.toOrderedCancelAddCommMonoid] instance (priority := 100) OrderedCommGroup.toOrderedCancelCommMonoid [OrderedCommGroup α] : OrderedCancelCommMonoid α := { ‹OrderedCommGroup α› with le_of_mul_le_mul_left := fun a b c ↦ le_of_mul_le_mul_left' } #align ordered_comm_group.to_ordered_cancel_comm_monoid OrderedCommGroup.toOrderedCancelCommMonoid #align ordered_add_comm_group.to_ordered_cancel_add_comm_monoid OrderedAddCommGroup.toOrderedCancelAddCommMonoid example (α : Type u) [OrderedAddCommGroup α] : CovariantClass α α (swap (· + ·)) (· < ·) := IsRightCancelAdd.covariant_swap_add_lt_of_covariant_swap_add_le α -- Porting note: this instance is not used, -- and causes timeouts after lean4#2210. -- It was introduced in https://github.com/leanprover-community/mathlib/pull/17564 -- but without the motivation clearly explained. @[to_additive "A choice-free shortcut instance."] theorem OrderedCommGroup.to_contravariantClass_left_le (α : Type u) [OrderedCommGroup α] : ContravariantClass α α (· * ·) (· ≤ ·) where elim a b c bc := by simpa using mul_le_mul_left' bc a⁻¹ #align ordered_comm_group.to_contravariant_class_left_le OrderedCommGroup.to_contravariantClass_left_le #align ordered_add_comm_group.to_contravariant_class_left_le OrderedAddCommGroup.to_contravariantClass_left_le -- Porting note: this instance is not used, -- and causes timeouts after lean4#2210. -- See further explanation on `OrderedCommGroup.to_contravariantClass_left_le`. @[to_additive "A choice-free shortcut instance."] theorem OrderedCommGroup.to_contravariantClass_right_le (α : Type u) [OrderedCommGroup α] : ContravariantClass α α (swap (· * ·)) (· ≤ ·) where elim a b c bc := by simpa using mul_le_mul_right' bc a⁻¹ #align ordered_comm_group.to_contravariant_class_right_le OrderedCommGroup.to_contravariantClass_right_le #align ordered_add_comm_group.to_contravariant_class_right_le OrderedAddCommGroup.to_contravariantClass_right_le section Group variable [Group α] section TypeclassesRightLT variable [LT α] [CovariantClass α α (swap (· * ·)) (· < ·)] {a b c : α} @[to_additive (attr := simp) "Uses `right` co(ntra)variant."] theorem Right.inv_lt_one_iff : a⁻¹ < 1 ↔ 1 < a := by rw [← mul_lt_mul_iff_right a, inv_mul_self, one_mul] #align right.inv_lt_one_iff Right.inv_lt_one_iff #align right.neg_neg_iff Right.neg_neg_iff @[to_additive (attr := simp) Right.neg_pos_iff "Uses `right` co(ntra)variant."] theorem Right.one_lt_inv_iff : 1 < a⁻¹ ↔ a < 1 := by rw [← mul_lt_mul_iff_right a, inv_mul_self, one_mul] #align right.one_lt_inv_iff Right.one_lt_inv_iff #align right.neg_pos_iff Right.neg_pos_iff @[to_additive] theorem inv_lt_iff_one_lt_mul : a⁻¹ < b ↔ 1 < b * a := (mul_lt_mul_iff_right a).symm.trans <| by rw [inv_mul_self] #align inv_lt_iff_one_lt_mul inv_lt_iff_one_lt_mul #align neg_lt_iff_pos_add neg_lt_iff_pos_add @[to_additive] theorem lt_inv_iff_mul_lt_one : a < b⁻¹ ↔ a * b < 1 := (mul_lt_mul_iff_right b).symm.trans <| by rw [inv_mul_self] #align lt_inv_iff_mul_lt_one lt_inv_iff_mul_lt_one #align lt_neg_iff_add_neg lt_neg_iff_add_neg @[to_additive (attr := simp)]
Mathlib/Algebra/Order/Group/Defs.lean
305
306
theorem mul_inv_lt_iff_lt_mul : a * b⁻¹ < c ↔ a < c * b := by
rw [← mul_lt_mul_iff_right b, inv_mul_cancel_right]
[ " b ≤ c", " a⁻¹ < 1 ↔ 1 < a", " 1 < a⁻¹ ↔ a < 1", " a⁻¹ * a < b * a ↔ 1 < b * a", " a * b < b⁻¹ * b ↔ a * b < 1", " a * b⁻¹ < c ↔ a < c * b" ]
[ " b ≤ c", " a⁻¹ < 1 ↔ 1 < a", " 1 < a⁻¹ ↔ a < 1", " a⁻¹ * a < b * a ↔ 1 < b * a", " a * b < b⁻¹ * b ↔ a * b < 1" ]
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
7