1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Function.Injective.sameRay_map_iff
File: Mathlib/LinearAlgebra/Ray.lean

tactic: simp only [SameRay, map_zero, ← hf.eq_iff, map_smul]
state_before: R : Type u_1
inst✝¹² : StrictOrderedCommSemiring R
M : Type u_2
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : Module R M
N : Type u_3
inst✝⁹ : AddCommMonoid N
inst✝⁸ : Module R N
ι : Type u_4
inst✝⁷ : DecidableEq ι
x y z : M
S : Type u_5
inst✝⁶ : OrderedCommSemiring S
inst✝⁵ : Algebra S R
inst✝⁴ : Module S M
inst✝³ : SMulPosMono S R
inst✝² : IsScalarTower S R M
a : S
F : Type u_6
inst✝¹ : FunLike F M N
inst✝ : LinearMapClass F R M N
f : F
hf : Function.Injective ⇑f
⊢ SameRay R (f x) (f y) ↔ SameRay R x y
state_after: no goals
Theorem: Polynomial.cyclotomic.monic
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: rw [← map_cyclotomic_int]
state_before: n : ℕ
R : Type u_1
inst✝ : Ring R
⊢ (cyclotomic n R).Monic
state_after: n : ℕ
R : Type u_1
inst✝ : Ring R
⊢ (map (Int.castRingHom R) (cyclotomic n ℤ)).Monic

tactic: exact (int_cyclotomic_spec n).2.2.map _
state_before: n : ℕ
R : Type u_1
inst✝ : Ring R
⊢ (map (Int.castRingHom R) (cyclotomic n ℤ)).Monic
state_after: no goals
Theorem: Nat.le_fib_self
File: Mathlib/Data/Nat/Fib/Basic.lean

tactic: induction' five_le_n with n five_le_n IH
state_before: n : ℕ
five_le_n : 5 ≤ n
⊢ n ≤ fib n
state_after: case refl
n : ℕ
⊢ 5 ≤ fib 5

case step
n✝ n : ℕ
five_le_n : Nat.le 5 n
IH : n ≤ fib n
⊢ n.succ ≤ fib n.succ

tactic: rfl
state_before: case refl
n : ℕ
⊢ 5 ≤ fib 5
state_after: no goals

tactic: rw [succ_le_iff]
state_before: case step
n✝ n : ℕ
five_le_n : Nat.le 5 n
IH : n ≤ fib n
⊢ n.succ ≤ fib n.succ
state_after: case step
n✝ n : ℕ
five_le_n : Nat.le 5 n
IH : n ≤ fib n
⊢ n < fib n.succ

tactic: calc
  n ≤ fib n := IH
  _ < fib (n + 1) := fib_lt_fib_succ (le_trans (by decide) five_le_n)
state_before: case step
n✝ n : ℕ
five_le_n : Nat.le 5 n
IH : n ≤ fib n
⊢ n < fib n.succ
state_after: no goals

tactic: decide
state_before: n✝ n : ℕ
five_le_n : Nat.le 5 n
IH : n ≤ fib n
⊢ 2 ≤ 5
state_after: no goals
Theorem: Nat.count_add'
File: Mathlib/Data/Nat/Count.lean

tactic: rw [add_comm, count_add, add_comm]
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
a b : ℕ
⊢ count p (a + b) = count (fun k => p (k + b)) a + count p b
state_after: p : ℕ → Prop
inst✝ : DecidablePred p
a b : ℕ
⊢ count (fun k => p (b + k)) a + count p b = count (fun k => p (k + b)) a + count p b

tactic: simp_rw [add_comm b]
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
a b : ℕ
⊢ count (fun k => p (b + k)) a + count p b = count (fun k => p (k + b)) a + count p b
state_after: no goals
Theorem: DirichletCharacter.level_one
File: Mathlib/NumberTheory/DirichletCharacter/Basic.lean

tactic: ext
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ✝ : DirichletCharacter R n
χ : DirichletCharacter R 1
⊢ χ = 1
state_after: case h
R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ✝ : DirichletCharacter R n
χ : DirichletCharacter R 1
a✝ : (ZMod 1)ˣ
⊢ χ ↑a✝ = 1 ↑a✝

tactic: simp [units_eq_one]
state_before: case h
R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ✝ : DirichletCharacter R n
χ : DirichletCharacter R 1
a✝ : (ZMod 1)ˣ
⊢ χ ↑a✝ = 1 ↑a✝
state_after: no goals
Theorem: cthickening_ball
File: Mathlib/Analysis/NormedSpace/Pointwise.lean

tactic: rw [← thickening_singleton, cthickening_thickening hε hδ,
    cthickening_singleton _ (add_nonneg hε hδ.le)]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
x✝ y z : E
δ ε : ℝ
hε : 0 ≤ ε
hδ : 0 < δ
x : E
⊢ cthickening ε (Metric.ball x δ) = Metric.closedBall x (ε + δ)
state_after: no goals
Theorem: CategoryTheory.PreGaloisCategory.fiberPullbackEquiv_symm_fst_apply
File: Mathlib/CategoryTheory/Galois/Basic.lean

tactic: simp [fiberPullbackEquiv]
state_before: C : Type u₁
inst✝² : Category.{u₂, u₁} C
inst✝¹ : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝ : FiberFunctor F
X A B : C
f : A ⟶ X
g : B ⟶ X
a : ↑(F.obj A)
b : ↑(F.obj B)
h : F.map f a = F.map g b
⊢ F.map pullback.fst ((fiberPullbackEquiv F f g).symm ⟨(a, b), h⟩) = a
state_after: C : Type u₁
inst✝² : Category.{u₂, u₁} C
inst✝¹ : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝ : FiberFunctor F
X A B : C
f : A ⟶ X
g : B ⟶ X
a : ↑(F.obj A)
b : ↑(F.obj B)
h : F.map f a = F.map g b
⊢ F.map pullback.fst
      ((PreservesPullback.iso (F ⋙ FintypeCat.incl) f g).inv
        ((Types.pullbackIsoPullback (F.map f) (F.map g)).inv ⟨(a, b), h⟩)) =
    a

tactic: change ((Types.pullbackIsoPullback _ _).inv ≫ _ ≫ (F ⋙ FintypeCat.incl).map pullback.fst) _ = _
state_before: C : Type u₁
inst✝² : Category.{u₂, u₁} C
inst✝¹ : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝ : FiberFunctor F
X A B : C
f : A ⟶ X
g : B ⟶ X
a : ↑(F.obj A)
b : ↑(F.obj B)
h : F.map f a = F.map g b
⊢ F.map pullback.fst
      ((PreservesPullback.iso (F ⋙ FintypeCat.incl) f g).inv
        ((Types.pullbackIsoPullback (F.map f) (F.map g)).inv ⟨(a, b), h⟩)) =
    a
state_after: C : Type u₁
inst✝² : Category.{u₂, u₁} C
inst✝¹ : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝ : FiberFunctor F
X A B : C
f : A ⟶ X
g : B ⟶ X
a : ↑(F.obj A)
b : ↑(F.obj B)
h : F.map f a = F.map g b
⊢ ((Types.pullbackIsoPullback (F.map f) (F.map g)).inv ≫
        (PreservesPullback.iso (F ⋙ FintypeCat.incl) f g).inv ≫ (F ⋙ FintypeCat.incl).map pullback.fst)
      ⟨(a, b), h⟩ =
    a

tactic: erw [PreservesPullback.iso_inv_fst, Types.pullbackIsoPullback_inv_fst]
state_before: C : Type u₁
inst✝² : Category.{u₂, u₁} C
inst✝¹ : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝ : FiberFunctor F
X A B : C
f : A ⟶ X
g : B ⟶ X
a : ↑(F.obj A)
b : ↑(F.obj B)
h : F.map f a = F.map g b
⊢ ((Types.pullbackIsoPullback (F.map f) (F.map g)).inv ≫
        (PreservesPullback.iso (F ⋙ FintypeCat.incl) f g).inv ≫ (F ⋙ FintypeCat.incl).map pullback.fst)
      ⟨(a, b), h⟩ =
    a
state_after: no goals
Theorem: Filter.subsingleton_iff_exists_singleton_mem
File: Mathlib/Order/Filter/Subsingleton.lean

tactic: simp only [subsingleton_iff_exists_le_pure, le_pure_iff]
state_before: α : Type u_1
β : Type u_2
l : Filter α
inst✝ : Nonempty α
⊢ l.Subsingleton ↔ ∃ a, {a} ∈ l
state_after: no goals
Theorem: IsAbsoluteValue.abv_sub_le
File: Mathlib/Algebra/Order/AbsoluteValue.lean

tactic: simpa [sub_eq_add_neg, add_assoc] using abv_add abv (a - b) (b - c)
state_before: ι : Type u_1
α : Type u_2
R✝ : Type u_3
S✝ : Type u_4
S : Type u_5
inst✝² : OrderedRing S
R : Type u_6
inst✝¹ : Ring R
abv : R → S
inst✝ : IsAbsoluteValue abv
a b c : R
⊢ abv (a - c) ≤ abv (a - b) + abv (b - c)
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.Y_ne_negY_of_Y_ne'
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: have hy' : P y * Q z ^ 3 - Q y * P z ^ 3 = 0 :=
  (mul_eq_zero.mp <| Y_sub_Y_mul_Y_sub_negY hP hQ hx).resolve_right <| sub_ne_zero_of_ne hy
state_before: R : Type u
inst✝² : CommRing R
W' : Jacobian R
F : Type v
inst✝¹ : Field F
W : Jacobian F
inst✝ : NoZeroDivisors R
P Q : Fin 3 → R
hP : W'.Equation P
hQ : W'.Equation Q
hx : P x * Q z ^ 2 = Q x * P z ^ 2
hy : P y * Q z ^ 3 ≠ W'.negY Q * P z ^ 3
⊢ P y ≠ W'.negY P
state_after: R : Type u
inst✝² : CommRing R
W' : Jacobian R
F : Type v
inst✝¹ : Field F
W : Jacobian F
inst✝ : NoZeroDivisors R
P Q : Fin 3 → R
hP : W'.Equation P
hQ : W'.Equation Q
hx : P x * Q z ^ 2 = Q x * P z ^ 2
hy : P y * Q z ^ 3 ≠ W'.negY Q * P z ^ 3
hy' : P y * Q z ^ 3 - Q y * P z ^ 3 = 0
⊢ P y ≠ W'.negY P

tactic: contrapose! hy
state_before: R : Type u
inst✝² : CommRing R
W' : Jacobian R
F : Type v
inst✝¹ : Field F
W : Jacobian F
inst✝ : NoZeroDivisors R
P Q : Fin 3 → R
hP : W'.Equation P
hQ : W'.Equation Q
hx : P x * Q z ^ 2 = Q x * P z ^ 2
hy : P y * Q z ^ 3 ≠ W'.negY Q * P z ^ 3
hy' : P y * Q z ^ 3 - Q y * P z ^ 3 = 0
⊢ P y ≠ W'.negY P
state_after: R : Type u
inst✝² : CommRing R
W' : Jacobian R
F : Type v
inst✝¹ : Field F
W : Jacobian F
inst✝ : NoZeroDivisors R
P Q : Fin 3 → R
hP : W'.Equation P
hQ : W'.Equation Q
hx : P x * Q z ^ 2 = Q x * P z ^ 2
hy' : P y * Q z ^ 3 - Q y * P z ^ 3 = 0
hy : P y = W'.negY P
⊢ P y * Q z ^ 3 = W'.negY Q * P z ^ 3

tactic: linear_combination (norm := ring1) Y_sub_Y_add_Y_sub_negY P Q hx + Q z ^ 3 * hy - hy'
state_before: R : Type u
inst✝² : CommRing R
W' : Jacobian R
F : Type v
inst✝¹ : Field F
W : Jacobian F
inst✝ : NoZeroDivisors R
P Q : Fin 3 → R
hP : W'.Equation P
hQ : W'.Equation Q
hx : P x * Q z ^ 2 = Q x * P z ^ 2
hy' : P y * Q z ^ 3 - Q y * P z ^ 3 = 0
hy : P y = W'.negY P
⊢ P y * Q z ^ 3 = W'.negY Q * P z ^ 3
state_after: no goals
Theorem: trans_trichotomous_right
File: Mathlib/Order/RelClasses.lean

tactic: intro h₁ h₂
state_before: α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
⊢ r a b → ¬r c b → r a c
state_after: α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : r a b
h₂ : ¬r c b
⊢ r a c

tactic: rcases trichotomous_of r b c with (h₃ | rfl | h₃)
state_before: α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : r a b
h₂ : ¬r c b
⊢ r a c
state_after: case inl
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : r a b
h₂ : ¬r c b
h₃ : r b c
⊢ r a c

case inr.inl
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b : α
h₁ : r a b
h₂ : ¬r b b
⊢ r a b

case inr.inr
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : r a b
h₂ : ¬r c b
h₃ : r c b
⊢ r a c

tactic: exacts [_root_.trans h₁ h₃, h₁, absurd h₃ h₂]
state_before: case inl
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : r a b
h₂ : ¬r c b
h₃ : r b c
⊢ r a c

case inr.inl
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b : α
h₁ : r a b
h₂ : ¬r b b
⊢ r a b

case inr.inr
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : r a b
h₂ : ¬r c b
h₃ : r c b
⊢ r a c
state_after: no goals
Theorem: Set.ite_compl
File: Mathlib/Data/Set/Basic.lean

tactic: rw [Set.ite, Set.ite, diff_compl, union_comm, diff_eq]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t✝ t₁ t₂ u t s s' : Set α
⊢ tᶜ.ite s s' = t.ite s' s
state_after: no goals
Theorem: NNReal.summable_sigma
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: constructor
state_before: α : Type u_1
β✝ : Type u_2
γ : Type u_3
β : α → Type u_4
f : (x : α) × β x → ℝ≥0
⊢ Summable f ↔ (∀ (x : α), Summable fun y => f ⟨x, y⟩) ∧ Summable fun x => ∑' (y : β x), f ⟨x, y⟩
state_after: case mp
α : Type u_1
β✝ : Type u_2
γ : Type u_3
β : α → Type u_4
f : (x : α) × β x → ℝ≥0
⊢ Summable f → (∀ (x : α), Summable fun y => f ⟨x, y⟩) ∧ Summable fun x => ∑' (y : β x), f ⟨x, y⟩

case mpr
α : Type u_1
β✝ : Type u_2
γ : Type u_3
β : α → Type u_4
f : (x : α) × β x → ℝ≥0
⊢ ((∀ (x : α), Summable fun y => f ⟨x, y⟩) ∧ Summable fun x => ∑' (y : β x), f ⟨x, y⟩) → Summable f

tactic: simp only [← NNReal.summable_coe, NNReal.coe_tsum]
state_before: case mp
α : Type u_1
β✝ : Type u_2
γ : Type u_3
β : α → Type u_4
f : (x : α) × β x → ℝ≥0
⊢ Summable f → (∀ (x : α), Summable fun y => f ⟨x, y⟩) ∧ Summable fun x => ∑' (y : β x), f ⟨x, y⟩
state_after: case mp
α : Type u_1
β✝ : Type u_2
γ : Type u_3
β : α → Type u_4
f : (x : α) × β x → ℝ≥0
⊢ (Summable fun a => ↑(f a)) →
    (∀ (x : α), Summable fun a => ↑(f ⟨x, a⟩)) ∧ Summable fun a => ∑' (a_1 : β a), ↑(f ⟨a, a_1⟩)

tactic: exact fun h => ⟨h.sigma_factor, h.sigma⟩
state_before: case mp
α : Type u_1
β✝ : Type u_2
γ : Type u_3
β : α → Type u_4
f : (x : α) × β x → ℝ≥0
⊢ (Summable fun a => ↑(f a)) →
    (∀ (x : α), Summable fun a => ↑(f ⟨x, a⟩)) ∧ Summable fun a => ∑' (a_1 : β a), ↑(f ⟨a, a_1⟩)
state_after: no goals

tactic: rintro ⟨h₁, h₂⟩
state_before: case mpr
α : Type u_1
β✝ : Type u_2
γ : Type u_3
β : α → Type u_4
f : (x : α) × β x → ℝ≥0
⊢ ((∀ (x : α), Summable fun y => f ⟨x, y⟩) ∧ Summable fun x => ∑' (y : β x), f ⟨x, y⟩) → Summable f
state_after: case mpr.intro
α : Type u_1
β✝ : Type u_2
γ : Type u_3
β : α → Type u_4
f : (x : α) × β x → ℝ≥0
h₁ : ∀ (x : α), Summable fun y => f ⟨x, y⟩
h₂ : Summable fun x => ∑' (y : β x), f ⟨x, y⟩
⊢ Summable f

tactic: simpa only [← ENNReal.tsum_coe_ne_top_iff_summable, ENNReal.tsum_sigma',
  ENNReal.coe_tsum (h₁ _)] using h₂
state_before: case mpr.intro
α : Type u_1
β✝ : Type u_2
γ : Type u_3
β : α → Type u_4
f : (x : α) × β x → ℝ≥0
h₁ : ∀ (x : α), Summable fun y => f ⟨x, y⟩
h₂ : Summable fun x => ∑' (y : β x), f ⟨x, y⟩
⊢ Summable f
state_after: no goals
Theorem: ContinuousLinearEquiv.comp_contDiffAt_iff
File: Mathlib/Analysis/Calculus/ContDiff/Basic.lean

tactic: simp only [← contDiffWithinAt_univ, e.comp_contDiffWithinAt_iff]
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
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 u_2
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
e : F ≃L[𝕜] G
⊢ ContDiffAt 𝕜 n (⇑e ∘ f) x ↔ ContDiffAt 𝕜 n f x
state_after: no goals
Theorem: RingQuot.pow_quot
File: Mathlib/Algebra/RingQuot.lean

tactic: show npow r _ _ = _
state_before: R : Type uR
inst✝³ : Semiring R
S : Type uS
inst✝² : CommSemiring S
T : Type uT
A : Type uA
inst✝¹ : Semiring A
inst✝ : Algebra S A
r : R → R → Prop
a : R
n : ℕ
⊢ { toQuot := Quot.mk (Rel r) a } ^ n = { toQuot := Quot.mk (Rel r) (a ^ n) }
state_after: R : Type uR
inst✝³ : Semiring R
S : Type uS
inst✝² : CommSemiring S
T : Type uT
A : Type uA
inst✝¹ : Semiring A
inst✝ : Algebra S A
r : R → R → Prop
a : R
n : ℕ
⊢ RingQuot.npow r n { toQuot := Quot.mk (Rel r) a } = { toQuot := Quot.mk (Rel r) (a ^ n) }

tactic: rw [npow_def]
state_before: R : Type uR
inst✝³ : Semiring R
S : Type uS
inst✝² : CommSemiring S
T : Type uT
A : Type uA
inst✝¹ : Semiring A
inst✝ : Algebra S A
r : R → R → Prop
a : R
n : ℕ
⊢ RingQuot.npow r n { toQuot := Quot.mk (Rel r) a } = { toQuot := Quot.mk (Rel r) (a ^ n) }
state_after: no goals
Theorem: ONote.NFBelow.lt
File: Mathlib/SetTheory/Ordinal/Notation.lean

tactic: cases' h with _ _ _ _ eb _ h₁ h₂ h₃
state_before: e : ONote
n : ℕ+
a : ONote
b : Ordinal.{0}
h : (e.oadd n a).NFBelow b
⊢ e.repr < b
state_after: case oadd'
e : ONote
n : ℕ+
a : ONote
b eb : Ordinal.{0}
h₁ : e.NFBelow eb
h₂ : a.NFBelow e.repr
h₃ : e.repr < b
⊢ e.repr < b

tactic: exact h₃
state_before: case oadd'
e : ONote
n : ℕ+
a : ONote
b eb : Ordinal.{0}
h₁ : e.NFBelow eb
h₂ : a.NFBelow e.repr
h₃ : e.repr < b
⊢ e.repr < b
state_after: no goals
Theorem: Real.two_div_pi_mul_le_sin
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Bounds.lean

tactic: rw [← sub_nonneg]
state_before: x : ℝ
hx₀ : 0 ≤ x
hx : x ≤ π / 2
⊢ 2 / π * x ≤ sin x
state_after: x : ℝ
hx₀ : 0 ≤ x
hx : x ≤ π / 2
⊢ 0 ≤ sin x - 2 / π * x

tactic: suffices ConcaveOn ℝ (Icc 0 (π / 2)) (fun x ↦ sin x - 2 / π * x) by
  refine (le_min ?_ ?_).trans $ this.min_le_of_mem_Icc ⟨hx₀, hx⟩ <;> field_simp
state_before: x : ℝ
hx₀ : 0 ≤ x
hx : x ≤ π / 2
⊢ 0 ≤ sin x - 2 / π * x
state_after: x : ℝ
hx₀ : 0 ≤ x
hx : x ≤ π / 2
⊢ ConcaveOn ℝ (Icc 0 (π / 2)) fun x => sin x - 2 / π * x

tactic: exact concaveOn_of_hasDerivWithinAt2_nonpos (convex_Icc ..)
  (Continuous.continuousOn $ by fun_prop)
  (fun x _ ↦ ((hasDerivAt_sin ..).sub $ (hasDerivAt_id ..).const_mul (2 / π)).hasDerivWithinAt)
  (fun x _ ↦ (hasDerivAt_cos ..).hasDerivWithinAt.sub_const _)
  fun x hx ↦ neg_nonpos.2 $ sin_nonneg_of_mem_Icc $ Icc_subset_Icc_right (by linarith) $
  interior_subset hx
state_before: x : ℝ
hx₀ : 0 ≤ x
hx : x ≤ π / 2
⊢ ConcaveOn ℝ (Icc 0 (π / 2)) fun x => sin x - 2 / π * x
state_after: no goals

tactic: refine (le_min ?_ ?_).trans $ this.min_le_of_mem_Icc ⟨hx₀, hx⟩ <;> field_simp
state_before: x : ℝ
hx₀ : 0 ≤ x
hx : x ≤ π / 2
this : ConcaveOn ℝ (Icc 0 (π / 2)) fun x => sin x - 2 / π * x
⊢ 0 ≤ sin x - 2 / π * x
state_after: no goals

tactic: fun_prop
state_before: x : ℝ
hx₀ : 0 ≤ x
hx : x ≤ π / 2
⊢ Continuous fun x => sin x - 2 / π * x
state_after: no goals

tactic: linarith
state_before: x✝ : ℝ
hx₀ : 0 ≤ x✝
hx✝ : x✝ ≤ π / 2
x : ℝ
hx : x ∈ interior (Icc 0 (π / 2))
⊢ π / 2 ≤ π
state_after: no goals
Theorem: Polynomial.natCast_comp
File: Mathlib/Algebra/Polynomial/Eval.lean

tactic: rw [← C_eq_natCast, C_comp]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
⊢ (↑n).comp p = ↑n
state_after: no goals
Theorem: Nat.strongRecOn'_beta
File: Mathlib/Data/Nat/Defs.lean

tactic: simp only [strongRecOn']
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
P : ℕ → Sort u_1
h : (n : ℕ) → ((m : ℕ) → m < n → P m) → P n
⊢ n.strongRecOn' h = h n fun m x => m.strongRecOn' h
state_after: a b c d m n k : ℕ
p q : ℕ → Prop
P : ℕ → Sort u_1
h : (n : ℕ) → ((m : ℕ) → m < n → P m) → P n
⊢ Nat.strongRec' h n = h n fun m x => Nat.strongRec' h m

tactic: rw [Nat.strongRec']
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
P : ℕ → Sort u_1
h : (n : ℕ) → ((m : ℕ) → m < n → P m) → P n
⊢ Nat.strongRec' h n = h n fun m x => Nat.strongRec' h m
state_after: no goals
Theorem: Ordnode.all_balanceR
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [balanceR_eq_balance' hl hr sl sr H, all_balance']
state_before: α : Type u_1
P : α → Prop
l : Ordnode α
x : α
r : Ordnode α
hl : l.Balanced
hr : r.Balanced
sl : l.Sized
sr : r.Sized
H : (∃ l', Raised l.size l' ∧ BalancedSz l' r.size) ∨ ∃ r', Raised r' r.size ∧ BalancedSz l.size r'
⊢ All P (l.balanceR x r) ↔ All P l ∧ P x ∧ All P r
state_after: no goals
Theorem: Compactum.isClosed_iff
File: Mathlib/Topology/Category/Compactum.lean

tactic: rw [← isOpen_compl_iff]
state_before: X : Compactum
S : Set X.A
⊢ IsClosed S ↔ ∀ (F : Ultrafilter X.A), S ∈ F → X.str F ∈ S
state_after: X : Compactum
S : Set X.A
⊢ IsOpen Sᶜ ↔ ∀ (F : Ultrafilter X.A), S ∈ F → X.str F ∈ S

tactic: constructor
state_before: X : Compactum
S : Set X.A
⊢ IsOpen Sᶜ ↔ ∀ (F : Ultrafilter X.A), S ∈ F → X.str F ∈ S
state_after: case mp
X : Compactum
S : Set X.A
⊢ IsOpen Sᶜ → ∀ (F : Ultrafilter X.A), S ∈ F → X.str F ∈ S

case mpr
X : Compactum
S : Set X.A
⊢ (∀ (F : Ultrafilter X.A), S ∈ F → X.str F ∈ S) → IsOpen Sᶜ

tactic: intro cond F h
state_before: case mp
X : Compactum
S : Set X.A
⊢ IsOpen Sᶜ → ∀ (F : Ultrafilter X.A), S ∈ F → X.str F ∈ S
state_after: case mp
X : Compactum
S : Set X.A
cond : IsOpen Sᶜ
F : Ultrafilter X.A
h : S ∈ F
⊢ X.str F ∈ S

tactic: by_contra c
state_before: case mp
X : Compactum
S : Set X.A
cond : IsOpen Sᶜ
F : Ultrafilter X.A
h : S ∈ F
⊢ X.str F ∈ S
state_after: case mp
X : Compactum
S : Set X.A
cond : IsOpen Sᶜ
F : Ultrafilter X.A
h : S ∈ F
c : X.str F ∉ S
⊢ False

tactic: specialize cond F c
state_before: case mp
X : Compactum
S : Set X.A
cond : IsOpen Sᶜ
F : Ultrafilter X.A
h : S ∈ F
c : X.str F ∉ S
⊢ False
state_after: case mp
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h : S ∈ F
c : X.str F ∉ S
cond : Sᶜ ∈ F
⊢ False

tactic: rw [compl_mem_iff_not_mem] at cond
state_before: case mp
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h : S ∈ F
c : X.str F ∉ S
cond : Sᶜ ∈ F
⊢ False
state_after: case mp
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h : S ∈ F
c : X.str F ∉ S
cond : S ∉ F
⊢ False

tactic: contradiction
state_before: case mp
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h : S ∈ F
c : X.str F ∉ S
cond : S ∉ F
⊢ False
state_after: no goals

tactic: intro h1 F h2
state_before: case mpr
X : Compactum
S : Set X.A
⊢ (∀ (F : Ultrafilter X.A), S ∈ F → X.str F ∈ S) → IsOpen Sᶜ
state_after: case mpr
X : Compactum
S : Set X.A
h1 : ∀ (F : Ultrafilter X.A), S ∈ F → X.str F ∈ S
F : Ultrafilter X.A
h2 : X.str F ∈ Sᶜ
⊢ Sᶜ ∈ F

tactic: specialize h1 F
state_before: case mpr
X : Compactum
S : Set X.A
h1 : ∀ (F : Ultrafilter X.A), S ∈ F → X.str F ∈ S
F : Ultrafilter X.A
h2 : X.str F ∈ Sᶜ
⊢ Sᶜ ∈ F
state_after: case mpr
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h2 : X.str F ∈ Sᶜ
h1 : S ∈ F → X.str F ∈ S
⊢ Sᶜ ∈ F

tactic: cases' F.mem_or_compl_mem S with h h
state_before: case mpr
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h2 : X.str F ∈ Sᶜ
h1 : S ∈ F → X.str F ∈ S
⊢ Sᶜ ∈ F
state_after: case mpr.inl
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h2 : X.str F ∈ Sᶜ
h1 : S ∈ F → X.str F ∈ S
h : S ∈ F
⊢ Sᶜ ∈ F

case mpr.inr
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h2 : X.str F ∈ Sᶜ
h1 : S ∈ F → X.str F ∈ S
h : Sᶜ ∈ F
⊢ Sᶜ ∈ F

tactic: exacts [absurd (h1 h) h2, h]
state_before: case mpr.inl
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h2 : X.str F ∈ Sᶜ
h1 : S ∈ F → X.str F ∈ S
h : S ∈ F
⊢ Sᶜ ∈ F

case mpr.inr
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h2 : X.str F ∈ Sᶜ
h1 : S ∈ F → X.str F ∈ S
h : Sᶜ ∈ F
⊢ Sᶜ ∈ F
state_after: no goals
Theorem: Equiv.Perm.sum_cycleType
File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

tactic: induction σ using cycle_induction_on with
| base_one => simp
| base_cycles σ hσ => rw [hσ.cycleType, sum_coe, List.sum_singleton]
| induction_disjoint σ τ hd _ hσ hτ => rw [hd.cycleType, sum_add, hσ, hτ, hd.card_support_mul]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
⊢ σ.cycleType.sum = σ.support.card
state_after: no goals

tactic: simp
state_before: case base_one
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
⊢ (cycleType 1).sum = (support 1).card
state_after: no goals

tactic: rw [hσ.cycleType, sum_coe, List.sum_singleton]
state_before: case base_cycles
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ : σ.IsCycle
⊢ σ.cycleType.sum = σ.support.card
state_after: no goals

tactic: rw [hd.cycleType, sum_add, hσ, hτ, hd.card_support_mul]
state_before: case induction_disjoint
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ τ : Perm α
hd : σ.Disjoint τ
a✝ : σ.IsCycle
hσ : σ.cycleType.sum = σ.support.card
hτ : τ.cycleType.sum = τ.support.card
⊢ (σ * τ).cycleType.sum = (σ * τ).support.card
state_after: no goals
Theorem: Set.Iic.eq_top_iff
File: Mathlib/Order/LatticeIntervals.lean

tactic: simp [Subtype.ext_iff]
state_before: α : Type u_1
a : α
inst✝ : Preorder α
x : ↑(Iic a)
⊢ x = ⊤ ↔ ↑x = a
state_after: no goals
Theorem: UpperHalfPlane.exp_half_dist
File: Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean

tactic: rw [← sinh_add_cosh, sinh_half_dist, cosh_half_dist, add_div]
state_before: z✝ w✝ : ℍ
r R : ℝ
z w : ℍ
⊢ rexp (dist z w / 2) = (dist ↑z ↑w + dist (↑z) ((starRingEnd ℂ) ↑w)) / (2 * √(z.im * w.im))
state_after: no goals
Theorem: SemiNormedGrp.comp_explicitCokernelπ
File: Mathlib/Analysis/Normed/Group/SemiNormedGrp/Kernels.lean

tactic: convert (cokernelCocone f).w WalkingParallelPairHom.left
state_before: X Y : SemiNormedGrp
f : X ⟶ Y
⊢ f ≫ explicitCokernelπ f = 0
state_after: case h.e'_3.h
X Y : SemiNormedGrp
f : X ⟶ Y
e_1✝ :
  (X ⟶ explicitCokernel f) =
    ((parallelPair f 0).obj WalkingParallelPair.zero ⟶
      ((Functor.const WalkingParallelPair).obj (cokernelCocone f).pt).obj WalkingParallelPair.one)
⊢ 0 = (cokernelCocone f).ι.app WalkingParallelPair.zero

tactic: simp
state_before: case h.e'_3.h
X Y : SemiNormedGrp
f : X ⟶ Y
e_1✝ :
  (X ⟶ explicitCokernel f) =
    ((parallelPair f 0).obj WalkingParallelPair.zero ⟶
      ((Functor.const WalkingParallelPair).obj (cokernelCocone f).pt).obj WalkingParallelPair.one)
⊢ 0 = (cokernelCocone f).ι.app WalkingParallelPair.zero
state_after: no goals