tasksource/leandojo huggingface dataset:
Theorem: LinearMap.IsProj.eq_conj_prod_map'
File: Mathlib/LinearAlgebra/Projection.lean

tactic: rw [← LinearMap.comp_assoc, LinearEquiv.eq_comp_toLinearMap_symm]
state_before: R : Type u_1
inst✝⁹ : Ring R
E : Type u_2
inst✝⁸ : AddCommGroup E
inst✝⁷ : Module R E
F : Type ?u.451177
inst✝⁶ : AddCommGroup F
inst✝⁵ : Module R F
G : Type ?u.451693
inst✝⁴ : AddCommGroup G
inst✝³ : Module R G
p q : Submodule R E
S : Type ?u.452656
inst✝² : Semiring S
M : Type ?u.452662
inst✝¹ : AddCommMonoid M
inst✝ : Module S M
m : Submodule S M
f : E →ₗ[R] E
h : IsProj p f
⊢ f =
    comp (↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f))))
      (comp (prodMap id 0) ↑(LinearEquiv.symm (prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))))

tactic: ext x
state_before: R : Type u_1
inst✝⁹ : Ring R
E : Type u_2
inst✝⁸ : AddCommGroup E
inst✝⁷ : Module R E
F : Type ?u.451177
inst✝⁶ : AddCommGroup F
inst✝⁵ : Module R F
G : Type ?u.451693
inst✝⁴ : AddCommGroup G
inst✝³ : Module R G
p q : Submodule R E
S : Type ?u.452656
inst✝² : Semiring S
M : Type ?u.452662
inst✝¹ : AddCommMonoid M
inst✝ : Module S M
m : Submodule S M
f : E →ₗ[R] E
h : IsProj p f
⊢ comp f ↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f))) =
    comp (↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))) (prodMap id 0)

tactic: simp only [coe_prodEquivOfIsCompl, comp_apply, coe_inl, coprod_apply, coeSubtype,
  _root_.map_zero, add_zero, h.map_id x x.2, prodMap_apply, id_apply]
state_before: case hl.h
R : Type u_1
inst✝⁹ : Ring R
E : Type u_2
inst✝⁸ : AddCommGroup E
inst✝⁷ : Module R E
F : Type ?u.451177
inst✝⁶ : AddCommGroup F
inst✝⁵ : Module R F
G : Type ?u.451693
inst✝⁴ : AddCommGroup G
inst✝³ : Module R G
p q : Submodule R E
S : Type ?u.452656
inst✝² : Semiring S
M : Type ?u.452662
inst✝¹ : AddCommMonoid M
inst✝ : Module S M
m : Submodule S M
f : E →ₗ[R] E
h : IsProj p f
x : { x // x ∈ p }
⊢ ↑(comp (comp f ↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))) (inl R { x // x ∈ p } { x // x ∈ ker f })) x =
    ↑(comp (comp (↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))) (prodMap id 0))
          (inl R { x // x ∈ p } { x // x ∈ ker f }))
      x

tactic: simp only [coe_prodEquivOfIsCompl, comp_apply, coe_inr, coprod_apply, _root_.map_zero,
  coeSubtype, zero_add, map_coe_ker, prodMap_apply, zero_apply, add_zero]
state_before: case hr.h
R : Type u_1
inst✝⁹ : Ring R
E : Type u_2
inst✝⁸ : AddCommGroup E
inst✝⁷ : Module R E
F : Type ?u.451177
inst✝⁶ : AddCommGroup F
inst✝⁵ : Module R F
G : Type ?u.451693
inst✝⁴ : AddCommGroup G
inst✝³ : Module R G
p q : Submodule R E
S : Type ?u.452656
inst✝² : Semiring S
M : Type ?u.452662
inst✝¹ : AddCommMonoid M
inst✝ : Module S M
m : Submodule S M
f : E →ₗ[R] E
h : IsProj p f
x : { x // x ∈ ker f }
⊢ ↑(comp (comp f ↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))) (inr R { x // x ∈ p } { x // x ∈ ker f })) x =
    ↑(comp (comp (↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))) (prodMap id 0))
          (inr R { x // x ∈ p } { x // x ∈ ker f }))
      x
Theorem: Set.preimage_image_preimage
File: Mathlib/Data/Set/Image.lean

tactic: rw [image_preimage_eq_inter_range, preimage_inter_range]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.77955
ι : Sort ?u.77958
ι' : Sort ?u.77961
f✝ : ι → α
s✝ t : Set α
f : α → β
s : Set β
⊢ f ⁻¹' (f '' (f ⁻¹' s)) = f ⁻¹' s
Theorem: Matrix.zero_zpow
File: Mathlib/LinearAlgebra/Matrix/ZPow.lean

tactic: rw [zpow_ofNat, zero_pow]
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
n : ℕ
h : ↑n ≠ 0
⊢ 0 ^ ↑n = 0

tactic: refine' lt_of_le_of_ne n.zero_le (Ne.symm _)
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
n : ℕ
h : ↑n ≠ 0
⊢ 0 < n

tactic: simpa using h
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
n : ℕ
h : ↑n ≠ 0
⊢ n ≠ 0

tactic: simp [zero_pow n.zero_lt_succ]
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
n : ℕ
x✝ : -[n+1] ≠ 0
⊢ 0 ^ -[n+1] = 0
Theorem: CategoryTheory.equiv_relation
File: Mathlib/CategoryTheory/IsConnected.lean

tactic: have z : ∀ j : J, r (Classical.arbitrary J) j :=
  induct_on_objects (fun k => r (Classical.arbitrary J) k) (hr.1 (Classical.arbitrary J))
    fun f => ⟨fun t => hr.3 t (h f), fun t => hr.3 t (hr.2 (h f))⟩
state_before: J : Type u₁
inst✝² : Category J
K : Type u₂
inst✝¹ : Category K
inst✝ : IsConnected J
r : J → J → Prop
hr : _root_.Equivalence r
h : ∀ {j₁ j₂ : J}, (j₁ ⟶ j₂) → r j₁ j₂
⊢ ∀ (j₁ j₂ : J), r j₁ j₂

tactic: intros
state_before: J : Type u₁
inst✝² : Category J
K : Type u₂
inst✝¹ : Category K
inst✝ : IsConnected J
r : J → J → Prop
hr : _root_.Equivalence r
h : ∀ {j₁ j₂ : J}, (j₁ ⟶ j₂) → r j₁ j₂
z : ∀ (j : J), r (Classical.arbitrary J) j
⊢ ∀ (j₁ j₂ : J), r j₁ j₂

tactic: apply hr.3 (hr.2 (z _)) (z _)
state_before: J : Type u₁
inst✝² : Category J
K : Type u₂
inst✝¹ : Category K
inst✝ : IsConnected J
r : J → J → Prop
hr : _root_.Equivalence r
h : ∀ {j₁ j₂ : J}, (j₁ ⟶ j₂) → r j₁ j₂
z : ∀ (j : J), r (Classical.arbitrary J) j
j₁✝ j₂✝ : J
⊢ r j₁✝ j₂✝
Theorem: List.Chain'.length_sub_one_le_two_mul_count_bool
File: Mathlib/Data/Bool/Count.lean

tactic: rw [hl.two_mul_count_bool_eq_ite]
state_before: l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) l
b : Bool
⊢ length l - 1 ≤ 2 * count b l

tactic: split_ifs <;> simp [le_tsub_add, Nat.le_succ_of_le]
state_before: l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) l
b : Bool
⊢ length l - 1 ≤ if Even (length l) then length l else if (some b == head? l) = true then length l + 1 else length l - 1
Theorem: OrderIso.trans_refl
File: Mathlib/Order/Hom/Basic.lean

tactic: ext x
state_before: F : Type ?u.83017
α : Type u_1
β : Type u_2
γ : Type ?u.83026
δ : Type ?u.83029
inst✝² : LE α
inst✝¹ : LE β
inst✝ : LE γ
e : α ≃o β
⊢ trans e (refl β) = e

tactic: rfl
state_before: case h.h
F : Type ?u.83017
α : Type u_1
β : Type u_2
γ : Type ?u.83026
δ : Type ?u.83029
inst✝² : LE α
inst✝¹ : LE β
inst✝ : LE γ
e : α ≃o β
x : α
⊢ ↑(trans e (refl β)) x = ↑e x
Theorem: derivedSeries_le_map_derivedSeries
File: Mathlib/GroupTheory/Solvable.lean

tactic: induction' n with n ih
state_before: G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
f : G →* G'
hf : Function.Surjective ↑f
n : ℕ
⊢ derivedSeries G' n ≤ map f (derivedSeries G n)

tactic: exact (map_top_of_surjective f hf).ge
state_before: case zero
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
f : G →* G'
hf : Function.Surjective ↑f
⊢ derivedSeries G' Nat.zero ≤ map f (derivedSeries G Nat.zero)

tactic: exact commutator_le_map_commutator ih ih
state_before: case succ
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
f : G →* G'
hf : Function.Surjective ↑f
n : ℕ
ih : derivedSeries G' n ≤ map f (derivedSeries G n)
⊢ derivedSeries G' (Nat.succ n) ≤ map f (derivedSeries G (Nat.succ n))
Theorem: inv_nonpos
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: simp only [← not_lt, inv_pos]
state_before: ι : Type ?u.6857
α : Type u_1
β : Type ?u.6863
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
⊢ a⁻¹ ≤ 0 ↔ a ≤ 0
Theorem: invOf_pos
File: Mathlib/Algebra/Order/Invertible.lean

tactic: simp only [mul_invOf_self, zero_lt_one]
state_before: α : Type u_1
inst✝¹ : LinearOrderedSemiring α
a : α
inst✝ : Invertible a
⊢ 0 < a * ⅟a
Theorem: MeasureTheory.L1.ofReal_norm_sub_eq_lintegral
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: simp_rw [ofReal_norm_eq_lintegral, ← edist_eq_coe_nnnorm]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1306428
δ : Type ?u.1306431
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : { x // x ∈ Lp β 1 }
⊢ ENNReal.ofReal ‖f - g‖ = ∫⁻ (x : α), ↑‖↑↑f x - ↑↑g x‖₊ ∂μ

tactic: apply lintegral_congr_ae
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1306428
δ : Type ?u.1306431
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : { x // x ∈ Lp β 1 }
⊢ (∫⁻ (x : α), edist (↑↑(f - g) x) 0 ∂μ) = ∫⁻ (x : α), edist (↑↑f x - ↑↑g x) 0 ∂μ

tactic: filter_upwards [Lp.coeFn_sub f g] with _ ha
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.1306428
δ : Type ?u.1306431
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : { x // x ∈ Lp β 1 }
⊢ (fun a => edist (↑↑(f - g) a) 0) =ᵐ[μ] fun a => edist (↑↑f a - ↑↑g a) 0

tactic: simp only [ha, Pi.sub_apply]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.1306428
δ : Type ?u.1306431
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : { x // x ∈ Lp β 1 }
a✝ : α
ha : ↑↑(f - g) a✝ = (↑↑f - ↑↑g) a✝
⊢ edist (↑↑(f - g) a✝) 0 = edist (↑↑f a✝ - ↑↑g a✝) 0
Theorem: MonovaryOn.sum_comp_perm_smul_le_sum_smul
File: Mathlib/Algebra/Order/Rearrangement.lean

tactic: convert hfg.sum_smul_comp_perm_le_sum_smul
  (show { x | σ⁻¹ x ≠ x } ⊆ s by simp only [set_support_inv_eq, hσ]) using 1
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : OrderedSMul α β
s : Finset ι
σ : Perm ι
f : ι → α
g : ι → β
hfg : MonovaryOn f g ↑s
hσ : {x | ↑σ x ≠ x} ⊆ ↑s
⊢ ∑ i in s, f (↑σ i) • g i ≤ ∑ i in s, f i • g i

tactic: exact σ.sum_comp' s (fun i j ↦ f i • g j) hσ
state_before: case h.e'_3
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : OrderedSMul α β
s : Finset ι
σ : Perm ι
f : ι → α
g : ι → β
hfg : MonovaryOn f g ↑s
hσ : {x | ↑σ x ≠ x} ⊆ ↑s
⊢ ∑ i in s, f (↑σ i) • g i = ∑ i in s, f i • g (↑σ⁻¹ i)

tactic: simp only [set_support_inv_eq, hσ]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : OrderedSMul α β
s : Finset ι
σ : Perm ι
f : ι → α
g : ι → β
hfg : MonovaryOn f g ↑s
hσ : {x | ↑σ x ≠ x} ⊆ ↑s
⊢ {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s
Theorem: Set.inter_nonempty_iff_exists_left
File: Mathlib/Data/Set/Basic.lean

tactic: simp_rw [inter_nonempty]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
⊢ Set.Nonempty (s ∩ t) ↔ ∃ x, x ∈ s ∧ x ∈ t
Theorem: right_eq_mul₀
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: rw [eq_comm, mul_eq_right₀ hb]
state_before: α : Type ?u.12533
M₀ : Type u_1
G₀ : Type ?u.12539
M₀' : Type ?u.12542
G₀' : Type ?u.12545
F : Type ?u.12548
F' : Type ?u.12551
inst✝ : CancelMonoidWithZero M₀
a b c : M₀
hb : b ≠ 0
⊢ b = a * b ↔ a = 1
Theorem: Int.le.intro_sub
File: Std/Data/Int/Lemmas.lean

tactic: simp [le_def, h]
state_before: a b : Int
n : Nat
h : b - a = ↑n
⊢ a ≤ b

tactic: constructor
state_before: a b : Int
n : Nat
h : b - a = ↑n
⊢ NonNeg ↑n
Theorem: mul_left_eq_iff_eq_invOf_mul
File: Mathlib/Algebra/Invertible.lean

tactic: rw [← mul_left_inj_of_invertible (c := ⅟c), invOf_mul_self_assoc]
state_before: α : Type u
c a b : α
inst✝¹ : Monoid α
inst✝ : Invertible c
⊢ c * a = b ↔ a = ⅟c * b
Theorem: List.append_of_mem
File: Std/Data/List/Lemmas.lean

tactic: rw [h', cons_append]
state_before: α : Type u_1
a : α
l : List α
b : α
as✝ : List α
h : Mem a as✝
s t : List α
h' : as✝ = s ++ a :: t
⊢ b :: as✝ = b :: s ++ a :: t
Theorem: mul_right_eq_self₀
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: rw [mul_one]
state_before: α : Type ?u.9281
M₀ : Type u_1
G₀ : Type ?u.9287
M₀' : Type ?u.9290
G₀' : Type ?u.9293
F : Type ?u.9296
F' : Type ?u.9299
inst✝ : CancelMonoidWithZero M₀
a b c : M₀
⊢ a * b = a ↔ a * b = a * 1
Theorem: CategoryTheory.Limits.IsImage.isoExt_inv_m
File: Mathlib/CategoryTheory/Limits/Shapes/Images.lean

tactic: simp
state_before: C : Type u
inst✝ : Category C
X Y : C
f : X ⟶ Y
F F' : MonoFactorisation f
hF : IsImage F
hF' : IsImage F'
⊢ (isoExt hF hF').inv ≫ F.m = F'.m
Theorem: cyclesMap_arrow
File: Mathlib/Algebra/Homology/Homology.lean

tactic: simp
state_before: ι : Type u_1
V : Type u
inst✝² : Category V
inst✝¹ : HasZeroMorphisms V
c : ComplexShape ι
C : HomologicalComplex V c
inst✝ : HasKernels V
C₁ C₂ C₃ : HomologicalComplex V c
f✝ f : C₁ ⟶ C₂
i : ι
⊢ cyclesMap f i ≫ Subobject.arrow (cycles C₂ i) = Subobject.arrow (cycles C₁ i) ≫ Hom.f f i
Theorem: Finsupp.equivMapDomain_zero
File: Mathlib/Data/Finsupp/Basic.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.144676
ι : Type ?u.144679
M : Type u_3
M' : Type ?u.144685
N : Type ?u.144688
P : Type ?u.144691
G : Type ?u.144694
H : Type ?u.144697
R : Type ?u.144700
S : Type ?u.144703
inst✝ : Zero M
f : α ≃ β
⊢ equivMapDomain f 0 = 0

tactic: simp only [equivMapDomain_apply, coe_zero, Pi.zero_apply]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.144676
ι : Type ?u.144679
M : Type u_3
M' : Type ?u.144685
N : Type ?u.144688
P : Type ?u.144691
G : Type ?u.144694
H : Type ?u.144697
R : Type ?u.144700
S : Type ?u.144703
inst✝ : Zero M
f : α ≃ β
a✝ : β
⊢ ↑(equivMapDomain f 0) a✝ = ↑0 a✝
Theorem: CircleDeg1Lift.transnumAuxSeq_zero
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: simp [transnumAuxSeq]
state_before: f g : CircleDeg1Lift
⊢ transnumAuxSeq f 0 = ↑f 0
Theorem: iter_deriv_inv
File: Mathlib/Analysis/Calculus/Deriv/ZPow.lean

tactic: simpa only [zpow_neg_one, Int.cast_neg, Int.cast_one] using iter_deriv_zpow (-1) x k
state_before: 𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m : ℤ
k : ℕ
x : 𝕜
⊢ (deriv^[k]) Inv.inv x = (∏ i in Finset.range k, (-1 - ↑i)) * x ^ (-1 - ↑k)
Theorem: List.headI_mul_tail_prod_of_ne_nil
File: Mathlib/Data/List/BigOperators/Basic.lean

tactic: cases l <;> [contradiction; simp]
state_before: ι : Type ?u.69762
α : Type ?u.69765
M : Type u_1
N : Type ?u.69771
P : Type ?u.69774
M₀ : Type ?u.69777
G : Type ?u.69780
R : Type ?u.69783
inst✝³ : Monoid M
inst✝² : Monoid N
inst✝¹ : Monoid P
l✝ l₁ l₂ : List M
a : M
inst✝ : Inhabited M
l : List M
h : l ≠ []
⊢ headI l * prod (tail l) = prod l
Theorem: Polynomial.Monic.pow
File: Mathlib/Data/Polynomial/Monic.lean

tactic: rw [pow_succ]
state_before: R : Type u
S : Type v
a b : R
m n✝ : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : Monic p
n : ℕ
⊢ Monic (p ^ (n + 1))

tactic: exact hp.mul (Monic.pow hp n)
state_before: R : Type u
S : Type v
a b : R
m n✝ : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : Monic p
n : ℕ
⊢ Monic (p * p ^ n)
Theorem: Polynomial.derivative_X_sq
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: rw [derivative_X_pow, Nat.cast_two, pow_one]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
⊢ ↑derivative (X ^ 2) = ↑C 2 * X
Theorem: Real.Angle.two_nsmul_coe_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: simp [← coe_nat_mul_eq_nsmul]
state_before: ⊢ 2 • ↑π = 0
Theorem: Metric.glueDist_triangle_inl_inr_inl
File: Mathlib/Topology/MetricSpace/Gluing.lean

tactic: simp_rw [glueDist, add_add_add_comm _ ε, add_assoc]
state_before: X : Type u
Y : Type v
Z : Type w
inst✝² : MetricSpace X
inst✝¹ : MetricSpace Y
Φ✝ : Z → X
Ψ✝ : Z → Y
ε✝ : ℝ
inst✝ : Nonempty Z
Φ : Z → X
Ψ : Z → Y
ε : ℝ
H : ∀ (p q : Z), abs (dist (Φ p) (Φ q) - dist (Ψ p) (Ψ q)) ≤ 2 * ε
x : X
y : Y
z : X
⊢ glueDist Φ Ψ ε (Sum.inl x) (Sum.inl z) ≤
    glueDist Φ Ψ ε (Sum.inl x) (Sum.inr y) + glueDist Φ Ψ ε (Sum.inr y) (Sum.inl z)

tactic: refine le_ciInf_add fun p => ?_
state_before: X : Type u
Y : Type v
Z : Type w
inst✝² : MetricSpace X
inst✝¹ : MetricSpace Y
Φ✝ : Z → X
Ψ✝ : Z → Y
ε✝ : ℝ
inst✝ : Nonempty Z
Φ : Z → X
Ψ : Z → Y
ε : ℝ
H : ∀ (p q : Z), abs (dist (Φ p) (Φ q) - dist (Ψ p) (Ψ q)) ≤ 2 * ε
x : X
y : Y
z : X
⊢ dist x z ≤ (⨅ (p : Z), dist x (Φ p) + dist y (Ψ p)) + ((⨅ (p : Z), dist z (Φ p) + dist y (Ψ p)) + (ε + ε))

tactic: rw [add_left_comm, add_assoc, ← two_mul]
state_before: X : Type u
Y : Type v
Z : Type w
inst✝² : MetricSpace X
inst✝¹ : MetricSpace Y
Φ✝ : Z → X
Ψ✝ : Z → Y
ε✝ : ℝ
inst✝ : Nonempty Z
Φ : Z → X
Ψ : Z → Y
ε : ℝ
H : ∀ (p q : Z), abs (dist (Φ p) (Φ q) - dist (Ψ p) (Ψ q)) ≤ 2 * ε
x : X
y : Y
z : X
p : Z
⊢ dist x z ≤ dist x (Φ p) + dist y (Ψ p) + ((⨅ (p : Z), dist z (Φ p) + dist y (Ψ p)) + (ε + ε))

tactic: refine le_ciInf_add fun q => ?_
state_before: X : Type u
Y : Type v
Z : Type w
inst✝² : MetricSpace X
inst✝¹ : MetricSpace Y
Φ✝ : Z → X
Ψ✝ : Z → Y
ε✝ : ℝ
inst✝ : Nonempty Z
Φ : Z → X
Ψ : Z → Y
ε : ℝ
H : ∀ (p q : Z), abs (dist (Φ p) (Φ q) - dist (Ψ p) (Ψ q)) ≤ 2 * ε
x : X
y : Y
z : X
p : Z
⊢ dist x z ≤ (⨅ (p : Z), dist z (Φ p) + dist y (Ψ p)) + (dist x (Φ p) + (dist y (Ψ p) + 2 * ε))

tactic: rw [dist_comm z]
state_before: X : Type u
Y : Type v
Z : Type w
inst✝² : MetricSpace X
inst✝¹ : MetricSpace Y
Φ✝ : Z → X
Ψ✝ : Z → Y
ε✝ : ℝ
inst✝ : Nonempty Z
Φ : Z → X
Ψ : Z → Y
ε : ℝ
H : ∀ (p q : Z), abs (dist (Φ p) (Φ q) - dist (Ψ p) (Ψ q)) ≤ 2 * ε
x : X
y : Y
z : X
p q : Z
⊢ dist x z ≤ dist z (Φ q) + dist y (Ψ q) + (dist x (Φ p) + (dist y (Ψ p) + 2 * ε))

tactic: linarith [dist_triangle4 x (Φ p) (Φ q) z, dist_triangle_left (Ψ p) (Ψ q) y, (abs_le.1 (H p q)).2]
state_before: X : Type u
Y : Type v
Z : Type w
inst✝² : MetricSpace X
inst✝¹ : MetricSpace Y
Φ✝ : Z → X
Ψ✝ : Z → Y
ε✝ : ℝ
inst✝ : Nonempty Z
Φ : Z → X
Ψ : Z → Y
ε : ℝ
H : ∀ (p q : Z), abs (dist (Φ p) (Φ q) - dist (Ψ p) (Ψ q)) ≤ 2 * ε
x : X
y : Y
z : X
p q : Z
⊢ dist x z ≤ dist (Φ q) z + dist y (Ψ q) + (dist x (Φ p) + (dist y (Ψ p) + 2 * ε))
Theorem: Polynomial.coeff_inv_units
File: Mathlib/Data/Polynomial/FieldDivision.lean

tactic: rw [eq_C_of_degree_eq_zero (degree_coe_units u), eq_C_of_degree_eq_zero (degree_coe_units u⁻¹),
  coeff_C, coeff_C, inv_eq_one_div]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Field R
p q : R[X]
u : R[X]ˣ
n : ℕ
⊢ (coeff (↑u) n)⁻¹ = coeff (↑u⁻¹) n

tactic: split_ifs
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Field R
p q : R[X]
u : R[X]ˣ
n : ℕ
⊢ (1 / if n = 0 then coeff (↑u) 0 else 0) = if n = 0 then coeff (↑u⁻¹) 0 else 0

tactic: rw [div_eq_iff_mul_eq (coeff_coe_units_zero_ne_zero u), coeff_zero_eq_eval_zero,
    coeff_zero_eq_eval_zero, ← eval_mul, ← Units.val_mul, inv_mul_self]
state_before: case inl
R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Field R
p q : R[X]
u : R[X]ˣ
n : ℕ
h✝ : n = 0
⊢ 1 / coeff (↑u) 0 = coeff (↑u⁻¹) 0

tactic: simp
state_before: case inl
R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Field R
p q : R[X]
u : R[X]ˣ
n : ℕ
h✝ : n = 0
⊢ eval 0 ↑1 = 1

tactic: simp
state_before: case inr
R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Field R
p q : R[X]
u : R[X]ˣ
n : ℕ
h✝ : ¬n = 0
⊢ 1 / 0 = 0
Theorem: Multiset.add_eq_union_iff_disjoint
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp_rw [← inter_eq_zero_iff_disjoint, ext, count_add, count_union, count_inter, count_zero,
  Nat.min_eq_zero_iff, Nat.add_eq_max_iff]
state_before: α : Type u_1
β : Type ?u.504974
γ : Type ?u.504977
inst✝ : DecidableEq α
s t : Multiset α
⊢ s + t = s ∪ t ↔ Disjoint s t
Theorem: MeasureTheory.StronglyMeasurable.measurableSet_eq_fun
File: Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

tactic: borelize (E × E)
state_before: α : Type u_1
β : Type ?u.224536
γ : Type ?u.224539
ι : Type ?u.224542
inst✝² : Countable ι
f✝ g✝ : α → β
m : MeasurableSpace α
E : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : MetrizableSpace E
f g : α → E
hf : StronglyMeasurable f
hg : StronglyMeasurable g
⊢ MeasurableSet {x | f x = g x}

tactic: exact (hf.prod_mk hg).measurable isClosed_diagonal.measurableSet
state_before: α : Type u_1
β : Type ?u.224536
γ : Type ?u.224539
ι : Type ?u.224542
inst✝² : Countable ι
f✝ g✝ : α → β
m : MeasurableSpace α
E : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : MetrizableSpace E
f g : α → E
hf : StronglyMeasurable f
hg : StronglyMeasurable g
this✝¹ : MeasurableSpace (E × E) := borel (E × E)
this✝ : BorelSpace (E × E)
⊢ MeasurableSet {x | f x = g x}
Theorem: MeasurableSpace.DynkinSystem.has_diff
File: Mathlib/MeasureTheory/PiSystem.lean

tactic: apply d.has_compl_iff.1
state_before: α : Type u_1
d : DynkinSystem α
s₁ s₂ : Set α
h₁ : Has d s₁
h₂ : Has d s₂
h : s₂ ⊆ s₁
⊢ Has d (s₁ \ s₂)

tactic: simp [diff_eq, compl_inter]
state_before: α : Type u_1
d : DynkinSystem α
s₁ s₂ : Set α
h₁ : Has d s₁
h₂ : Has d s₂
h : s₂ ⊆ s₁
⊢ Has d ((s₁ \ s₂)ᶜ)

tactic: exact d.has_union (d.has_compl h₁) h₂ (disjoint_compl_left.mono_right h)
state_before: α : Type u_1
d : DynkinSystem α
s₁ s₂ : Set α
h₁ : Has d s₁
h₂ : Has d s₂
h : s₂ ⊆ s₁
⊢ Has d (s₁ᶜ ∪ s₂)
Theorem: CategoryTheory.IsCodetecting.isCoseparating
File: Mathlib/CategoryTheory/Generator.lean

tactic: simpa only [← isSeparating_op_iff, ← isDetecting_op_iff] using IsDetecting.isSeparating
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
inst✝ : HasCoequalizers C
𝒢 : Set C
⊢ IsCodetecting 𝒢 → IsCoseparating 𝒢
Theorem: Real.differentiableWithinAt_arcsin_Ici
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/InverseDeriv.lean

tactic: refine' ⟨_, fun h => (hasDerivWithinAt_arcsin_Ici h).differentiableWithinAt⟩
state_before: x : ℝ
⊢ DifferentiableWithinAt ℝ arcsin (Ici x) x ↔ x ≠ -1

tactic: rintro h rfl
state_before: x : ℝ
⊢ DifferentiableWithinAt ℝ arcsin (Ici x) x → x ≠ -1

tactic: have : sin ∘ arcsin =ᶠ[𝓝[≥] (-1 : ℝ)] id := by
  filter_upwards [Icc_mem_nhdsWithin_Ici ⟨le_rfl, neg_lt_self (zero_lt_one' ℝ)⟩] with x using
    sin_arcsin'
state_before: h : DifferentiableWithinAt ℝ arcsin (Ici (-1)) (-1)
⊢ False

tactic: have := h.hasDerivWithinAt.sin.congr_of_eventuallyEq this.symm (by simp)
state_before: h : DifferentiableWithinAt ℝ arcsin (Ici (-1)) (-1)
this : sin ∘ arcsin =ᶠ[𝓝[Ici (-1)] (-1)] id
⊢ False

tactic: simpa using (uniqueDiffOn_Ici _ _ left_mem_Ici).eq_deriv _ this (hasDerivWithinAt_id _ _)
state_before: h : DifferentiableWithinAt ℝ arcsin (Ici (-1)) (-1)
this✝ : sin ∘ arcsin =ᶠ[𝓝[Ici (-1)] (-1)] id
this : HasDerivWithinAt id (cos (arcsin (-1)) * derivWithin arcsin (Ici (-1)) (-1)) (Ici (-1)) (-1)
⊢ False

tactic: filter_upwards [Icc_mem_nhdsWithin_Ici ⟨le_rfl, neg_lt_self (zero_lt_one' ℝ)⟩] with x using
  sin_arcsin'
state_before: h : DifferentiableWithinAt ℝ arcsin (Ici (-1)) (-1)
⊢ sin ∘ arcsin =ᶠ[𝓝[Ici (-1)] (-1)] id

tactic: simp
state_before: h : DifferentiableWithinAt ℝ arcsin (Ici (-1)) (-1)
this : sin ∘ arcsin =ᶠ[𝓝[Ici (-1)] (-1)] id
⊢ id (-1) = sin (arcsin (-1))
Theorem: List.pmap_prev_eq_rotate_length_sub_one
File: Mathlib/Data/List/Cycle.lean

tactic: apply List.ext_nthLe
state_before: α : Type u_1
inst✝ : DecidableEq α
l : List α
x : α
h : Nodup l
⊢ pmap (prev l) l (_ : ∀ (x : α), x ∈ l → x ∈ l) = rotate l (length l - 1)

tactic: simp
state_before: case hl
α : Type u_1
inst✝ : DecidableEq α
l : List α
x : α
h : Nodup l
⊢ length (pmap (prev l) l (_ : ∀ (x : α), x ∈ l → x ∈ l)) = length (rotate l (length l - 1))

tactic: intro n hn hn'
state_before: case h
α : Type u_1
inst✝ : DecidableEq α
l : List α
x : α
h : Nodup l
⊢ ∀ (n : ℕ) (h₁ : n < length (pmap (prev l) l (_ : ∀ (x : α), x ∈ l → x ∈ l)))
    (h₂ : n < length (rotate l (length l - 1))),
    nthLe (pmap (prev l) l (_ : ∀ (x : α), x ∈ l → x ∈ l)) n h₁ = nthLe (rotate l (length l - 1)) n h₂

tactic: rw [nthLe_rotate, nthLe_pmap, prev_nthLe _ h]
state_before: case h
α : Type u_1
inst✝ : DecidableEq α
l : List α
x : α
h : Nodup l
n : ℕ
hn : n < length (pmap (prev l) l (_ : ∀ (x : α), x ∈ l → x ∈ l))
hn' : n < length (rotate l (length l - 1))
⊢ nthLe (pmap (prev l) l (_ : ∀ (x : α), x ∈ l → x ∈ l)) n hn = nthLe (rotate l (length l - 1)) n hn'
Theorem: Ordinal.one_out_eq
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: simp
state_before: α : Type ?u.186066
β : Type ?u.186069
γ : Type ?u.186072
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
x : (Quotient.out 1).α
⊢ 0 < type fun x x_1 => x < x_1
Theorem: aemeasurable_inv_iff
File: Mathlib/MeasureTheory/Group/Arithmetic.lean

tactic: simpa only [inv_inv] using h.inv
state_before: G✝ : Type ?u.2473457
α : Type u_2
inst✝⁵ : Inv G✝
inst✝⁴ : MeasurableSpace G✝
inst✝³ : MeasurableInv G✝
m : MeasurableSpace α
f✝ : α → G✝
μ : MeasureTheory.Measure α
G : Type u_1
inst✝² : Group G
inst✝¹ : MeasurableSpace G
inst✝ : MeasurableInv G
f : α → G
h : AEMeasurable fun x => (f x)⁻¹
⊢ AEMeasurable f