1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: measurable_deriv
File: Mathlib/Analysis/Calculus/FDeriv/Measurable.lean

tactic: simpa only [fderiv_deriv] using measurable_fderiv_apply_const 𝕜 f 1
state_before: 𝕜 : Type u_1
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedSpace 𝕜 F
f✝ : E → F
K : Set (E →L[𝕜] F)
inst✝⁶ : MeasurableSpace E
inst✝⁵ : OpensMeasurableSpace E
inst✝⁴ : CompleteSpace F
inst✝³ : MeasurableSpace 𝕜
inst✝² : OpensMeasurableSpace 𝕜
inst✝¹ : MeasurableSpace F
inst✝ : BorelSpace F
f : 𝕜 → F
⊢ Measurable (deriv f)
state_after: no goals
Theorem: Finset.iSup_biUnion
File: Mathlib/Data/Finset/Lattice.lean

tactic: simp [@iSup_comm _ α, iSup_and]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : CompleteLattice β
inst✝ : DecidableEq α
s : Finset γ
t : γ → Finset α
f : α → β
⊢ ⨆ y ∈ s.biUnion t, f y = ⨆ x ∈ s, ⨆ y ∈ t x, f y
state_after: no goals
Theorem: IsSemiringHom.id
File: Mathlib/Deprecated/Ring.lean

tactic: constructor <;> intros <;> rfl
state_before: α : Type u
β : Type v
inst✝¹ : Semiring α
inst✝ : Semiring β
f : α → β
hf : IsSemiringHom f
x y : α
⊢ IsSemiringHom _root_.id
state_after: no goals
Theorem: ContDiffAt.congr_of_eventuallyEq
File: Mathlib/Analysis/Calculus/ContDiff/Defs.lean

tactic: rwa [nhdsWithin_univ]
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
h : ContDiffAt 𝕜 n f x
hg : f₁ =ᶠ[𝓝 x] f
⊢ f₁ =ᶠ[𝓝[univ] x] f
state_after: no goals
Theorem: TopCat.embedding_prod_map
File: Mathlib/Topology/Category/TopCat/Limits/Products.lean

tactic: haveI := (TopCat.mono_iff_injective _).mpr hf.inj
state_before: J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Embedding ⇑f
hg : Embedding ⇑g
⊢ Function.Injective ⇑(prod.map f g)
state_after: J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Embedding ⇑f
hg : Embedding ⇑g
this : Mono f
⊢ Function.Injective ⇑(prod.map f g)

tactic: haveI := (TopCat.mono_iff_injective _).mpr hg.inj
state_before: J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Embedding ⇑f
hg : Embedding ⇑g
this : Mono f
⊢ Function.Injective ⇑(prod.map f g)
state_after: J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Embedding ⇑f
hg : Embedding ⇑g
this✝ : Mono f
this : Mono g
⊢ Function.Injective ⇑(prod.map f g)

tactic: exact (TopCat.mono_iff_injective _).mp inferInstance
state_before: J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Embedding ⇑f
hg : Embedding ⇑g
this✝ : Mono f
this : Mono g
⊢ Function.Injective ⇑(prod.map f g)
state_after: no goals
Theorem: MeasureTheory.Filtration.adapted_natural
File: Mathlib/Probability/Process/Adapted.lean

tactic: intro i
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝³ : TopologicalSpace β
inst✝² : Preorder ι
u✝ v : ι → Ω → β
f : Filtration ι m
inst✝¹ : MetrizableSpace β
mβ : MeasurableSpace β
inst✝ : BorelSpace β
u : ι → Ω → β
hum : ∀ (i : ι), StronglyMeasurable (u i)
⊢ Adapted (natural u hum) u
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝³ : TopologicalSpace β
inst✝² : Preorder ι
u✝ v : ι → Ω → β
f : Filtration ι m
inst✝¹ : MetrizableSpace β
mβ : MeasurableSpace β
inst✝ : BorelSpace β
u : ι → Ω → β
hum : ∀ (i : ι), StronglyMeasurable (u i)
i : ι
⊢ StronglyMeasurable (u i)

tactic: rw [stronglyMeasurable_iff_measurable_separable]
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝³ : TopologicalSpace β
inst✝² : Preorder ι
u✝ v : ι → Ω → β
f : Filtration ι m
inst✝¹ : MetrizableSpace β
mβ : MeasurableSpace β
inst✝ : BorelSpace β
u : ι → Ω → β
hum : ∀ (i : ι), StronglyMeasurable (u i)
i : ι
⊢ StronglyMeasurable (u i)
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝³ : TopologicalSpace β
inst✝² : Preorder ι
u✝ v : ι → Ω → β
f : Filtration ι m
inst✝¹ : MetrizableSpace β
mβ : MeasurableSpace β
inst✝ : BorelSpace β
u : ι → Ω → β
hum : ∀ (i : ι), StronglyMeasurable (u i)
i : ι
⊢ Measurable (u i) ∧ IsSeparable (Set.range (u i))

tactic: exact ⟨measurable_iff_comap_le.2 le_rfl, (hum i).isSeparable_range⟩
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝³ : TopologicalSpace β
inst✝² : Preorder ι
u✝ v : ι → Ω → β
f : Filtration ι m
inst✝¹ : MetrizableSpace β
mβ : MeasurableSpace β
inst✝ : BorelSpace β
u : ι → Ω → β
hum : ∀ (i : ι), StronglyMeasurable (u i)
i : ι
⊢ Measurable (u i) ∧ IsSeparable (Set.range (u i))
state_after: no goals
Theorem: NumberField.RingOfIntegers.not_isField
File: Mathlib/NumberTheory/NumberField/Basic.lean

tactic: have h_inj : Function.Injective (algebraMap ℤ (𝓞 K)) := RingHom.injective_int (algebraMap ℤ (𝓞 K))
state_before: K : Type u_1
L : Type u_2
inst✝¹ : Field K
inst✝ : Field L
nf : NumberField K
⊢ ¬IsField (𝓞 K)
state_after: K : Type u_1
L : Type u_2
inst✝¹ : Field K
inst✝ : Field L
nf : NumberField K
h_inj : Injective ⇑(algebraMap ℤ (𝓞 K))
⊢ ¬IsField (𝓞 K)

tactic: intro hf
state_before: K : Type u_1
L : Type u_2
inst✝¹ : Field K
inst✝ : Field L
nf : NumberField K
h_inj : Injective ⇑(algebraMap ℤ (𝓞 K))
⊢ ¬IsField (𝓞 K)
state_after: K : Type u_1
L : Type u_2
inst✝¹ : Field K
inst✝ : Field L
nf : NumberField K
h_inj : Injective ⇑(algebraMap ℤ (𝓞 K))
hf : IsField (𝓞 K)
⊢ False

tactic: exact Int.not_isField
  (((IsIntegralClosure.isIntegral_algebra ℤ K).isField_iff_isField h_inj).mpr hf)
state_before: K : Type u_1
L : Type u_2
inst✝¹ : Field K
inst✝ : Field L
nf : NumberField K
h_inj : Injective ⇑(algebraMap ℤ (𝓞 K))
hf : IsField (𝓞 K)
⊢ False
state_after: no goals
Theorem: Set.mulIndicator_diff'
File: Mathlib/Algebra/Group/Indicator.lean

tactic: rw [mulIndicator_diff h, div_eq_mul_inv]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
G : Type u_6
inst✝ : Group G
s t : Set α
f✝ g : α → G
a : α
h : s ⊆ t
f : α → G
⊢ (t \ s).mulIndicator f = t.mulIndicator f / s.mulIndicator f
state_after: no goals
Theorem: add_tsub_add_eq_tsub_left
File: Mathlib/Algebra/Order/Sub/Defs.lean

tactic: rw [add_comm a b, add_comm a c, add_tsub_add_eq_tsub_right]
state_before: α : Type u_1
β : Type u_2
inst✝⁵ : PartialOrder α
inst✝⁴ : AddCommSemigroup α
inst✝³ : Sub α
inst✝² : OrderedSub α
a✝ b✝ c✝ d : α
inst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a b c : α
⊢ a + b - (a + c) = b - c
state_after: no goals
Theorem: Filter.HasBasis.equicontinuousWithinAt_iff
File: Mathlib/Topology/UniformSpace/Equicontinuity.lean

tactic: rw [equicontinuousWithinAt_iff_continuousWithinAt, ContinuousWithinAt,
  hX.tendsto_iff (UniformFun.hasBasis_nhds_of_basis ι α _ hα)]
state_before: ι : Type u_1
κ : Type u_2
X : Type u_3
X' : Type u_4
Y : Type u_5
Z : Type u_6
α : Type u_7
α' : Type u_8
β : Type u_9
β' : Type u_10
γ : Type u_11
𝓕 : Type u_12
tX : TopologicalSpace X
tY : TopologicalSpace Y
tZ : TopologicalSpace Z
uα : UniformSpace α
uβ : UniformSpace β
uγ : UniformSpace γ
κ₁ : Type u_13
κ₂ : Type u_14
p₁ : κ₁ → Prop
s₁ : κ₁ → Set X
p₂ : κ₂ → Prop
s₂ : κ₂ → Set (α × α)
F : ι → X → α
S : Set X
x₀ : X
hX : (𝓝[S] x₀).HasBasis p₁ s₁
hα : (𝓤 α).HasBasis p₂ s₂
⊢ EquicontinuousWithinAt F S x₀ ↔ ∀ (k₂ : κ₂), p₂ k₂ → ∃ k₁, p₁ k₁ ∧ ∀ x ∈ s₁ k₁, ∀ (i : ι), (F i x₀, F i x) ∈ s₂ k₂
state_after: ι : Type u_1
κ : Type u_2
X : Type u_3
X' : Type u_4
Y : Type u_5
Z : Type u_6
α : Type u_7
α' : Type u_8
β : Type u_9
β' : Type u_10
γ : Type u_11
𝓕 : Type u_12
tX : TopologicalSpace X
tY : TopologicalSpace Y
tZ : TopologicalSpace Z
uα : UniformSpace α
uβ : UniformSpace β
uγ : UniformSpace γ
κ₁ : Type u_13
κ₂ : Type u_14
p₁ : κ₁ → Prop
s₁ : κ₁ → Set X
p₂ : κ₂ → Prop
s₂ : κ₂ → Set (α × α)
F : ι → X → α
S : Set X
x₀ : X
hX : (𝓝[S] x₀).HasBasis p₁ s₁
hα : (𝓤 α).HasBasis p₂ s₂
⊢ (∀ (ib : κ₂),
      p₂ ib →
        ∃ ia,
          p₁ ia ∧
            ∀ x ∈ s₁ ia,
              (⇑UniformFun.ofFun ∘ swap F) x ∈
                {g | ((⇑UniformFun.ofFun ∘ swap F) x₀, g) ∈ UniformFun.gen ι α (s₂ ib)}) ↔
    ∀ (k₂ : κ₂), p₂ k₂ → ∃ k₁, p₁ k₁ ∧ ∀ x ∈ s₁ k₁, ∀ (i : ι), (F i x₀, F i x) ∈ s₂ k₂

tactic: rfl
state_before: ι : Type u_1
κ : Type u_2
X : Type u_3
X' : Type u_4
Y : Type u_5
Z : Type u_6
α : Type u_7
α' : Type u_8
β : Type u_9
β' : Type u_10
γ : Type u_11
𝓕 : Type u_12
tX : TopologicalSpace X
tY : TopologicalSpace Y
tZ : TopologicalSpace Z
uα : UniformSpace α
uβ : UniformSpace β
uγ : UniformSpace γ
κ₁ : Type u_13
κ₂ : Type u_14
p₁ : κ₁ → Prop
s₁ : κ₁ → Set X
p₂ : κ₂ → Prop
s₂ : κ₂ → Set (α × α)
F : ι → X → α
S : Set X
x₀ : X
hX : (𝓝[S] x₀).HasBasis p₁ s₁
hα : (𝓤 α).HasBasis p₂ s₂
⊢ (∀ (ib : κ₂),
      p₂ ib →
        ∃ ia,
          p₁ ia ∧
            ∀ x ∈ s₁ ia,
              (⇑UniformFun.ofFun ∘ swap F) x ∈
                {g | ((⇑UniformFun.ofFun ∘ swap F) x₀, g) ∈ UniformFun.gen ι α (s₂ ib)}) ↔
    ∀ (k₂ : κ₂), p₂ k₂ → ∃ k₁, p₁ k₁ ∧ ∀ x ∈ s₁ k₁, ∀ (i : ι), (F i x₀, F i x) ∈ s₂ k₂
state_after: no goals
Theorem: Nat.cast_inv_le_one
File: Mathlib/Data/Nat/Cast/Field.lean

tactic: simp
state_before: α : Type u_1
inst✝ : LinearOrderedSemifield α
⊢ (↑0)⁻¹ ≤ 1
state_after: no goals

tactic: simp [Nat.cast_nonneg]
state_before: α : Type u_1
inst✝ : LinearOrderedSemifield α
n : ℕ
⊢ 1 ≤ ↑(n + 1)
state_after: no goals
Theorem: SimpleGraph.Connected.ofBoxProdLeft
File: Mathlib/Combinatorics/SimpleGraph/Prod.lean

tactic: haveI := (nonempty_prod.1 h.nonempty).1
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
h : (G □ H).Connected
⊢ G.Connected
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
h : (G □ H).Connected
this : Nonempty α
⊢ G.Connected

tactic: haveI := (nonempty_prod.1 h.nonempty).2
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
h : (G □ H).Connected
this : Nonempty α
⊢ G.Connected
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
h : (G □ H).Connected
this✝ : Nonempty α
this : Nonempty β
⊢ G.Connected

tactic: exact ⟨h.preconnected.ofBoxProdLeft⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
h : (G □ H).Connected
this✝ : Nonempty α
this : Nonempty β
⊢ G.Connected
state_after: no goals
Theorem: Int.mul_eq_one_iff_eq_one_or_neg_one
File: Mathlib/Algebra/Group/Int.lean

tactic: refine ⟨eq_one_or_neg_one_of_mul_eq_one', fun h ↦ Or.elim h (fun H ↦ ?_) fun H ↦ ?_⟩ <;>
  obtain ⟨rfl, rfl⟩ := H <;> rfl
state_before: u v : ℤ
⊢ u * v = 1 ↔ u = 1 ∧ v = 1 ∨ u = -1 ∧ v = -1
state_after: no goals
Theorem: Basis.index_nonempty
File: Mathlib/LinearAlgebra/Basis.lean

tactic: obtain ⟨x, y, ne⟩ : ∃ x y : M, x ≠ y := Nontrivial.exists_pair_ne
state_before: ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : AddCommMonoid M'
inst✝¹ : Module R M'
b✝ b₁ : Basis ι R M
i : ι
c : R
x : M
b : Basis ι R M
inst✝ : Nontrivial M
⊢ Nonempty ι
state_after: case intro.intro
ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : AddCommMonoid M'
inst✝¹ : Module R M'
b✝ b₁ : Basis ι R M
i : ι
c : R
x✝ : M
b : Basis ι R M
inst✝ : Nontrivial M
x y : M
ne : x ≠ y
⊢ Nonempty ι

tactic: obtain ⟨i, _⟩ := not_forall.mp (mt b.ext_elem_iff.2 ne)
state_before: case intro.intro
ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : AddCommMonoid M'
inst✝¹ : Module R M'
b✝ b₁ : Basis ι R M
i : ι
c : R
x✝ : M
b : Basis ι R M
inst✝ : Nontrivial M
x y : M
ne : x ≠ y
⊢ Nonempty ι
state_after: case intro.intro.intro
ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : AddCommMonoid M'
inst✝¹ : Module R M'
b✝ b₁ : Basis ι R M
i✝ : ι
c : R
x✝ : M
b : Basis ι R M
inst✝ : Nontrivial M
x y : M
ne : x ≠ y
i : ι
h✝ : ¬(b.repr x) i = (b.repr y) i
⊢ Nonempty ι

tactic: exact ⟨i⟩
state_before: case intro.intro.intro
ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : AddCommMonoid M'
inst✝¹ : Module R M'
b✝ b₁ : Basis ι R M
i✝ : ι
c : R
x✝ : M
b : Basis ι R M
inst✝ : Nontrivial M
x y : M
ne : x ≠ y
i : ι
h✝ : ¬(b.repr x) i = (b.repr y) i
⊢ Nonempty ι
state_after: no goals
Theorem: Polynomial.roots_X_pow_char_sub_C
File: Mathlib/FieldTheory/Perfect.lean

tactic: have H := roots_X_pow_char_pow_sub_C (p := p) (n := 1) (y := y)
state_before: R : Type u_1
inst✝³ : CommRing R
inst✝² : IsDomain R
p n : ℕ
inst✝¹ : ExpChar R p
f : R[X]
inst✝ : PerfectRing R p
y : R
⊢ (X ^ p - C y).roots = p • {(frobeniusEquiv R p).symm y}
state_after: R : Type u_1
inst✝³ : CommRing R
inst✝² : IsDomain R
p n : ℕ
inst✝¹ : ExpChar R p
f : R[X]
inst✝ : PerfectRing R p
y : R
H : (X ^ p ^ 1 - C y).roots = p ^ 1 • {(iterateFrobeniusEquiv R p 1).symm y}
⊢ (X ^ p - C y).roots = p • {(frobeniusEquiv R p).symm y}

tactic: rwa [pow_one, iterateFrobeniusEquiv_one] at H
state_before: R : Type u_1
inst✝³ : CommRing R
inst✝² : IsDomain R
p n : ℕ
inst✝¹ : ExpChar R p
f : R[X]
inst✝ : PerfectRing R p
y : R
H : (X ^ p ^ 1 - C y).roots = p ^ 1 • {(iterateFrobeniusEquiv R p 1).symm y}
⊢ (X ^ p - C y).roots = p • {(frobeniusEquiv R p).symm y}
state_after: no goals
Theorem: PNat.factorMultiset_ofPrime
File: Mathlib/Data/PNat/Factors.lean

tactic: apply factorMultisetEquiv.symm.injective
state_before: p : Nat.Primes
⊢ (↑p).factorMultiset = PrimeMultiset.ofPrime p
state_after: case a
p : Nat.Primes
⊢ factorMultisetEquiv.symm (↑p).factorMultiset = factorMultisetEquiv.symm (PrimeMultiset.ofPrime p)

tactic: change (p : ℕ+).factorMultiset.prod = (PrimeMultiset.ofPrime p).prod
state_before: case a
p : Nat.Primes
⊢ factorMultisetEquiv.symm (↑p).factorMultiset = factorMultisetEquiv.symm (PrimeMultiset.ofPrime p)
state_after: case a
p : Nat.Primes
⊢ (↑p).factorMultiset.prod = (PrimeMultiset.ofPrime p).prod

tactic: rw [(p : ℕ+).prod_factorMultiset, PrimeMultiset.prod_ofPrime]
state_before: case a
p : Nat.Primes
⊢ (↑p).factorMultiset.prod = (PrimeMultiset.ofPrime p).prod
state_after: no goals
Theorem: EuclideanGeometry.oangle_self_right
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean

tactic: simp [oangle]
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ : P
⊢ ∡ p₁ p₂ p₂ = 0
state_after: no goals
Theorem: nndist_vsub_vsub_le
File: Mathlib/Analysis/Normed/Group/AddTorsor.lean

tactic: simp only [← NNReal.coe_le_coe, NNReal.coe_add, ← dist_nndist, dist_vsub_vsub_le]
state_before: α : Type u_1
V : Type u_2
P : Type u_3
W : Type u_4
Q : Type u_5
inst✝⁵ : SeminormedAddCommGroup V
inst✝⁴ : PseudoMetricSpace P
inst✝³ : NormedAddTorsor V P
inst✝² : NormedAddCommGroup W
inst✝¹ : MetricSpace Q
inst✝ : NormedAddTorsor W Q
p₁ p₂ p₃ p₄ : P
⊢ nndist (p₁ -ᵥ p₂) (p₃ -ᵥ p₄) ≤ nndist p₁ p₃ + nndist p₂ p₄
state_after: no goals
Theorem: ConcaveOn.antitoneOn_derivWithin
File: Mathlib/Analysis/Convex/Deriv.lean

tactic: intro x hx y hy hxy
state_before: S : Set ℝ
f : ℝ → ℝ
x y f' : ℝ
hfc : ConcaveOn ℝ S f
hfd : DifferentiableOn ℝ f S
⊢ AntitoneOn (derivWithin f S) S
state_after: S : Set ℝ
f : ℝ → ℝ
x✝ y✝ f' : ℝ
hfc : ConcaveOn ℝ S f
hfd : DifferentiableOn ℝ f S
x : ℝ
hx : x ∈ S
y : ℝ
hy : y ∈ S
hxy : x ≤ y
⊢ derivWithin f S y ≤ derivWithin f S x

tactic: rcases eq_or_lt_of_le hxy with rfl | hxy'
state_before: S : Set ℝ
f : ℝ → ℝ
x✝ y✝ f' : ℝ
hfc : ConcaveOn ℝ S f
hfd : DifferentiableOn ℝ f S
x : ℝ
hx : x ∈ S
y : ℝ
hy : y ∈ S
hxy : x ≤ y
⊢ derivWithin f S y ≤ derivWithin f S x
state_after: case inl
S : Set ℝ
f : ℝ → ℝ
x✝ y f' : ℝ
hfc : ConcaveOn ℝ S f
hfd : DifferentiableOn ℝ f S
x : ℝ
hx hy : x ∈ S
hxy : x ≤ x
⊢ derivWithin f S x ≤ derivWithin f S x

case inr
S : Set ℝ
f : ℝ → ℝ
x✝ y✝ f' : ℝ
hfc : ConcaveOn ℝ S f
hfd : DifferentiableOn ℝ f S
x : ℝ
hx : x ∈ S
y : ℝ
hy : y ∈ S
hxy : x ≤ y
hxy' : x < y
⊢ derivWithin f S y ≤ derivWithin f S x

tactic: exact (hfc.derivWithin_le_slope hx hy hxy' (hfd y hy)).trans
  (hfc.slope_le_derivWithin hx hy hxy' (hfd x hx))
state_before: case inr
S : Set ℝ
f : ℝ → ℝ
x✝ y✝ f' : ℝ
hfc : ConcaveOn ℝ S f
hfd : DifferentiableOn ℝ f S
x : ℝ
hx : x ∈ S
y : ℝ
hy : y ∈ S
hxy : x ≤ y
hxy' : x < y
⊢ derivWithin f S y ≤ derivWithin f S x
state_after: no goals

tactic: rfl
state_before: case inl
S : Set ℝ
f : ℝ → ℝ
x✝ y f' : ℝ
hfc : ConcaveOn ℝ S f
hfd : DifferentiableOn ℝ f S
x : ℝ
hx hy : x ∈ S
hxy : x ≤ x
⊢ derivWithin f S x ≤ derivWithin f S x
state_after: no goals
Theorem: Quaternion.normSq_exp
File: Mathlib/Analysis/NormedSpace/QuaternionExponential.lean

tactic: rw [exp_eq]
state_before: q : ℍ
⊢ normSq (exp ℝ q) = normSq (exp ℝ q.re • (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im))
state_after: no goals

tactic: rw [normSq_smul]
state_before: q : ℍ
⊢ normSq (exp ℝ q.re • (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im)) =
    exp ℝ q.re ^ 2 * normSq (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im)
state_after: no goals

tactic: congr 1
state_before: q : ℍ
⊢ exp ℝ q.re ^ 2 * normSq (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im) =
    exp ℝ q.re ^ 2 * (Real.cos ‖q.im‖ ^ 2 + Real.sin ‖q.im‖ ^ 2)
state_after: case e_a
q : ℍ
⊢ normSq (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im) = Real.cos ‖q.im‖ ^ 2 + Real.sin ‖q.im‖ ^ 2

tactic: obtain hv | hv := eq_or_ne ‖q.im‖ 0
state_before: case e_a
q : ℍ
⊢ normSq (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im) = Real.cos ‖q.im‖ ^ 2 + Real.sin ‖q.im‖ ^ 2
state_after: case e_a.inl
q : ℍ
hv : ‖q.im‖ = 0
⊢ normSq (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im) = Real.cos ‖q.im‖ ^ 2 + Real.sin ‖q.im‖ ^ 2

case e_a.inr
q : ℍ
hv : ‖q.im‖ ≠ 0
⊢ normSq (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im) = Real.cos ‖q.im‖ ^ 2 + Real.sin ‖q.im‖ ^ 2

tactic: rw [normSq_add, normSq_smul, star_smul, coe_mul_eq_smul, smul_re, smul_re, star_re, im_re,
  smul_zero, smul_zero, mul_zero, add_zero, div_pow, normSq_coe,
  normSq_eq_norm_mul_self, ← sq, div_mul_cancel₀ _ (pow_ne_zero _ hv)]
state_before: case e_a.inr
q : ℍ
hv : ‖q.im‖ ≠ 0
⊢ normSq (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im) = Real.cos ‖q.im‖ ^ 2 + Real.sin ‖q.im‖ ^ 2
state_after: no goals

tactic: simp [hv]
state_before: case e_a.inl
q : ℍ
hv : ‖q.im‖ = 0
⊢ normSq (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im) = Real.cos ‖q.im‖ ^ 2 + Real.sin ‖q.im‖ ^ 2
state_after: no goals

tactic: rw [Real.cos_sq_add_sin_sq, mul_one]
state_before: q : ℍ
⊢ exp ℝ q.re ^ 2 * (Real.cos ‖q.im‖ ^ 2 + Real.sin ‖q.im‖ ^ 2) = exp ℝ q.re ^ 2
state_after: no goals
Theorem: Stream'.eta
File: Mathlib/Data/Stream/Init.lean

tactic: cases i <;> rfl
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
i : ℕ
⊢ (s.head :: s.tail) i = s i
state_after: no goals
Theorem: Multiset.toEmbedding_coeEquiv_trans
File: Mathlib/Data/Multiset/Fintype.lean

tactic: ext <;> rfl
state_before: α : Type u_1
inst✝ : DecidableEq α
m✝ m : Multiset α
⊢ m.coeEquiv.toEmbedding.trans (Function.Embedding.subtype fun x => x ∈ m.toEnumFinset) = m.coeEmbedding
state_after: no goals
Theorem: CategoryTheory.ShortComplex.leftRightHomologyComparison'_eq_leftHomologpMap'_comp_iso_hom_comp_rightHomologyMap'
File: Mathlib/Algebra/Homology/ShortComplex/Homology.lean

tactic: simpa only [h.leftRightHomologyComparison'_eq] using
  leftRightHomologyComparison'_compatibility h₁ h.left h₂ h.right
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : S₁.HomologyData
h₂✝ : S₂.HomologyData
h : S.HomologyData
h₁ : S.LeftHomologyData
h₂ : S.RightHomologyData
⊢ leftRightHomologyComparison' h₁ h₂ = leftHomologyMap' (𝟙 S) h₁ h.left ≫ h.iso.hom ≫ rightHomologyMap' (𝟙 S) h.right h₂
state_after: no goals
Theorem: CategoryTheory.Triangulated.Localization.isTriangulated
File: Mathlib/CategoryTheory/Localization/Triangulated.lean

tactic: have := essSurj_mapComposableArrows L W 2
state_before: C : Type u_1
D : Type u_2
inst✝¹⁸ : Category.{u_4, u_1} C
inst✝¹⁷ : Category.{u_3, u_2} D
L : C ⥤ D
inst✝¹⁶ : HasShift C ℤ
inst✝¹⁵ : Preadditive C
inst✝¹⁴ : HasZeroObject C
inst✝¹³ : ∀ (n : ℤ), (shiftFunctor C n).Additive
inst✝¹² : Pretriangulated C
inst✝¹¹ : HasShift D ℤ
inst✝¹⁰ : L.CommShift ℤ
W : MorphismProperty C
inst✝⁹ : L.IsLocalization W
inst✝⁸ : W.IsCompatibleWithTriangulation
inst✝⁷ : W.HasLeftCalculusOfFractions
inst✝⁶ : Preadditive D
inst✝⁵ : HasZeroObject D
inst✝⁴ : ∀ (n : ℤ), (shiftFunctor D n).Additive
inst✝³ : L.Additive
inst✝² : Pretriangulated D
inst✝¹ : L.IsTriangulated
inst✝ : IsTriangulated C
⊢ IsTriangulated D
state_after: C : Type u_1
D : Type u_2
inst✝¹⁸ : Category.{u_4, u_1} C
inst✝¹⁷ : Category.{u_3, u_2} D
L : C ⥤ D
inst✝¹⁶ : HasShift C ℤ
inst✝¹⁵ : Preadditive C
inst✝¹⁴ : HasZeroObject C
inst✝¹³ : ∀ (n : ℤ), (shiftFunctor C n).Additive
inst✝¹² : Pretriangulated C
inst✝¹¹ : HasShift D ℤ
inst✝¹⁰ : L.CommShift ℤ
W : MorphismProperty C
inst✝⁹ : L.IsLocalization W
inst✝⁸ : W.IsCompatibleWithTriangulation
inst✝⁷ : W.HasLeftCalculusOfFractions
inst✝⁶ : Preadditive D
inst✝⁵ : HasZeroObject D
inst✝⁴ : ∀ (n : ℤ), (shiftFunctor D n).Additive
inst✝³ : L.Additive
inst✝² : Pretriangulated D
inst✝¹ : L.IsTriangulated
inst✝ : IsTriangulated C
this : (L.mapComposableArrows 2).EssSurj
⊢ IsTriangulated D

tactic: exact isTriangulated_of_essSurj_mapComposableArrows_two L
state_before: C : Type u_1
D : Type u_2
inst✝¹⁸ : Category.{u_4, u_1} C
inst✝¹⁷ : Category.{u_3, u_2} D
L : C ⥤ D
inst✝¹⁶ : HasShift C ℤ
inst✝¹⁵ : Preadditive C
inst✝¹⁴ : HasZeroObject C
inst✝¹³ : ∀ (n : ℤ), (shiftFunctor C n).Additive
inst✝¹² : Pretriangulated C
inst✝¹¹ : HasShift D ℤ
inst✝¹⁰ : L.CommShift ℤ
W : MorphismProperty C
inst✝⁹ : L.IsLocalization W
inst✝⁸ : W.IsCompatibleWithTriangulation
inst✝⁷ : W.HasLeftCalculusOfFractions
inst✝⁶ : Preadditive D
inst✝⁵ : HasZeroObject D
inst✝⁴ : ∀ (n : ℤ), (shiftFunctor D n).Additive
inst✝³ : L.Additive
inst✝² : Pretriangulated D
inst✝¹ : L.IsTriangulated
inst✝ : IsTriangulated C
this : (L.mapComposableArrows 2).EssSurj
⊢ IsTriangulated D
state_after: no goals
Theorem: Orientation.oangle_smul_left_of_neg
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean

tactic: rw [← neg_neg r, neg_smul, ← smul_neg, o.oangle_smul_left_of_pos _ _ (neg_pos_of_neg hr)]
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
r : ℝ
hr : r < 0
⊢ o.oangle (r • x) y = o.oangle (-x) y
state_after: no goals