1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: ContinuousMap.abs_mem_subalgebra_closure
File: Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean

tactic: let f' := attachBound (f : C(X, ℝ))
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f : ↥A
⊢ |↑f| ∈ A.topologicalClosure
state_after: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f : ↥A
f' : C(X, ↑(Set.Icc (-‖↑f‖) ‖↑f‖)) := (↑f).attachBound
⊢ |↑f| ∈ A.topologicalClosure

tactic: let abs : C(Set.Icc (-‖f‖) ‖f‖, ℝ) := { toFun := fun x : Set.Icc (-‖f‖) ‖f‖ => |(x : ℝ)| }
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f : ↥A
f' : C(X, ↑(Set.Icc (-‖↑f‖) ‖↑f‖)) := (↑f).attachBound
⊢ |↑f| ∈ A.topologicalClosure
state_after: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f : ↥A
f' : C(X, ↑(Set.Icc (-‖↑f‖) ‖↑f‖)) := (↑f).attachBound
abs : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ) := { toFun := fun x => |↑x|, continuous_toFun := ⋯ }
⊢ |↑f| ∈ A.topologicalClosure

tactic: change abs.comp f' ∈ A.topologicalClosure
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f : ↥A
f' : C(X, ↑(Set.Icc (-‖↑f‖) ‖↑f‖)) := (↑f).attachBound
abs : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ) := { toFun := fun x => |↑x|, continuous_toFun := ⋯ }
⊢ |↑f| ∈ A.topologicalClosure
state_after: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f : ↥A
f' : C(X, ↑(Set.Icc (-‖↑f‖) ‖↑f‖)) := (↑f).attachBound
abs : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ) := { toFun := fun x => |↑x|, continuous_toFun := ⋯ }
⊢ abs.comp f' ∈ A.topologicalClosure

tactic: apply comp_attachBound_mem_closure
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
f : ↥A
f' : C(X, ↑(Set.Icc (-‖↑f‖) ‖↑f‖)) := (↑f).attachBound
abs : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ) := { toFun := fun x => |↑x|, continuous_toFun := ⋯ }
⊢ abs.comp f' ∈ A.topologicalClosure
state_after: no goals
Theorem: CategoryTheory.ShortComplex.Exact.desc'
File: Mathlib/Algebra/Homology/ShortComplex/Exact.lean

tactic: simp
state_before: C : Type u_1
D : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Category.{?u.153627, u_2} D
inst✝³ : Preadditive C
inst✝² : Preadditive D
S : ShortComplex C
inst✝¹ : Balanced C
hS : S.Exact
A : C
k : S.X₂ ⟶ A
hk : S.f ≫ k = 0
inst✝ : Epi S.g
⊢ S.g ≫ hS.desc k hk = k
state_after: no goals
Theorem: ENNReal.div_eq_inv_mul
File: Mathlib/Data/ENNReal/Inv.lean

tactic: rw [div_eq_mul_inv, mul_comm]
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ a / b = b⁻¹ * a
state_after: no goals
Theorem: Set.Iic_inter_Iic
File: Mathlib/Order/Interval/Set/Basic.lean

tactic: ext x
state_before: α : Type u_1
β : Type u_2
inst✝ : SemilatticeInf α
a b : α
⊢ Iic a ∩ Iic b = Iic (a ⊓ b)
state_after: case h
α : Type u_1
β : Type u_2
inst✝ : SemilatticeInf α
a b x : α
⊢ x ∈ Iic a ∩ Iic b ↔ x ∈ Iic (a ⊓ b)

tactic: simp [Iic]
state_before: case h
α : Type u_1
β : Type u_2
inst✝ : SemilatticeInf α
a b x : α
⊢ x ∈ Iic a ∩ Iic b ↔ x ∈ Iic (a ⊓ b)
state_after: no goals
Theorem: Monoid.PushoutI.NormalWord.base_smul_def
File: Mathlib/GroupTheory/PushoutI.lean

tactic: dsimp [NormalWord.mulAction, instHSMul, SMul.smul]
state_before: ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
h : H
w : NormalWord d
⊢ (base φ) h • w = { toWord := w.toWord, head := h * w.head, normalized := ⋯ }
state_after: ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
h : H
w : NormalWord d
⊢ (lift (fun i => MulAction.toEndHom) MulAction.toEndHom ⋯) ((base φ) h) w =
    { toWord := w.toWord, head := h * w.head, normalized := ⋯ }

tactic: rw [lift_base]
state_before: ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
h : H
w : NormalWord d
⊢ (lift (fun i => MulAction.toEndHom) MulAction.toEndHom ⋯) ((base φ) h) w =
    { toWord := w.toWord, head := h * w.head, normalized := ⋯ }
state_after: ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
h : H
w : NormalWord d
⊢ MulAction.toEndHom h w = { toWord := w.toWord, head := h * w.head, normalized := ⋯ }

tactic: rfl
state_before: ι : Type u_1
G : ι → Type u_2
H : Type u_3
K : Type u_4
inst✝⁴ : Monoid K
inst✝³ : (i : ι) → Group (G i)
inst✝² : Group H
φ : (i : ι) → H →* G i
d : Transversal φ
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → DecidableEq (G i)
h : H
w : NormalWord d
⊢ MulAction.toEndHom h w = { toWord := w.toWord, head := h * w.head, normalized := ⋯ }
state_after: no goals
Theorem: one_geom_sum
File: Mathlib/Algebra/GeomSum.lean

tactic: simp
state_before: α : Type u
inst✝ : Semiring α
n : ℕ
⊢ ∑ i ∈ range n, 1 ^ i = ↑n
state_after: no goals
Theorem: List.countP_le_length
File: .lake/packages/batteries/Batteries/Data/List/Count.lean

tactic: simp only [countP_eq_length_filter]
state_before: α : Type u_1
p q : α → Bool
l : List α
⊢ countP p l ≤ l.length
state_after: α : Type u_1
p q : α → Bool
l : List α
⊢ (filter p l).length ≤ l.length

tactic: apply length_filter_le
state_before: α : Type u_1
p q : α → Bool
l : List α
⊢ (filter p l).length ≤ l.length
state_after: no goals
Theorem: tprod_range
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: rw [← Set.image_univ, tprod_image f hg.injOn]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
f : β → α
hg : Injective g
⊢ ∏' (x : ↑(Set.range g)), f ↑x = ∏' (x : γ), f (g x)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
f : β → α
hg : Injective g
⊢ ∏' (x : ↑Set.univ), f (g ↑x) = ∏' (x : γ), f (g x)

tactic: simp_rw [← comp_apply (g := g), tprod_univ (f ∘ g)]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f✝ g✝ : β → α
a a₁ a₂ : α
g : γ → β
f : β → α
hg : Injective g
⊢ ∏' (x : ↑Set.univ), f (g ↑x) = ∏' (x : γ), f (g x)
state_after: no goals
Theorem: Function.Antiperiodic.sub_zsmul_eq
File: Mathlib/Algebra/Periodic.lean

tactic: simpa only [sub_eq_add_neg, neg_zsmul, Int.negOnePow_neg] using h.add_zsmul_eq (-n)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x : α
inst✝¹ : AddGroup α
inst✝ : AddGroup β
h : Antiperiodic f c
n : ℤ
⊢ f (x - n • c) = ↑n.negOnePow • f x
state_after: no goals
Theorem: WeierstrassCurve.variableChange_c₆
File: Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean

tactic: simp only [c₆, variableChange_b₂, variableChange_b₄, variableChange_b₆]
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ (W.variableChange C).c₆ = ↑C.u⁻¹ ^ 6 * W.c₆
state_after: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ -(↑C.u⁻¹ ^ 2 * (W.b₂ + 12 * C.r)) ^ 3 +
        36 * (↑C.u⁻¹ ^ 2 * (W.b₂ + 12 * C.r)) * (↑C.u⁻¹ ^ 4 * (W.b₄ + C.r * W.b₂ + 6 * C.r ^ 2)) -
      216 * (↑C.u⁻¹ ^ 6 * (W.b₆ + 2 * C.r * W.b₄ + C.r ^ 2 * W.b₂ + 4 * C.r ^ 3)) =
    ↑C.u⁻¹ ^ 6 * (-W.b₂ ^ 3 + 36 * W.b₂ * W.b₄ - 216 * W.b₆)

tactic: ring1
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
C : VariableChange R
⊢ -(↑C.u⁻¹ ^ 2 * (W.b₂ + 12 * C.r)) ^ 3 +
        36 * (↑C.u⁻¹ ^ 2 * (W.b₂ + 12 * C.r)) * (↑C.u⁻¹ ^ 4 * (W.b₄ + C.r * W.b₂ + 6 * C.r ^ 2)) -
      216 * (↑C.u⁻¹ ^ 6 * (W.b₆ + 2 * C.r * W.b₄ + C.r ^ 2 * W.b₂ + 4 * C.r ^ 3)) =
    ↑C.u⁻¹ ^ 6 * (-W.b₂ ^ 3 + 36 * W.b₂ * W.b₄ - 216 * W.b₆)
state_after: no goals
Theorem: ProbabilityTheory.measure_ge_le_exp_cgf
File: Mathlib/Probability/Moments.lean

tactic: refine (measure_ge_le_exp_mul_mgf ε ht h_int).trans ?_
state_before: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable (fun ω => rexp (t * X ω)) μ
⊢ (μ {ω | ε ≤ X ω}).toReal ≤ rexp (-t * ε + cgf X μ t)
state_after: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable (fun ω => rexp (t * X ω)) μ
⊢ rexp (-t * ε) * mgf X μ t ≤ rexp (-t * ε + cgf X μ t)

tactic: rw [exp_add]
state_before: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable (fun ω => rexp (t * X ω)) μ
⊢ rexp (-t * ε) * mgf X μ t ≤ rexp (-t * ε + cgf X μ t)
state_after: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable (fun ω => rexp (t * X ω)) μ
⊢ rexp (-t * ε) * mgf X μ t ≤ rexp (-t * ε) * rexp (cgf X μ t)

tactic: exact mul_le_mul le_rfl (le_exp_log _) mgf_nonneg (exp_pos _).le
state_before: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
t : ℝ
inst✝ : IsFiniteMeasure μ
ε : ℝ
ht : 0 ≤ t
h_int : Integrable (fun ω => rexp (t * X ω)) μ
⊢ rexp (-t * ε) * mgf X μ t ≤ rexp (-t * ε) * rexp (cgf X μ t)
state_after: no goals
Theorem: CircleDeg1Lift.iterate_pos_eq_iff
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: simpa only [nsmul_eq_mul, add_right_iterate] using
  (f.commute_add_int m).iterate_pos_eq_iff_map_eq f.monotone (strictMono_id.add_const (m : ℝ)) hn
state_before: f g : CircleDeg1Lift
x : ℝ
m : ℤ
n : ℕ
hn : 0 < n
⊢ (⇑f)^[n] x = x + ↑n * ↑m ↔ f x = x + ↑m
state_after: no goals
Theorem: CategoryTheory.Subobject.le_of_comm
File: Mathlib/CategoryTheory/Subobject/Basic.lean

tactic: convert mk_le_mk_of_comm _ w <;> simp
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
B : C
X Y : Subobject B
f : underlying.obj X ⟶ underlying.obj Y
w : f ≫ Y.arrow = X.arrow
⊢ X ≤ Y
state_after: no goals
Theorem: Real.arccos_le_pi_div_two
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

tactic: simp [arccos]
state_before: x✝ y x : ℝ
⊢ arccos x ≤ π / 2 ↔ 0 ≤ x
state_after: no goals
Theorem: ENNReal.rpow_inv_rpow
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: rw [← rpow_mul, inv_mul_cancel hy, rpow_one]
state_before: y : ℝ
hy : y ≠ 0
x : ℝ≥0∞
⊢ (x ^ y⁻¹) ^ y = x
state_after: no goals
Theorem: Prod.Lex.toLex_strictMono
File: Mathlib/Data/Prod/Lex.lean

tactic: rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : PartialOrder α
inst✝ : Preorder β
⊢ StrictMono ⇑toLex
state_after: case mk.mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : PartialOrder α
inst✝ : Preorder β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
h : (a₁, b₁) < (a₂, b₂)
⊢ toLex (a₁, b₁) < toLex (a₂, b₂)

tactic: obtain rfl | ha : a₁ = a₂ ∨ _ := h.le.1.eq_or_lt
state_before: case mk.mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : PartialOrder α
inst✝ : Preorder β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
h : (a₁, b₁) < (a₂, b₂)
⊢ toLex (a₁, b₁) < toLex (a₂, b₂)
state_after: case mk.mk.inl
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : PartialOrder α
inst✝ : Preorder β
a₁ : α
b₁ b₂ : β
h : (a₁, b₁) < (a₁, b₂)
⊢ toLex (a₁, b₁) < toLex (a₁, b₂)

case mk.mk.inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : PartialOrder α
inst✝ : Preorder β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
h : (a₁, b₁) < (a₂, b₂)
ha : (a₁, b₁).1 < (a₂, b₂).1
⊢ toLex (a₁, b₁) < toLex (a₂, b₂)

tactic: exact right _ (Prod.mk_lt_mk_iff_right.1 h)
state_before: case mk.mk.inl
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : PartialOrder α
inst✝ : Preorder β
a₁ : α
b₁ b₂ : β
h : (a₁, b₁) < (a₁, b₂)
⊢ toLex (a₁, b₁) < toLex (a₁, b₂)
state_after: no goals

tactic: exact left _ _ ha
state_before: case mk.mk.inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : PartialOrder α
inst✝ : Preorder β
a₁ : α
b₁ : β
a₂ : α
b₂ : β
h : (a₁, b₁) < (a₂, b₂)
ha : (a₁, b₁).1 < (a₂, b₂).1
⊢ toLex (a₁, b₁) < toLex (a₂, b₂)
state_after: no goals
Theorem: Ideal.constr_basisSpanSingleton
File: Mathlib/RingTheory/Ideal/Basis.lean

tactic: erw [Basis.constr_basis, Function.comp_apply, basisSpanSingleton_apply, LinearMap.mul_apply']
state_before: ι : Type u_1
R : Type u_2
S : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Algebra R S
N : Type u_4
inst✝² : Semiring N
inst✝¹ : Module N S
inst✝ : SMulCommClass R N S
b : Basis ι R S
x : S
hx : x ≠ 0
i : ι
⊢ ((↑(b.constr N)).toFun (Subtype.val ∘ ⇑(basisSpanSingleton b hx))) (b i) = ((Algebra.lmul R S) x) (b i)
state_after: no goals
Theorem: Turing.TM1.stmts_trans
File: Mathlib/Computability/TuringMachine.lean

tactic: simp only [stmts, Finset.mem_insertNone, Finset.mem_biUnion, Option.mem_def, Option.some.injEq,
  forall_eq', exists_imp, and_imp]
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
M : Λ → Stmt₁
S : Finset Λ
q₁ q₂ : Stmt₁
h₁ : q₁ ∈ stmts₁ q₂
⊢ some q₂ ∈ stmts M S → some q₁ ∈ stmts M S
state_after: Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
M : Λ → Stmt₁
S : Finset Λ
q₁ q₂ : Stmt₁
h₁ : q₁ ∈ stmts₁ q₂
⊢ ∀ x ∈ S, q₂ ∈ stmts₁ (M x) → ∃ a ∈ S, q₁ ∈ stmts₁ (M a)

tactic: exact fun l ls h₂ ↦ ⟨_, ls, stmts₁_trans h₂ h₁⟩
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
Λ : Type u_2
σ : Type u_3
M : Λ → Stmt₁
S : Finset Λ
q₁ q₂ : Stmt₁
h₁ : q₁ ∈ stmts₁ q₂
⊢ ∀ x ∈ S, q₂ ∈ stmts₁ (M x) → ∃ a ∈ S, q₁ ∈ stmts₁ (M a)
state_after: no goals
Theorem: Nat.div_le_self'
File: Mathlib/Data/Nat/Defs.lean

tactic: obtain rfl | hn := n.eq_zero_or_pos
state_before: a b c d m✝ n✝ k : ℕ
p q : ℕ → Prop
m n : ℕ
⊢ m / n ≤ m
state_after: case inl
a b c d m✝ n k : ℕ
p q : ℕ → Prop
m : ℕ
⊢ m / 0 ≤ m

case inr
a b c d m✝ n✝ k : ℕ
p q : ℕ → Prop
m n : ℕ
hn : n > 0
⊢ m / n ≤ m

tactic: simp
state_before: case inl
a b c d m✝ n k : ℕ
p q : ℕ → Prop
m : ℕ
⊢ m / 0 ≤ m
state_after: no goals

tactic: refine Nat.div_le_of_le_mul' ?_
state_before: case inr
a b c d m✝ n✝ k : ℕ
p q : ℕ → Prop
m n : ℕ
hn : n > 0
⊢ m / n ≤ m
state_after: case inr
a b c d m✝ n✝ k : ℕ
p q : ℕ → Prop
m n : ℕ
hn : n > 0
⊢ m ≤ n * m

tactic: calc
  m = 1 * m := by rw [Nat.one_mul]
  _ ≤ n * m := Nat.mul_le_mul_right _ hn
state_before: case inr
a b c d m✝ n✝ k : ℕ
p q : ℕ → Prop
m n : ℕ
hn : n > 0
⊢ m ≤ n * m
state_after: no goals

tactic: rw [Nat.one_mul]
state_before: a b c d m✝ n✝ k : ℕ
p q : ℕ → Prop
m n : ℕ
hn : n > 0
⊢ m = 1 * m
state_after: no goals
Theorem: two_mul_le_add_sq
File: Mathlib/Algebra/Order/Ring/Defs.lean

tactic: simpa [fn_min_add_fn_max (fun x ↦ x * x), sq, two_mul, add_mul]
  using mul_add_mul_le_mul_add_mul (@min_le_max _ _ a b) (@min_le_max _ _ a b)
state_before: α : Type u
β : Type u_1
inst✝¹ : LinearOrderedCommSemiring α
a✝ b✝ c d : α
inst✝ : ExistsAddOfLE α
a b : α
⊢ 2 * a * b ≤ a ^ 2 + b ^ 2
state_after: no goals
Theorem: Asymptotics.isBigO_fst_prod'
File: Mathlib/Analysis/Asymptotics/Asymptotics.lean

tactic: simpa [IsBigO_def, IsBigOWith_def] using isBigO_fst_prod (E' := E') (F' := F')
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
E' : Type u_6
F' : Type u_7
G' : Type u_8
E'' : Type u_9
F'' : Type u_10
G'' : Type u_11
E''' : Type u_12
R : Type u_13
R' : Type u_14
𝕜 : Type u_15
𝕜' : Type u_16
inst✝¹³ : Norm E
inst✝¹² : Norm F
inst✝¹¹ : Norm G
inst✝¹⁰ : SeminormedAddCommGroup E'
inst✝⁹ : SeminormedAddCommGroup F'
inst✝⁸ : SeminormedAddCommGroup G'
inst✝⁷ : NormedAddCommGroup E''
inst✝⁶ : NormedAddCommGroup F''
inst✝⁵ : NormedAddCommGroup G''
inst✝⁴ : SeminormedRing R
inst✝³ : SeminormedAddGroup E'''
inst✝² : SeminormedRing R'
inst✝¹ : NormedDivisionRing 𝕜
inst✝ : NormedDivisionRing 𝕜'
c c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f'✝ : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
f' : α → E' × F'
⊢ (fun x => (f' x).1) =O[l] f'
state_after: no goals
Theorem: SimpleGraph.incMatrix_mul_transpose_apply_of_adj
File: Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean

tactic: classical
  simp_rw [Matrix.mul_apply, Matrix.transpose_apply, incMatrix_apply_mul_incMatrix_apply,
    Set.indicator_apply, Pi.one_apply, sum_boole]
  convert @Nat.cast_one R _
  convert card_singleton s(a, b)
  rw [← coe_eq_singleton, coe_filter_univ]
  exact G.incidenceSet_inter_incidenceSet_of_adj h
state_before: R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝¹ : Fintype (Sym2 α)
inst✝ : Semiring R
a b : α
e : Sym2 α
h : G.Adj a b
⊢ (incMatrix R G * (incMatrix R G)ᵀ) a b = 1
state_after: no goals

tactic: simp_rw [Matrix.mul_apply, Matrix.transpose_apply, incMatrix_apply_mul_incMatrix_apply,
  Set.indicator_apply, Pi.one_apply, sum_boole]
state_before: R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝¹ : Fintype (Sym2 α)
inst✝ : Semiring R
a b : α
e : Sym2 α
h : G.Adj a b
⊢ (incMatrix R G * (incMatrix R G)ᵀ) a b = 1
state_after: R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝¹ : Fintype (Sym2 α)
inst✝ : Semiring R
a b : α
e : Sym2 α
h : G.Adj a b
⊢ ↑(filter (fun x => x ∈ G.incidenceSet a ∩ G.incidenceSet b) univ).card = 1

tactic: convert @Nat.cast_one R _
state_before: R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝¹ : Fintype (Sym2 α)
inst✝ : Semiring R
a b : α
e : Sym2 α
h : G.Adj a b
⊢ ↑(filter (fun x => x ∈ G.incidenceSet a ∩ G.incidenceSet b) univ).card = 1
state_after: case h.e'_2.h.e'_3
R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝¹ : Fintype (Sym2 α)
inst✝ : Semiring R
a b : α
e : Sym2 α
h : G.Adj a b
⊢ (filter (fun x => x ∈ G.incidenceSet a ∩ G.incidenceSet b) univ).card = 1

tactic: convert card_singleton s(a, b)
state_before: case h.e'_2.h.e'_3
R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝¹ : Fintype (Sym2 α)
inst✝ : Semiring R
a b : α
e : Sym2 α
h : G.Adj a b
⊢ (filter (fun x => x ∈ G.incidenceSet a ∩ G.incidenceSet b) univ).card = 1
state_after: case h.e'_2.h.e'_2
R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝¹ : Fintype (Sym2 α)
inst✝ : Semiring R
a b : α
e : Sym2 α
h : G.Adj a b
⊢ filter (fun x => x ∈ G.incidenceSet a ∩ G.incidenceSet b) univ = {s(a, b)}

tactic: rw [← coe_eq_singleton, coe_filter_univ]
state_before: case h.e'_2.h.e'_2
R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝¹ : Fintype (Sym2 α)
inst✝ : Semiring R
a b : α
e : Sym2 α
h : G.Adj a b
⊢ filter (fun x => x ∈ G.incidenceSet a ∩ G.incidenceSet b) univ = {s(a, b)}
state_after: case h.e'_2.h.e'_2
R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝¹ : Fintype (Sym2 α)
inst✝ : Semiring R
a b : α
e : Sym2 α
h : G.Adj a b
⊢ {x | x ∈ G.incidenceSet a ∩ G.incidenceSet b} = {s(a, b)}

tactic: exact G.incidenceSet_inter_incidenceSet_of_adj h
state_before: case h.e'_2.h.e'_2
R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝¹ : Fintype (Sym2 α)
inst✝ : Semiring R
a b : α
e : Sym2 α
h : G.Adj a b
⊢ {x | x ∈ G.incidenceSet a ∩ G.incidenceSet b} = {s(a, b)}
state_after: no goals
Theorem: Multiset.zero_ssubset
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp [ssubset_iff_subset_not_subset]
state_before: α : Type u_1
β : Type v
γ : Type u_2
s : Multiset α
a : α
⊢ 0 ⊂ s ↔ s ≠ 0
state_after: no goals
Theorem: Submonoid.LocalizationMap.mulEquivOfLocalizations_left_inv_apply
File: Mathlib/GroupTheory/MonoidLocalization.lean

tactic: simp
state_before: M : Type u_1
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝² : CommMonoid N
P : Type u_3
inst✝¹ : CommMonoid P
f : S.LocalizationMap N
g : M →* P
hg : ∀ (y : ↥S), IsUnit (g ↑y)
T : Submonoid P
Q : Type u_4
inst✝ : CommMonoid Q
k : N ≃* P
x : N
⊢ (f.mulEquivOfLocalizations (f.ofMulEquivOfLocalizations k)) x = k x
state_after: no goals
Theorem: HomologicalComplex.biprod_inl_fst_f
File: Mathlib/Algebra/Homology/HomologicalComplexBiprod.lean

tactic: rw [← comp_f, biprod.inl_fst, id_f]
state_before: C : Type u_1
ι : Type u_2
inst✝² : Category.{u_3, u_1} C
inst✝¹ : Preadditive C
c : ComplexShape ι
K L : HomologicalComplex C c
inst✝ : ∀ (i : ι), HasBinaryBiproduct (K.X i) (L.X i)
i : ι
⊢ biprod.inl.f i ≫ biprod.fst.f i = 𝟙 (K.X i)
state_after: no goals
Theorem: Subtype.restrict_apply
File: Mathlib/Data/Subtype.lean

tactic: rfl
state_before: α✝ : Sort u_1
β✝ : Sort u_2
γ : Sort u_3
p✝ q : α✝ → Prop
α : Sort u_5
β : α → Type u_4
f : (x : α) → β x
p : α → Prop
x : Subtype p
⊢ restrict p f x = f ↑x
state_after: no goals
Theorem: SimpleGraph.lapMatrix_toLinearMap₂'_apply'_eq_zero_iff_forall_adj
File: Mathlib/Combinatorics/SimpleGraph/LapMatrix.lean

tactic: simp (disch := intros; positivity)
  [lapMatrix_toLinearMap₂', sum_eq_zero_iff_of_nonneg, sub_eq_zero]
state_before: V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : LinearOrderedField R
x : V → R
⊢ ((toLinearMap₂' (lapMatrix R G)) x) x = 0 ↔ ∀ (i j : V), G.Adj i j → x i = x j
state_after: no goals
Theorem: nhds_basis_uniformity
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: replace h := h.comap Prod.swap
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
p : ι → Prop
s : ι → Set (α × α)
h : (𝓤 α).HasBasis p s
x : α
⊢ (𝓝 x).HasBasis p fun i => {y | (y, x) ∈ s i}
state_after: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
p : ι → Prop
s : ι → Set (α × α)
x : α
h : (comap Prod.swap (𝓤 α)).HasBasis p fun i => Prod.swap ⁻¹' s i
⊢ (𝓝 x).HasBasis p fun i => {y | (y, x) ∈ s i}

tactic: rw [comap_swap_uniformity] at h
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
p : ι → Prop
s : ι → Set (α × α)
x : α
h : (comap Prod.swap (𝓤 α)).HasBasis p fun i => Prod.swap ⁻¹' s i
⊢ (𝓝 x).HasBasis p fun i => {y | (y, x) ∈ s i}
state_after: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
p : ι → Prop
s : ι → Set (α × α)
x : α
h : (𝓤 α).HasBasis p fun i => Prod.swap ⁻¹' s i
⊢ (𝓝 x).HasBasis p fun i => {y | (y, x) ∈ s i}

tactic: exact nhds_basis_uniformity' h
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
p : ι → Prop
s : ι → Set (α × α)
x : α
h : (𝓤 α).HasBasis p fun i => Prod.swap ⁻¹' s i
⊢ (𝓝 x).HasBasis p fun i => {y | (y, x) ∈ s i}
state_after: no goals