Skip to content

Commit

Permalink
chore(*): more line lengths (#6472)
Browse files Browse the repository at this point in the history


Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
  • Loading branch information
semorrison and semorrison committed Feb 28, 2021
1 parent f153a85 commit abb3121
Show file tree
Hide file tree
Showing 67 changed files with 311 additions and 178 deletions.
3 changes: 2 additions & 1 deletion src/analysis/analytic/composition.lean
Expand Up @@ -605,7 +605,8 @@ that it is a bijection is not directly possible, but the consequence on sums can
more easily. -/
lemma comp_change_of_variables_sum {α : Type*} [add_comm_monoid α] (m M N : ℕ)
(f : (Σ (n : ℕ), fin n → ℕ) → α) (g : (Σ n, composition n) → α)
(h : ∀ e (he : e ∈ comp_partial_sum_source m M N), f e = g (comp_change_of_variables m M N e he)) :
(h : ∀ e (he : e ∈ comp_partial_sum_source m M N),
f e = g (comp_change_of_variables m M N e he)) :
∑ e in comp_partial_sum_source m M N, f e = ∑ e in comp_partial_sum_target m M N, g e :=
begin
apply finset.sum_bij (comp_change_of_variables m M N),
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/calculus/deriv.lean
Expand Up @@ -1172,7 +1172,7 @@ end
end composition

section composition_vector
/-! ### Derivative of the composition of a function between vector spaces and of a function defined on `𝕜` -/
/-! ### Derivative of the composition of a function between vector spaces and a function on `𝕜` -/

variables {l : F → E} {l' : F →L[𝕜] E}
variable (x)
Expand Down
3 changes: 2 additions & 1 deletion src/analysis/calculus/local_extr.lean
Expand Up @@ -19,7 +19,8 @@ This set is used in the proof of Fermat's Theorem (see below), and can be used t
## Main statements
For each theorem name listed below, we also prove similar theorems for `min`, `extr` (if applicable)`,
For each theorem name listed below,
we also prove similar theorems for `min`, `extr` (if applicable)`,
and `(f)deriv` instead of `has_fderiv`.
* `is_local_max_on.has_fderiv_within_at_nonpos` : `f' y ≤ 0` whenever `a` is a local maximum
Expand Down
3 changes: 2 additions & 1 deletion src/analysis/calculus/tangent_cone.lean
Expand Up @@ -247,7 +247,8 @@ section unique_diff
/-!
### Properties of `unique_diff_within_at` and `unique_diff_on`
This section is devoted to properties of the predicates `unique_diff_within_at` and `unique_diff_on`. -/
This section is devoted to properties of the predicates
`unique_diff_within_at` and `unique_diff_on`. -/

lemma unique_diff_on.unique_diff_within_at {s : set E} {x} (hs : unique_diff_on 𝕜 s) (h : x ∈ s) :
unique_diff_within_at 𝕜 s x :=
Expand Down
23 changes: 14 additions & 9 deletions src/analysis/calculus/times_cont_diff.lean
Expand Up @@ -707,7 +707,8 @@ lemma iterated_fderiv_within_zero_eq_comp :

lemma iterated_fderiv_within_succ_apply_left {n : ℕ} (m : fin (n + 1) → E):
(iterated_fderiv_within 𝕜 (n + 1) f s x : (fin (n + 1) → E) → F) m
= (fderiv_within 𝕜 (iterated_fderiv_within 𝕜 n f s) s x : E → (E [×n]→L[𝕜] F)) (m 0) (tail m) := rfl
= (fderiv_within 𝕜 (iterated_fderiv_within 𝕜 n f s) s x : E → (E [×n]→L[𝕜] F))
(m 0) (tail m) := rfl

/-- Writing explicitly the `n+1`-th derivative as the composition of a currying linear equiv,
and the derivative of the `n`-th derivative. -/
Expand Down Expand Up @@ -864,7 +865,8 @@ begin
have : has_fderiv_within_at (λ (y : E), iterated_fderiv_within 𝕜 m f s y)
(continuous_multilinear_map.curry_left (p x (nat.succ m))) s x :=
(h.fderiv_within m A x hx).congr (λ y hy, (IH (le_of_lt A) hy).symm) (IH (le_of_lt A) hx).symm,
rw [iterated_fderiv_within_succ_eq_comp_left, function.comp_apply, this.fderiv_within (hs x hx)],
rw [iterated_fderiv_within_succ_eq_comp_left, function.comp_apply,
this.fderiv_within (hs x hx)],
exact (continuous_multilinear_map.uncurry_curry_left _).symm }
end

Expand Down Expand Up @@ -1420,8 +1422,8 @@ lemma times_cont_diff_of_differentiable_iterated_fderiv {n : with_top ℕ}
times_cont_diff_iff_continuous_differentiable.2
⟨λ m hm, (h m hm).continuous, λ m hm, (h m (le_of_lt hm))⟩

/-- A function is `C^(n + 1)` on a domain with unique derivatives if and only if it is differentiable
there, and its derivative is `C^n`. -/
/-- A function is `C^(n + 1)` on a domain with unique derivatives if and only if
it is differentiable there, and its derivative is `C^n`. -/
theorem times_cont_diff_succ_iff_fderiv {n : ℕ} :
times_cont_diff 𝕜 ((n + 1) : ℕ) f ↔
differentiable 𝕜 f ∧ times_cont_diff 𝕜 n (λ y, fderiv 𝕜 f y) :=
Expand Down Expand Up @@ -1843,7 +1845,8 @@ lemma times_cont_diff_on.prod {n : with_top ℕ} {s : set E} {f : E → F} {g :
lemma times_cont_diff_at.prod {n : with_top ℕ} {f : E → F} {g : E → G}
(hf : times_cont_diff_at 𝕜 n f x) (hg : times_cont_diff_at 𝕜 n g x) :
times_cont_diff_at 𝕜 n (λx:E, (f x, g x)) x :=
times_cont_diff_within_at_univ.1 $ times_cont_diff_within_at.prod (times_cont_diff_within_at_univ.2 hf)
times_cont_diff_within_at_univ.1 $ times_cont_diff_within_at.prod
(times_cont_diff_within_at_univ.2 hf)
(times_cont_diff_within_at_univ.2 hg)

/--
Expand Down Expand Up @@ -2494,7 +2497,8 @@ begin
have : continuous_linear_map.inverse = O₁ ∘ ring.inverse ∘ O₂ :=
funext (to_ring_inverse e),
rw this,
-- `O₁` and `O₂` are `times_cont_diff`, so we reduce to proving that `ring.inverse` is `times_cont_diff`
-- `O₁` and `O₂` are `times_cont_diff`,
-- so we reduce to proving that `ring.inverse` is `times_cont_diff`
have h₁ : times_cont_diff 𝕜 n O₁,
from is_bounded_bilinear_map_comp.times_cont_diff.comp
(times_cont_diff_const.prod times_cont_diff_id),
Expand All @@ -2511,9 +2515,10 @@ end map_inverse
section function_inverse
open continuous_linear_map

/-- If `f` is a local homeomorphism and the point `a` is in its target, and if `f` is `n` times
continuously differentiable at `f.symm a`, and if the derivative at `f.symm a` is a continuous linear
equivalence, then `f.symm` is `n` times continuously differentiable at the point `a`.
/-- If `f` is a local homeomorphism and the point `a` is in its target,
and if `f` is `n` times continuously differentiable at `f.symm a`,
and if the derivative at `f.symm a` is a continuous linear equivalence,
then `f.symm` is `n` times continuously differentiable at the point `a`.
This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
Expand Down
11 changes: 6 additions & 5 deletions src/analysis/complex/polynomial.lean
Expand Up @@ -18,7 +18,8 @@ open_locale classical
namespace complex

/- The following proof uses the method given at
<https://ncatlab.org/nlab/show/fundamental+theorem+of+algebra#classical_fta_via_advanced_calculus> -/
<https://ncatlab.org/nlab/show/fundamental+theorem+of+algebra#classical_fta_via_advanced_calculus>
-/
/-- The fundamental theorem of algebra. Every non constant complex polynomial
has a root -/
lemma exists_root {f : polynomial ℂ} (hf : 0 < degree f) : ∃ z : ℂ, is_root f z :=
Expand Down Expand Up @@ -47,10 +48,10 @@ let F : polynomial ℂ := C (f.eval z₀) + C (g.eval z₀) * (X - C z₀) ^ n i
let z' := (-f.eval z₀ * (g.eval z₀).abs * δ ^ n /
((f.eval z₀).abs * g.eval z₀)) ^ (n⁻¹ : ℂ) + z₀ in
have hF₁ : F.eval z' = f.eval z₀ - f.eval z₀ * (g.eval z₀).abs * δ ^ n / (f.eval z₀).abs,
by simp only [F, cpow_nat_inv_pow _ hn0, div_eq_mul_inv, eval_pow, mul_assoc, mul_comm (g.eval z₀),
mul_left_comm (g.eval z₀), mul_left_comm (g.eval z₀)⁻¹, mul_inv', inv_mul_cancel hg0,
eval_C, eval_add, eval_neg, sub_eq_add_neg, eval_mul, eval_X, add_neg_cancel_right,
neg_mul_eq_neg_mul_symm, mul_one, div_eq_mul_inv];
by simp only [F, cpow_nat_inv_pow _ hn0, div_eq_mul_inv, eval_pow, mul_assoc,
mul_comm (g.eval z₀), mul_left_comm (g.eval z₀), mul_left_comm (g.eval z₀)⁻¹, mul_inv',
inv_mul_cancel hg0, eval_C, eval_add, eval_neg, sub_eq_add_neg, eval_mul, eval_X,
add_neg_cancel_right, neg_mul_eq_neg_mul_symm, mul_one, div_eq_mul_inv];
simp only [mul_comm, mul_left_comm, mul_assoc],
have hδs : (g.eval z₀).abs * δ ^ n / (f.eval z₀).abs < 1,
from (div_lt_one hf0').2 $ (lt_div_iff' hg0').1 $
Expand Down
3 changes: 2 additions & 1 deletion src/analysis/convex/extrema.lean
Expand Up @@ -93,7 +93,8 @@ end
lemma is_max_on.of_is_local_max_on_of_concave_on {f : E → β} {a : E}
(a_in_s : a ∈ s) (h_localmax: is_local_max_on f s a) (h_conc : concave_on s f) :
∀ x ∈ s, f x ≤ f a :=
@is_min_on.of_is_local_min_on_of_convex_on _ (order_dual β) _ _ _ _ _ _ _ _ s f a a_in_s h_localmax h_conc
@is_min_on.of_is_local_min_on_of_convex_on
_ (order_dual β) _ _ _ _ _ _ _ _ s f a a_in_s h_localmax h_conc

/-- A local minimum of a convex function is a global minimum. -/
lemma is_min_on.of_is_local_min_of_convex_univ {f : E → β} {a : E}
Expand Down
12 changes: 8 additions & 4 deletions src/analysis/normed_space/bounded_linear_maps.lean
Expand Up @@ -145,7 +145,8 @@ end is_bounded_linear_map
section
variables {ι : Type*} [decidable_eq ι] [fintype ι]

/-- Taking the cartesian product of two continuous multilinear maps is a bounded linear operation. -/
/-- Taking the cartesian product of two continuous multilinear maps
is a bounded linear operation. -/
lemma is_bounded_linear_map_prod_multilinear
{E : ι → Type*} [∀i, normed_group (E i)] [∀i, normed_space 𝕜 (E i)] :
is_bounded_linear_map 𝕜
Expand Down Expand Up @@ -251,7 +252,8 @@ lemma is_bounded_bilinear_map.is_bounded_linear_map_left (h : is_bounded_bilinea
... = C * (∥y∥ + 1) * ∥x∥ : by ring
end }

lemma is_bounded_bilinear_map.is_bounded_linear_map_right (h : is_bounded_bilinear_map 𝕜 f) (x : E) :
lemma is_bounded_bilinear_map.is_bounded_linear_map_right
(h : is_bounded_bilinear_map 𝕜 f) (x : E) :
is_bounded_linear_map 𝕜 (λ y, f (x, y)) :=
{ map_add := λ y y', h.add_right _ _ _,
map_smul := λ c y, h.smul_right _ _ _,
Expand Down Expand Up @@ -374,7 +376,8 @@ def is_bounded_bilinear_map.deriv (h : is_bounded_bilinear_map 𝕜 f) (p : E ×
≤ C * ∥p.1∥ * ∥q.2∥ + C * ∥q.1∥ * ∥p.2∥ : norm_add_le_of_le (hC _ _) (hC _ _)
... ≤ C * ∥p.1∥ * ∥q∥ + C * ∥q∥ * ∥p.2∥ : begin
apply add_le_add,
exact mul_le_mul_of_nonneg_left (le_max_right _ _) (mul_nonneg (le_of_lt Cpos) (norm_nonneg _)),
exact mul_le_mul_of_nonneg_left
(le_max_right _ _) (mul_nonneg (le_of_lt Cpos) (norm_nonneg _)),
apply mul_le_mul_of_nonneg_right _ (norm_nonneg _),
exact mul_le_mul_of_nonneg_left (le_max_left _ _) (le_of_lt Cpos),
end
Expand Down Expand Up @@ -418,7 +421,8 @@ end bilinear_map
lemma linear_map.norm_apply_of_isometry (f : E →ₗ[𝕜] F) {x : E} (hf : isometry f) : ∥f x∥ = ∥x∥ :=
by { simp_rw [←dist_zero_right, ←f.map_zero], exact isometry.dist_eq hf _ _ }

/-- Construct a continuous linear equiv from a linear map that is also an isometry with full range. -/
/-- Construct a continuous linear equiv from
a linear map that is also an isometry with full range. -/
def continuous_linear_equiv.of_isometry (f : E →ₗ[𝕜] F) (hf : isometry f) (hfr : f.range = ⊤) :
E ≃L[𝕜] F :=
continuous_linear_equiv.of_homothety
Expand Down
9 changes: 6 additions & 3 deletions src/analysis/normed_space/multilinear.lean
Expand Up @@ -732,7 +732,8 @@ protected def pi_field_equiv : G ≃L[𝕜] (continuous_multilinear_map 𝕜 (λ
exact multilinear_map.mk_continuous_norm_le _ (norm_nonneg _) _
end,
continuous_inv_fun := begin
refine (continuous_multilinear_map.pi_field_equiv_aux 𝕜 ι G).symm.to_linear_map.continuous_of_bound
refine
(continuous_multilinear_map.pi_field_equiv_aux 𝕜 ι G).symm.to_linear_map.continuous_of_bound
(1 : ℝ) (λf, _),
rw one_mul,
change ∥f (λi, 1)∥ ≤ ∥f∥,
Expand Down Expand Up @@ -1012,14 +1013,16 @@ by { ext m, simp }

variables (𝕜 Ei G)

/-- The space of continuous multilinear maps on `Π(i : fin (n+1)), Ei i` is canonically isomorphic to
/--
The space of continuous multilinear maps on `Π(i : fin (n+1)), Ei i` is canonically isomorphic to
the space of continuous multilinear maps on `Π(i : fin n), Ei i.cast_succ` with values in the space
of continuous linear maps on `Ei (last n)`, by separating the last variable. We register this
isomorphism as a continuous linear equiv in `continuous_multilinear_curry_right_equiv 𝕜 Ei G`.
The algebraic version (without topology) is given in `multilinear_curry_right_equiv 𝕜 Ei G`.
The direct and inverse maps are given by `f.uncurry_right` and `f.curry_right`. Use these
unless you need the full framework of linear isometric equivs. -/
unless you need the full framework of linear isometric equivs.
-/
def continuous_multilinear_curry_right_equiv :
(continuous_multilinear_map 𝕜 (λ(i : fin n), Ei i.cast_succ) (Ei (last n) →L[𝕜] G)) ≃ₗᵢ[𝕜]
(continuous_multilinear_map 𝕜 Ei G) :=
Expand Down
25 changes: 16 additions & 9 deletions src/analysis/normed_space/operator_norm.lean
Expand Up @@ -31,10 +31,11 @@ lemma exists_pos_bound_of_bound {f : E → F} (M : ℝ) (h : ∀x, ∥f x∥ ≤
... ≤ max M 1 * ∥x∥ : mul_le_mul_of_nonneg_right (le_max_left _ _) (norm_nonneg _) ⟩

section normed_field
/- Most statements in this file require the field to be non-discrete, as this is necessary
to deduce an inequality `∥f x∥ ≤ C ∥x∥` from the continuity of f. However, the other direction always
holds. In this section, we just assume that `𝕜` is a normed field. In the remainder of the file,
it will be non-discrete. -/
/-! Most statements in this file require the field to be non-discrete,
as this is necessary to deduce an inequality `∥f x∥ ≤ C ∥x∥` from the continuity of f.
However, the other direction always holds.
In this section, we just assume that `𝕜` is a normed field.
In the remainder of the file, it will be non-discrete. -/

variables [normed_field 𝕜] [normed_space 𝕜 E] [normed_space 𝕜 F] (f : E →ₗ[𝕜] F)

Expand Down Expand Up @@ -89,7 +90,8 @@ let φ : E →ₗ[𝕜] F := ⟨f, h_add, h_smul⟩ in φ.continuous_of_bound C
@[simp] lemma linear_map.mk_continuous_apply (C : ℝ) (h : ∀x, ∥f x∥ ≤ C * ∥x∥) (x : E) :
f.mk_continuous C h x = f x := rfl

@[simp, norm_cast] lemma linear_map.mk_continuous_of_exists_bound_coe (h : ∃C, ∀x, ∥f x∥ ≤ C * ∥x∥) :
@[simp, norm_cast] lemma linear_map.mk_continuous_of_exists_bound_coe
(h : ∃C, ∀x, ∥f x∥ ≤ C * ∥x∥) :
((f.mk_continuous_of_exists_bound h) : E →ₗ[𝕜] F) = f := rfl

@[simp] lemma linear_map.mk_continuous_of_exists_bound_apply (h : ∃C, ∀x, ∥f x∥ ≤ C * ∥x∥) (x : E) :
Expand Down Expand Up @@ -219,7 +221,8 @@ f.mk_continuous a (λ x, le_of_eq (hf x))

variable (𝕜)

lemma to_span_singleton_homothety (x : E) (c : 𝕜) : ∥linear_map.to_span_singleton 𝕜 E x c∥ = ∥x∥ * ∥c∥ :=
lemma to_span_singleton_homothety (x : E) (c : 𝕜) :
∥linear_map.to_span_singleton 𝕜 E x c∥ = ∥x∥ * ∥c∥ :=
by {rw mul_comm, exact norm_smul _ _}

/-- Given an element `x` of a normed space `E` over a field `𝕜`, the natural continuous
Expand Down Expand Up @@ -1146,10 +1149,14 @@ variables (𝕜) (𝕜' : Type*) [normed_ring 𝕜'] [normed_algebra 𝕜 𝕜']

variables {𝕜}

variables {E' F' : Type*} [normed_group E'] [normed_group F'] [normed_space 𝕜 E'] [normed_space 𝕜 F']
variables {E' F' : Type*} [normed_group E'] [normed_group F']
[normed_space 𝕜 E'] [normed_space 𝕜 F']

/-- Compose a bilinear map `E →L[𝕜] F →L[𝕜] G` with two linear maps `E' →L[𝕜] E` and `F' →L[𝕜] F`. -/
def bilinear_comp (f : E →L[𝕜] F →L[𝕜] G) (gE : E' →L[𝕜] E) (gF : F' →L[𝕜] F) : E' →L[𝕜] F' →L[𝕜] G :=
/--
Compose a bilinear map `E →L[𝕜] F →L[𝕜] G` with two linear maps `E' →L[𝕜] E` and `F' →L[𝕜] F`.
-/
def bilinear_comp (f : E →L[𝕜] F →L[𝕜] G) (gE : E' →L[𝕜] E) (gF : F' →L[𝕜] F) :
E' →L[𝕜] F' →L[𝕜] G :=
((f.comp gE).flip.comp gF).flip

@[simp] lemma bilinear_comp_apply (f : E →L[𝕜] F →L[𝕜] G) (gE : E' →L[𝕜] E) (gF : F' →L[𝕜] F)
Expand Down
19 changes: 12 additions & 7 deletions src/analysis/special_functions/pow.lean
Expand Up @@ -298,12 +298,16 @@ end
lemma mul_rpow {x y z : ℝ} (h : 0 ≤ x) (h₁ : 0 ≤ y) : (x*y)^z = x^z * y^z :=
begin
iterate 3 { rw real.rpow_def_of_nonneg }, split_ifs; simp * at *,
{ have hx : 0 < x, cases lt_or_eq_of_le h with h₂ h₂, exact h₂, exfalso, apply h_2, exact eq.symm h₂,
have hy : 0 < y, cases lt_or_eq_of_le h₁ with h₂ h₂, exact h₂, exfalso, apply h_3, exact eq.symm h₂,
{ have hx : 0 < x,
{ cases lt_or_eq_of_le h with h₂ h₂, { exact h₂ },
exfalso, apply h_2, exact eq.symm h₂ },
have hy : 0 < y,
{ cases lt_or_eq_of_le h₁ with h₂ h₂, { exact h₂ },
exfalso, apply h_3, exact eq.symm h₂ },
rw [log_mul (ne_of_gt hx) (ne_of_gt hy), add_mul, exp_add]},
{ exact h₁},
{ exact h},
{ exact mul_nonneg h h₁},
{ exact h₁ },
{ exact h },
{ exact mul_nonneg h h₁ },
end

lemma inv_rpow (hx : 0 ≤ x) (y : ℝ) : (x⁻¹)^y = (x^y)⁻¹ :=
Expand Down Expand Up @@ -551,7 +555,8 @@ begin
have : has_deriv_at (λ x, exp (log x * p) * cos (p * π)) (p * x^(p-1)) x,
{ convert ((has_deriv_at_exp _).comp x ((has_deriv_at_log (ne_of_lt h)).mul_const p)).mul_const _
using 1,
field_simp [rpow_def_of_neg h, mul_sub, exp_sub, sub_mul, cos_sub, exp_log_of_neg h, ne_of_lt h],
field_simp [rpow_def_of_neg h, mul_sub, exp_sub, sub_mul, cos_sub, exp_log_of_neg h,
ne_of_lt h],
ring },
apply this.congr_of_eventually_eq,
have : set.Iio (0 : ℝ) ∈ 𝓝 x := mem_nhds_sets is_open_Iio h,
Expand Down Expand Up @@ -1444,7 +1449,7 @@ lemma ennreal.measurable_rpow : measurable (λ p : ℝ≥0∞ × ℝ, p.1 ^ p.2)
begin
refine ennreal.measurable_of_measurable_nnreal_prod _ _,
{ simp_rw ennreal.coe_rpow_def,
refine measurable.ite _ measurable_const
refine measurable.ite _ measurable_const
(measurable_fst.nnreal_rpow measurable_snd).ennreal_coe,
exact measurable_set.inter (measurable_fst (measurable_set_singleton 0))
(measurable_snd measurable_set_Iio), },
Expand Down
3 changes: 2 additions & 1 deletion src/analysis/special_functions/trigonometric.lean
Expand Up @@ -1567,7 +1567,8 @@ begin
{ rw [angle_eq_iff_two_pi_dvd_sub, ←eq_sub_iff_add_eq, ←coe_sub, angle_eq_iff_two_pi_dvd_sub],
rintro (⟨k, H⟩ | ⟨k, H⟩),
rw [← sub_eq_zero_iff_eq, sin_sub_sin, H, mul_assoc 2 π k,
mul_div_cancel_left _ (@two_ne_zero ℝ _ _), mul_comm π _, sin_int_mul_pi, mul_zero, zero_mul],
mul_div_cancel_left _ (@two_ne_zero ℝ _ _), mul_comm π _, sin_int_mul_pi, mul_zero,
zero_mul],
have H' : θ + ψ = (2 * k) * π + π := by rwa [←sub_add, sub_add_eq_add_sub, sub_eq_iff_eq_add,
mul_assoc, mul_comm π _, ←mul_assoc] at H,
rw [← sub_eq_zero_iff_eq, sin_sub_sin, H', add_div, mul_assoc 2 _ π,
Expand Down
3 changes: 2 additions & 1 deletion src/analysis/specific_limits.lean
Expand Up @@ -81,7 +81,8 @@ lemma tendsto_pow_at_top_nhds_0_of_lt_1 {𝕜 : Type*} [linear_ordered_field
[topological_space 𝕜] [order_topology 𝕜] {r : 𝕜} (h₁ : 0 ≤ r) (h₂ : r < 1) :
tendsto (λn:ℕ, r^n) at_top (𝓝 0) :=
h₁.eq_or_lt.elim
(assume : 0 = r, (tendsto_add_at_top_iff_nat 1).mp $ by simp [pow_succ, ← this, tendsto_const_nhds])
(assume : 0 = r,
(tendsto_add_at_top_iff_nat 1).mp $ by simp [pow_succ, ← this, tendsto_const_nhds])
(assume : 0 < r,
have tendsto (λn, (r⁻¹ ^ n)⁻¹) at_top (𝓝 0),
from tendsto_inv_at_top_zero.comp
Expand Down
3 changes: 2 additions & 1 deletion src/computability/turing_machine.lean
Expand Up @@ -66,7 +66,8 @@ blanks (`default Γ`) to the end of `l₁`. -/
def blank_extends {Γ} [inhabited Γ] (l₁ l₂ : list Γ) : Prop :=
∃ n, l₂ = l₁ ++ list.repeat (default Γ) n

@[refl] theorem blank_extends.refl {Γ} [inhabited Γ] (l : list Γ) : blank_extends l l := ⟨0, by simp⟩
@[refl] theorem blank_extends.refl {Γ} [inhabited Γ] (l : list Γ) : blank_extends l l :=
0, by simp⟩

@[trans] theorem blank_extends.trans {Γ} [inhabited Γ] {l₁ l₂ l₃ : list Γ} :
blank_extends l₁ l₂ → blank_extends l₂ l₃ → blank_extends l₁ l₃ :=
Expand Down
3 changes: 2 additions & 1 deletion src/control/basic.lean
Expand Up @@ -190,7 +190,8 @@ instance : is_lawful_monad (sum.{v u} e) :=

end sum

class is_comm_applicative (m : Type* → Type*) [applicative m] extends is_lawful_applicative m : Prop :=
class is_comm_applicative (m : Type* → Type*) [applicative m] extends is_lawful_applicative m :
Prop :=
(commutative_prod : ∀{α β} (a : m α) (b : m β), prod.mk <$> a <*> b = (λb a, (a, b)) <$> b <*> a)

open functor
Expand Down
3 changes: 2 additions & 1 deletion src/control/bitraversable/instances.lean
Expand Up @@ -111,7 +111,8 @@ instance [is_lawful_traversable F] [is_lawful_traversable G] [is_lawful_bitrave
is_lawful_bitraversable (bicompl t F G) :=
begin
constructor; introsI;
simp [bitraverse,bicompl.bitraverse,bimap,traverse_id,bitraverse_id_id,comp_bitraverse] with functor_norm,
simp [bitraverse, bicompl.bitraverse, bimap, traverse_id, bitraverse_id_id, comp_bitraverse]
with functor_norm,
{ simp [traverse_eq_map_id',bitraverse_eq_bimap_id], },
{ revert x, dunfold bicompl,
simp [binaturality,naturality_pf] }
Expand Down

0 comments on commit abb3121

Please sign in to comment.