1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: LinearMap.dualMap_surjective_iff
File: Mathlib/LinearAlgebra/Dual.lean

tactic: rw [← LinearMap.range_eq_top, range_dualMap_eq_dualAnnihilator_ker,
    ← Submodule.dualAnnihilator_bot, Subspace.dualAnnihilator_inj, LinearMap.ker_eq_bot]
state_before: K : Type uK
inst✝⁴ : Field K
V₁ : Type uV₁
V₂ : Type uV₂
inst✝³ : AddCommGroup V₁
inst✝² : Module K V₁
inst✝¹ : AddCommGroup V₂
inst✝ : Module K V₂
f : V₁ →ₗ[K] V₂
⊢ Function.Surjective ⇑f.dualMap ↔ Function.Injective ⇑f
state_after: no goals
Theorem: intervalIntegral.continuousOn_primitive_interval_left
File: Mathlib/MeasureTheory/Integral/DominatedConvergence.lean

tactic: rw [uIcc_comm a b] at h_int ⊢
state_before: E✝ : Type u_1
inst✝⁸ : NormedAddCommGroup E✝
inst✝⁷ : CompleteSpace E✝
inst✝⁶ : NormedSpace ℝ E✝
a b b₀ b₁ b₂ : ℝ
μ : Measure ℝ
f : ℝ → E✝
X : Type u_2
inst✝⁵ : TopologicalSpace X
inst✝⁴ : FirstCountableTopology X
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
inst✝ : NoAtoms μ
h_int : IntegrableOn f [[a, b]] μ
⊢ ContinuousOn (fun x => ∫ (t : ℝ) in x..b, f t ∂μ) [[a, b]]
state_after: E✝ : Type u_1
inst✝⁸ : NormedAddCommGroup E✝
inst✝⁷ : CompleteSpace E✝
inst✝⁶ : NormedSpace ℝ E✝
a b b₀ b₁ b₂ : ℝ
μ : Measure ℝ
f : ℝ → E✝
X : Type u_2
inst✝⁵ : TopologicalSpace X
inst✝⁴ : FirstCountableTopology X
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
inst✝ : NoAtoms μ
h_int : IntegrableOn f [[b, a]] μ
⊢ ContinuousOn (fun x => ∫ (t : ℝ) in x..b, f t ∂μ) [[b, a]]

tactic: simp only [integral_symm b]
state_before: E✝ : Type u_1
inst✝⁸ : NormedAddCommGroup E✝
inst✝⁷ : CompleteSpace E✝
inst✝⁶ : NormedSpace ℝ E✝
a b b₀ b₁ b₂ : ℝ
μ : Measure ℝ
f : ℝ → E✝
X : Type u_2
inst✝⁵ : TopologicalSpace X
inst✝⁴ : FirstCountableTopology X
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
inst✝ : NoAtoms μ
h_int : IntegrableOn f [[b, a]] μ
⊢ ContinuousOn (fun x => ∫ (t : ℝ) in x..b, f t ∂μ) [[b, a]]
state_after: E✝ : Type u_1
inst✝⁸ : NormedAddCommGroup E✝
inst✝⁷ : CompleteSpace E✝
inst✝⁶ : NormedSpace ℝ E✝
a b b₀ b₁ b₂ : ℝ
μ : Measure ℝ
f : ℝ → E✝
X : Type u_2
inst✝⁵ : TopologicalSpace X
inst✝⁴ : FirstCountableTopology X
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
inst✝ : NoAtoms μ
h_int : IntegrableOn f [[b, a]] μ
⊢ ContinuousOn (fun x => -∫ (t : ℝ) in b..x, f t ∂μ) [[b, a]]

tactic: exact (continuousOn_primitive_interval h_int).neg
state_before: E✝ : Type u_1
inst✝⁸ : NormedAddCommGroup E✝
inst✝⁷ : CompleteSpace E✝
inst✝⁶ : NormedSpace ℝ E✝
a b b₀ b₁ b₂ : ℝ
μ : Measure ℝ
f : ℝ → E✝
X : Type u_2
inst✝⁵ : TopologicalSpace X
inst✝⁴ : FirstCountableTopology X
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
inst✝ : NoAtoms μ
h_int : IntegrableOn f [[b, a]] μ
⊢ ContinuousOn (fun x => -∫ (t : ℝ) in b..x, f t ∂μ) [[b, a]]
state_after: no goals
Theorem: MeasureTheory.SimpleFunc.mem_image_of_mem_range_restrict
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: simpa [mem_restrict_range hs, h0, -mem_range] using hr
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : MeasurableSpace α
K : Type u_5
inst✝ : Zero β
r : β
s : Set α
f : α →ₛ β
hr : r ∈ (f.restrict s).range
h0 : r ≠ 0
hs : MeasurableSet s
⊢ r ∈ ↑f '' s
state_after: no goals

tactic: rw [restrict_of_not_measurable hs] at hr
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : MeasurableSpace α
K : Type u_5
inst✝ : Zero β
r : β
s : Set α
f : α →ₛ β
hr : r ∈ (f.restrict s).range
h0 : r ≠ 0
hs : ¬MeasurableSet s
⊢ r ∈ ↑f '' s
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : MeasurableSpace α
K : Type u_5
inst✝ : Zero β
r : β
s : Set α
f : α →ₛ β
hr : r ∈ SimpleFunc.range 0
h0 : r ≠ 0
hs : ¬MeasurableSet s
⊢ r ∈ ↑f '' s

tactic: exact (h0 <| eq_zero_of_mem_range_zero hr).elim
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : MeasurableSpace α
K : Type u_5
inst✝ : Zero β
r : β
s : Set α
f : α →ₛ β
hr : r ∈ SimpleFunc.range 0
h0 : r ≠ 0
hs : ¬MeasurableSet s
⊢ r ∈ ↑f '' s
state_after: no goals
Theorem: Multiset.filterMap_filter
File: Mathlib/Data/Multiset/Basic.lean

tactic: simpa using List.filterMap_filter p f l
state_before: α : Type u_1
β : Type v
γ : Type u_2
p : α → Prop
inst✝ : DecidablePred p
f : α → Option β
s : Multiset α
l : List α
⊢ List.filterMap f (List.filter (fun b => decide (p b)) l) = List.filterMap (fun x => if p x then f x else none) l
state_after: no goals
Theorem: bddAbove_empty
File: Mathlib/Order/Bounds/Basic.lean

tactic: simp only [BddAbove, upperBounds_empty, univ_nonempty]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s t : Set α
a b : α
inst✝ : Nonempty α
⊢ BddAbove ∅
state_after: no goals
Theorem: Finset.mem_mulAntidiagonal
File: Mathlib/Data/Finset/MulAntidiagonal.lean

tactic: simp only [mulAntidiagonal, Set.Finite.mem_toFinset, Set.mem_mulAntidiagonal]
state_before: α : Type u_1
inst✝ : OrderedCancelCommMonoid α
s t : Set α
hs : s.IsPWO
ht : t.IsPWO
a : α
u : Set α
hu : u.IsPWO
x : α × α
⊢ x ∈ mulAntidiagonal hs ht a ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ x.1 * x.2 = a
state_after: no goals
Theorem: InnerProductSpace.toDual_symm_apply
File: Mathlib/Analysis/InnerProductSpace/Dual.lean

tactic: rw [← toDual_apply]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : CompleteSpace E
x : E
y : NormedSpace.Dual 𝕜 E
⊢ ⟪(toDual 𝕜 E).symm y, x⟫_𝕜 = y x
state_after: 𝕜 : Type u_1
E : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : CompleteSpace E
x : E
y : NormedSpace.Dual 𝕜 E
⊢ ((toDual 𝕜 E) ((toDual 𝕜 E).symm y)) x = y x

tactic: simp only [LinearIsometryEquiv.apply_symm_apply]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : CompleteSpace E
x : E
y : NormedSpace.Dual 𝕜 E
⊢ ((toDual 𝕜 E) ((toDual 𝕜 E).symm y)) x = y x
state_after: no goals
Theorem: CategoryTheory.ShortComplex.Exact.moduleCat_range_eq_ker
File: Mathlib/Algebra/Homology/ShortComplex/ModuleCat.lean

tactic: simpa only [moduleCat_exact_iff_range_eq_ker] using hS
state_before: R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
hS : S.Exact
⊢ LinearMap.range S.f = LinearMap.ker S.g
state_after: no goals
Theorem: exists_seq_strictAnti_tendsto'
File: Mathlib/Topology/Order/IsLUB.lean

tactic: simpa only [dual_Ioo]
  using exists_seq_strictMono_tendsto' (α := αᵒᵈ) (OrderDual.toDual_lt_toDual.2 hy)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁷ : TopologicalSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : LinearOrder α
inst✝⁴ : LinearOrder β
inst✝³ : OrderTopology α
inst✝² : OrderTopology β
inst✝¹ : DenselyOrdered α
inst✝ : FirstCountableTopology α
x y : α
hy : x < y
⊢ ∃ u, StrictAnti u ∧ (∀ (n : ℕ), u n ∈ Ioo x y) ∧ Tendsto u atTop (𝓝 x)
state_after: no goals
Theorem: isOpen_iff_generate_intervals
File: Mathlib/Topology/Order/Basic.lean

tactic: rfl
state_before: α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : Preorder α
t : OrderTopology α
s : Set α
⊢ IsOpen s ↔ GenerateOpen {s | ∃ a, s = Ioi a ∨ s = Iio a} s
state_after: no goals
Theorem: bernsteinPolynomial.eval_at_0
File: Mathlib/RingTheory/Polynomial/Bernstein.lean

tactic: rw [bernsteinPolynomial]
state_before: R : Type u_1
inst✝ : CommRing R
n ν : ℕ
⊢ Polynomial.eval 0 (bernsteinPolynomial R n ν) = if ν = 0 then 1 else 0
state_after: R : Type u_1
inst✝ : CommRing R
n ν : ℕ
⊢ Polynomial.eval 0 (↑(n.choose ν) * X ^ ν * (1 - X) ^ (n - ν)) = if ν = 0 then 1 else 0

tactic: split_ifs with h
state_before: R : Type u_1
inst✝ : CommRing R
n ν : ℕ
⊢ Polynomial.eval 0 (↑(n.choose ν) * X ^ ν * (1 - X) ^ (n - ν)) = if ν = 0 then 1 else 0
state_after: case pos
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ν = 0
⊢ Polynomial.eval 0 (↑(n.choose ν) * X ^ ν * (1 - X) ^ (n - ν)) = 1

case neg
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ¬ν = 0
⊢ Polynomial.eval 0 (↑(n.choose ν) * X ^ ν * (1 - X) ^ (n - ν)) = 0

tactic: subst h
state_before: case pos
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ν = 0
⊢ Polynomial.eval 0 (↑(n.choose ν) * X ^ ν * (1 - X) ^ (n - ν)) = 1
state_after: case pos
R : Type u_1
inst✝ : CommRing R
n : ℕ
⊢ Polynomial.eval 0 (↑(n.choose 0) * X ^ 0 * (1 - X) ^ (n - 0)) = 1

tactic: simp
state_before: case pos
R : Type u_1
inst✝ : CommRing R
n : ℕ
⊢ Polynomial.eval 0 (↑(n.choose 0) * X ^ 0 * (1 - X) ^ (n - 0)) = 1
state_after: no goals

tactic: simp [zero_pow h]
state_before: case neg
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ¬ν = 0
⊢ Polynomial.eval 0 (↑(n.choose ν) * X ^ ν * (1 - X) ^ (n - ν)) = 0
state_after: no goals
Theorem: CategoryTheory.Limits.hasZeroObject_of_hasTerminal_object
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: refine ⟨⟨⊤_ C, fun X => ⟨⟨⟨0⟩, fun f => ?_⟩⟩, fun X => ⟨⟨⟨0⟩, by aesop_cat⟩⟩⟩⟩
state_before: C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasTerminal C
⊢ HasZeroObject C
state_after: C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasTerminal C
X : C
f : ⊤_ C ⟶ X
⊢ f = default

tactic: calc
  f = 𝟙 _ ≫ f := (Category.id_comp _).symm
  _ = 0 ≫ f := by congr!; apply Subsingleton.elim
  _ = 0 := zero_comp
state_before: C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasTerminal C
X : C
f : ⊤_ C ⟶ X
⊢ f = default
state_after: no goals

tactic: aesop_cat
state_before: C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasTerminal C
X : C
⊢ ∀ (a : X ⟶ ⊤_ C), a = default
state_after: no goals

tactic: congr!
state_before: C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasTerminal C
X : C
f : ⊤_ C ⟶ X
⊢ 𝟙 (⊤_ C) ≫ f = 0 ≫ f
state_after: case h.e'_6
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasTerminal C
X : C
f : ⊤_ C ⟶ X
⊢ 𝟙 (⊤_ C) = 0

tactic: apply Subsingleton.elim
state_before: case h.e'_6
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasTerminal C
X : C
f : ⊤_ C ⟶ X
⊢ 𝟙 (⊤_ C) = 0
state_after: no goals
Theorem: PresheafOfModules.map_comp
File: Mathlib/Algebra/Category/ModuleCat/Presheaf.lean

tactic: ext
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
P : PresheafOfModules R
X Y Z : Cᵒᵖ
f : X ⟶ Y
g : Y ⟶ Z
⊢ P.map (f ≫ g) = (P.map g).comp (P.map f)
state_after: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
P : PresheafOfModules R
X Y Z : Cᵒᵖ
f : X ⟶ Y
g : Y ⟶ Z
x✝ : ↑(P.obj X)
⊢ (P.map (f ≫ g)) x✝ = ((P.map g).comp (P.map f)) x✝

tactic: simp [map_apply]
state_before: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
P : PresheafOfModules R
X Y Z : Cᵒᵖ
f : X ⟶ Y
g : Y ⟶ Z
x✝ : ↑(P.obj X)
⊢ (P.map (f ≫ g)) x✝ = ((P.map g).comp (P.map f)) x✝
state_after: no goals
Theorem: SimpleGraph.Coloring.colorable
File: Mathlib/Combinatorics/SimpleGraph/Coloring.lean

tactic: simp
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C✝ : G.Coloring α
inst✝ : Fintype α
C : G.Coloring α
⊢ card α ≤ card (Fin (card α))
state_after: no goals
Theorem: Set.Finite.toFinset_nonempty
File: Mathlib/Data/Set/Finite.lean

tactic: rw [← Finset.coe_nonempty, Finite.coe_toFinset]
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
a : α
hs : s.Finite
ht : t.Finite
⊢ hs.toFinset.Nonempty ↔ s.Nonempty
state_after: no goals
Theorem: CategoryTheory.Presheaf.isLocallySurjective_iff_imagePresheaf_sheafify_eq_top
File: Mathlib/CategoryTheory/Sites/LocallySurjective.lean

tactic: simp only [Subpresheaf.ext_iff, Function.funext_iff, Set.ext_iff, top_subpresheaf_obj,
  Set.top_eq_univ, Set.mem_univ, iff_true_iff]
state_before: C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
⊢ IsLocallySurjective J f ↔ Subpresheaf.sheafify J (imagePresheaf (whiskerRight f (forget A))) = ⊤
state_after: C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
⊢ IsLocallySurjective J f ↔
    ∀ (a : Cᵒᵖ) (x : (G ⋙ forget A).obj a),
      x ∈ (Subpresheaf.sheafify J (imagePresheaf (whiskerRight f (forget A)))).obj a

tactic: exact ⟨fun H _ => H.imageSieve_mem, fun H => ⟨H _⟩⟩
state_before: C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
A : Type u'
inst✝¹ : Category.{v', u'} A
inst✝ : ConcreteCategory A
F G : Cᵒᵖ ⥤ A
f : F ⟶ G
⊢ IsLocallySurjective J f ↔
    ∀ (a : Cᵒᵖ) (x : (G ⋙ forget A).obj a),
      x ∈ (Subpresheaf.sheafify J (imagePresheaf (whiskerRight f (forget A)))).obj a
state_after: no goals
Theorem: star_nonneg_iff
File: Mathlib/Algebra/Star/Order.lean

tactic: simpa using star_le_star_iff (x := 0) (y := x)
state_before: R : Type u
inst✝³ : NonUnitalSemiring R
inst✝² : PartialOrder R
inst✝¹ : StarRing R
inst✝ : StarOrderedRing R
x : R
⊢ 0 ≤ star x ↔ 0 ≤ x
state_after: no goals
Theorem: isCoveringMap_iff_isCoveringMapOn_univ
File: Mathlib/Topology/Covering.lean

tactic: simp only [IsCoveringMap, IsCoveringMapOn, Set.mem_univ, forall_true_left]
state_before: E : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalSpace X
f : E → X
s : Set X
⊢ IsCoveringMap f ↔ IsCoveringMapOn f Set.univ
state_after: no goals
Theorem: RatFunc.smul_eq_C_smul
File: Mathlib/FieldTheory/RatFunc/Basic.lean

tactic: cases' x with x
state_before: K : Type u
inst✝ : CommRing K
R : Type u_1
x : RatFunc K
r : K
⊢ r • x = Polynomial.C r • x
state_after: case ofFractionRing
K : Type u
inst✝ : CommRing K
R : Type u_1
r : K
x : FractionRing K[X]
⊢ r • { toFractionRing := x } = Polynomial.C r • { toFractionRing := x }

tactic: induction x using Localization.induction_on
state_before: case ofFractionRing
K : Type u
inst✝ : CommRing K
R : Type u_1
r : K
x : FractionRing K[X]
⊢ r • { toFractionRing := x } = Polynomial.C r • { toFractionRing := x }
state_after: case ofFractionRing.H
K : Type u
inst✝ : CommRing K
R : Type u_1
r : K
y✝ : K[X] × ↥K[X]⁰
⊢ r • { toFractionRing := Localization.mk y✝.1 y✝.2 } = Polynomial.C r • { toFractionRing := Localization.mk y✝.1 y✝.2 }

tactic: rw [← ofFractionRing_smul, ← ofFractionRing_smul, Localization.smul_mk,
  Localization.smul_mk, smul_eq_mul, Polynomial.smul_eq_C_mul]
state_before: case ofFractionRing.H
K : Type u
inst✝ : CommRing K
R : Type u_1
r : K
y✝ : K[X] × ↥K[X]⁰
⊢ r • { toFractionRing := Localization.mk y✝.1 y✝.2 } = Polynomial.C r • { toFractionRing := Localization.mk y✝.1 y✝.2 }
state_after: no goals
Theorem: SmoothBumpFunction.tsupport_subset_chartAt_source
File: Mathlib/Geometry/Manifold/BumpFunction.lean

tactic: simpa only [extChartAt_source] using f.tsupport_subset_extChartAt_source
state_before: E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
H : Type uH
inst✝⁴ : TopologicalSpace H
I : ModelWithCorners ℝ E H
M : Type uM
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
inst✝¹ : SmoothManifoldWithCorners I M
c : M
f : SmoothBumpFunction I c
x : M
inst✝ : T2Space M
⊢ tsupport ↑f ⊆ (chartAt H c).source
state_after: no goals
Theorem: CategoryTheory.Limits.limitFlipCompLimIsoLimitCompLim_inv_π_π
File: Mathlib/CategoryTheory/Limits/Fubini.lean

tactic: dsimp [limitFlipCompLimIsoLimitCompLim]
state_before: J K : Type v
inst✝⁶ : SmallCategory J
inst✝⁵ : SmallCategory K
C : Type u
inst✝⁴ : Category.{v, u} C
F : J ⥤ K ⥤ C
inst✝³ : HasLimitsOfShape J C
inst✝² : HasLimitsOfShape K C
inst✝¹ : HasLimitsOfShape (J × K) C
inst✝ : HasLimitsOfShape (K × J) C
k : K
j : J
⊢ (limitFlipCompLimIsoLimitCompLim F).inv ≫ limit.π (F.flip ⋙ lim) k ≫ limit.π (F.flip.obj k) j =
    limit.π (F ⋙ lim) j ≫ limit.π (F.obj j) k
state_after: J K : Type v
inst✝⁶ : SmallCategory J
inst✝⁵ : SmallCategory K
C : Type u
inst✝⁴ : Category.{v, u} C
F : J ⥤ K ⥤ C
inst✝³ : HasLimitsOfShape J C
inst✝² : HasLimitsOfShape K C
inst✝¹ : HasLimitsOfShape (J × K) C
inst✝ : HasLimitsOfShape (K × J) C
k : K
j : J
⊢ ((((limitUncurryIsoLimitCompLim F).inv ≫
            (HasLimit.isoOfEquivalence (Prod.braiding K J)
                (NatIso.ofComponents (fun x => Iso.refl ((F.obj x.2).obj x.1)) ⋯)).inv) ≫
          (HasLimit.isoOfNatIso (uncurryObjFlip F)).inv) ≫
        (limitUncurryIsoLimitCompLim F.flip).hom) ≫
      limit.π (F.flip ⋙ lim) k ≫ limit.π (F.flip.obj k) j =
    limit.π (F ⋙ lim) j ≫ limit.π (F.obj j) k

tactic: simp
state_before: J K : Type v
inst✝⁶ : SmallCategory J
inst✝⁵ : SmallCategory K
C : Type u
inst✝⁴ : Category.{v, u} C
F : J ⥤ K ⥤ C
inst✝³ : HasLimitsOfShape J C
inst✝² : HasLimitsOfShape K C
inst✝¹ : HasLimitsOfShape (J × K) C
inst✝ : HasLimitsOfShape (K × J) C
k : K
j : J
⊢ ((((limitUncurryIsoLimitCompLim F).inv ≫
            (HasLimit.isoOfEquivalence (Prod.braiding K J)
                (NatIso.ofComponents (fun x => Iso.refl ((F.obj x.2).obj x.1)) ⋯)).inv) ≫
          (HasLimit.isoOfNatIso (uncurryObjFlip F)).inv) ≫
        (limitUncurryIsoLimitCompLim F.flip).hom) ≫
      limit.π (F.flip ⋙ lim) k ≫ limit.π (F.flip.obj k) j =
    limit.π (F ⋙ lim) j ≫ limit.π (F.obj j) k
state_after: no goals
Theorem: RCLike.re_eq_self_of_le
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: rw [← conj_eq_iff_re, conj_eq_iff_im, im_eq_zero_of_le h]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z a : K
h : ‖a‖ ≤ re a
⊢ ↑(re a) = a
state_after: no goals
Theorem: max_sub_max_le_max
File: Mathlib/Algebra/Order/Group/MinMax.lean

tactic: simp only [sub_le_iff_le_add, max_le_iff]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ max a b - max c d ≤ max (a - c) (b - d)
state_after: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ a ≤ max (a - c) (b - d) + max c d ∧ b ≤ max (a - c) (b - d) + max c d

tactic: constructor
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ a ≤ max (a - c) (b - d) + max c d ∧ b ≤ max (a - c) (b - d) + max c d
state_after: case left
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ a ≤ max (a - c) (b - d) + max c d

case right
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ b ≤ max (a - c) (b - d) + max c d

tactic: calc
a = a - c + c := (sub_add_cancel a c).symm
_ ≤ max (a - c) (b - d) + max c d := add_le_add (le_max_left _ _) (le_max_left _ _)
state_before: case left
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ a ≤ max (a - c) (b - d) + max c d
state_after: no goals

tactic: calc
b = b - d + d := (sub_add_cancel b d).symm
_ ≤ max (a - c) (b - d) + max c d := add_le_add (le_max_right _ _) (le_max_right _ _)
state_before: case right
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ b ≤ max (a - c) (b - d) + max c d
state_after: no goals
Theorem: Polynomial.coe_lt_degree
File: Mathlib/Algebra/Polynomial/Degree/Lemmas.lean

tactic: by_cases h : p = 0
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
n : ℕ
⊢ ↑n < p.degree ↔ n < p.natDegree
state_after: case pos
R : Type u
S : Type v
ι : Type w
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
n : ℕ
h : p = 0
⊢ ↑n < p.degree ↔ n < p.natDegree

case neg
R : Type u
S : Type v
ι : Type w
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
n : ℕ
h : ¬p = 0
⊢ ↑n < p.degree ↔ n < p.natDegree

tactic: simp [degree_eq_natDegree h, Nat.cast_lt]
state_before: case neg
R : Type u
S : Type v
ι : Type w
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
n : ℕ
h : ¬p = 0
⊢ ↑n < p.degree ↔ n < p.natDegree
state_after: no goals

tactic: simp [h]
state_before: case pos
R : Type u
S : Type v
ι : Type w
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
n : ℕ
h : p = 0
⊢ ↑n < p.degree ↔ n < p.natDegree
state_after: no goals
Theorem: Polynomial.mul_self_modByMonic
File: Mathlib/Algebra/Polynomial/Div.lean

tactic: rw [modByMonic_eq_zero_iff_dvd hq]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : CommRing R
p q : R[X]
hq : q.Monic
⊢ p * q %ₘ q = 0
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : CommRing R
p q : R[X]
hq : q.Monic
⊢ q ∣ p * q

tactic: exact dvd_mul_left q p
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : CommRing R
p q : R[X]
hq : q.Monic
⊢ q ∣ p * q
state_after: no goals
Theorem: EuclideanGeometry.tan_oangle_left_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

tactic: have hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]
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
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
⊢ (∡ p₃ p₁ p₂).tan = dist p₃ p₂ / dist p₁ p₂
state_after: 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
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
hs : (∡ p₃ p₁ p₂).sign = 1
⊢ (∡ p₃ p₁ p₂).tan = dist p₃ p₂ / dist p₁ p₂

tactic: rw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, Real.Angle.tan_coe,
  tan_angle_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)]
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
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
hs : (∡ p₃ p₁ p₂).sign = 1
⊢ (∡ p₃ p₁ p₂).tan = dist p₃ p₂ / dist p₁ p₂
state_after: no goals

tactic: rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]
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
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
⊢ (∡ p₃ p₁ p₂).sign = 1
state_after: no goals