1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: WeierstrassCurve.Affine.derivative_addPolynomial_slope
File: Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean

tactic: rw [addPolynomial_slope h₁ h₂ hxy]
state_before: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
⊢ derivative (W.addPolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂)) =
    -((X - C x₁) * (X - C x₂) + (X - C x₁) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))) +
        (X - C x₂) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))))
state_after: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
⊢ derivative (-((X - C x₁) * (X - C x₂) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))))) =
    -((X - C x₁) * (X - C x₂) + (X - C x₁) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))) +
        (X - C x₂) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))))

tactic: derivative_simp
state_before: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
⊢ derivative (-((X - C x₁) * (X - C x₂) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))))) =
    -((X - C x₁) * (X - C x₂) + (X - C x₁) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))) +
        (X - C x₂) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))))
state_after: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
⊢ -(((1 - 0) * (X - C x₂) + (X - C x₁) * (1 - 0)) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))) +
        (X - C x₁) * (X - C x₂) * (1 - 0)) =
    -((X - C x₁) * (X - C x₂) + (X - C x₁) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))) +
        (X - C x₂) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))))

tactic: ring1
state_before: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂
⊢ -(((1 - 0) * (X - C x₂) + (X - C x₁) * (1 - 0)) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))) +
        (X - C x₁) * (X - C x₂) * (1 - 0)) =
    -((X - C x₁) * (X - C x₂) + (X - C x₁) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))) +
        (X - C x₂) * (X - C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))))
state_after: no goals
Theorem: VitaliFamily.ae_tendsto_limRatio
File: Mathlib/MeasureTheory/Covering/Differentiation.lean

tactic: filter_upwards [v.ae_tendsto_div hρ]
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
hρ : ρ ≪ μ
⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun a => ρ a / μ a) (v.filterAt x) (𝓝 (v.limRatio ρ x))
state_after: case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
hρ : ρ ≪ μ
⊢ ∀ (a : α),
    (∃ c, Tendsto (fun a => ρ a / μ a) (v.filterAt a) (𝓝 c)) →
      Tendsto (fun a => ρ a / μ a) (v.filterAt a) (𝓝 (v.limRatio ρ a))

tactic: intro x hx
state_before: case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
hρ : ρ ≪ μ
⊢ ∀ (a : α),
    (∃ c, Tendsto (fun a => ρ a / μ a) (v.filterAt a) (𝓝 c)) →
      Tendsto (fun a => ρ a / μ a) (v.filterAt a) (𝓝 (v.limRatio ρ a))
state_after: case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
hρ : ρ ≪ μ
x : α
hx : ∃ c, Tendsto (fun a => ρ a / μ a) (v.filterAt x) (𝓝 c)
⊢ Tendsto (fun a => ρ a / μ a) (v.filterAt x) (𝓝 (v.limRatio ρ x))

tactic: exact tendsto_nhds_limUnder hx
state_before: case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
hρ : ρ ≪ μ
x : α
hx : ∃ c, Tendsto (fun a => ρ a / μ a) (v.filterAt x) (𝓝 c)
⊢ Tendsto (fun a => ρ a / μ a) (v.filterAt x) (𝓝 (v.limRatio ρ x))
state_after: no goals
Theorem: Finset.map_add_right_Ioo
File: Mathlib/Algebra/Order/Interval/Finset.lean

tactic: rw [← coe_inj, coe_map, coe_Ioo, coe_Ioo]
state_before: ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map (addRightEmbedding c) (Ioo a b) = Ioo (a + c) (b + c)
state_after: ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ ⇑(addRightEmbedding c) '' Set.Ioo a b = Set.Ioo (a + c) (b + c)

tactic: exact Set.image_add_const_Ioo _ _ _
state_before: ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ ⇑(addRightEmbedding c) '' Set.Ioo a b = Set.Ioo (a + c) (b + c)
state_after: no goals
Theorem: Set.not_nontrivial_singleton
File: Mathlib/Data/Set/Subsingleton.lean

tactic: rw [nontrivial_iff_exists_ne (mem_singleton x)] at H
state_before: α : Type u
a : α
s t : Set α
x : α
H : {x}.Nontrivial
⊢ False
state_after: α : Type u
a : α
s t : Set α
x : α
H : ∃ y ∈ {x}, y ≠ x
⊢ False

tactic: let ⟨y, hy, hya⟩ := H
state_before: α : Type u
a : α
s t : Set α
x : α
H : ∃ y ∈ {x}, y ≠ x
⊢ False
state_after: α : Type u
a : α
s t : Set α
x : α
H : ∃ y ∈ {x}, y ≠ x
y : α
hy : y ∈ {x}
hya : y ≠ x
⊢ False

tactic: exact hya (mem_singleton_iff.1 hy)
state_before: α : Type u
a : α
s t : Set α
x : α
H : ∃ y ∈ {x}, y ≠ x
y : α
hy : y ∈ {x}
hya : y ≠ x
⊢ False
state_after: no goals
Theorem: Finset.mem_smul_finset
File: Mathlib/Data/Finset/Pointwise.lean

tactic: simp only [Finset.smul_finset_def, and_assoc, mem_image, exists_prop, Prod.exists, mem_product]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : DecidableEq β
inst✝ : SMul α β
s s₁ s₂ t u : Finset β
a : α
b x : β
⊢ x ∈ a • s ↔ ∃ y ∈ s, a • y = x
state_after: no goals
Theorem: CategoryTheory.Limits.Cofork.app_zero_eq_comp_π_left
File: Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean

tactic: rw [← s.app_one_eq_π, ← s.w left, parallelPair_map_left]
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : C
f g : X ⟶ Y
s : Cofork f g
⊢ s.ι.app zero = f ≫ s.π
state_after: no goals
Theorem: IsSubgroup.univ_subgroup
File: Mathlib/Deprecated/Subgroup.lean

tactic: refine ⟨⟨⟨?_, ?_⟩, ?_⟩, ?_⟩ <;> simp
state_before: G : Type u_1
H : Type u_2
A : Type u_3
a a₁ a₂ b c : G
inst✝ : Group G
⊢ IsNormalSubgroup univ
state_after: no goals
Theorem: Set.ordConnectedComponent_univ
File: Mathlib/Order/Interval/Set/OrdConnectedComponent.lean

tactic: simp [ordConnectedComponent]
state_before: α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x y z : α
⊢ univ.ordConnectedComponent x = univ
state_after: no goals
Theorem: Finset.prod_dvd_prod_of_dvd
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: induction' S using Finset.induction_on' with a T _haS _hTS haT IH
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
S : Finset α
g1 g2 : α → β
h : ∀ a ∈ S, g1 a ∣ g2 a
⊢ S.prod g1 ∣ S.prod g2
state_after: case h₁
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
g1 g2 : α → β
h : ∀ a ∈ ∅, g1 a ∣ g2 a
⊢ ∅.prod g1 ∣ ∅.prod g2

case h₂
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a✝ : α
f g : α → β
inst✝ : CommMonoid β
S : Finset α
g1 g2 : α → β
a : α
T : Finset α
_haS : a ∈ S
_hTS : T ⊆ S
haT : a ∉ T
IH : (∀ a ∈ T, g1 a ∣ g2 a) → T.prod g1 ∣ T.prod g2
h : ∀ a_1 ∈ insert a T, g1 a_1 ∣ g2 a_1
⊢ (insert a T).prod g1 ∣ (insert a T).prod g2

tactic: simp
state_before: case h₁
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
g1 g2 : α → β
h : ∀ a ∈ ∅, g1 a ∣ g2 a
⊢ ∅.prod g1 ∣ ∅.prod g2
state_after: no goals

tactic: rw [Finset.prod_insert haT, prod_insert haT]
state_before: case h₂
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a✝ : α
f g : α → β
inst✝ : CommMonoid β
S : Finset α
g1 g2 : α → β
a : α
T : Finset α
_haS : a ∈ S
_hTS : T ⊆ S
haT : a ∉ T
IH : (∀ a ∈ T, g1 a ∣ g2 a) → T.prod g1 ∣ T.prod g2
h : ∀ a_1 ∈ insert a T, g1 a_1 ∣ g2 a_1
⊢ (insert a T).prod g1 ∣ (insert a T).prod g2
state_after: case h₂
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a✝ : α
f g : α → β
inst✝ : CommMonoid β
S : Finset α
g1 g2 : α → β
a : α
T : Finset α
_haS : a ∈ S
_hTS : T ⊆ S
haT : a ∉ T
IH : (∀ a ∈ T, g1 a ∣ g2 a) → T.prod g1 ∣ T.prod g2
h : ∀ a_1 ∈ insert a T, g1 a_1 ∣ g2 a_1
⊢ g1 a * ∏ x ∈ T, g1 x ∣ g2 a * ∏ x ∈ T, g2 x

tactic: exact mul_dvd_mul (h a <| T.mem_insert_self a) <| IH fun b hb ↦ h b <| mem_insert_of_mem hb
state_before: case h₂
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a✝ : α
f g : α → β
inst✝ : CommMonoid β
S : Finset α
g1 g2 : α → β
a : α
T : Finset α
_haS : a ∈ S
_hTS : T ⊆ S
haT : a ∉ T
IH : (∀ a ∈ T, g1 a ∣ g2 a) → T.prod g1 ∣ T.prod g2
h : ∀ a_1 ∈ insert a T, g1 a_1 ∣ g2 a_1
⊢ g1 a * ∏ x ∈ T, g1 x ∣ g2 a * ∏ x ∈ T, g2 x
state_after: no goals
Theorem: Finset.nonempty_Ioi
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: simp [Finset.Nonempty]
state_before: ι : Type u_1
α : Type u_2
inst✝² : Preorder α
inst✝¹ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
inst✝ : LocallyFiniteOrderTop α
⊢ (Ioi a).Nonempty ↔ ¬IsMax a
state_after: no goals
Theorem: Polynomial.monic_X_pow_add_C
File: Mathlib/Algebra/Polynomial/Monic.lean

tactic: obtain ⟨k, rfl⟩ := Nat.exists_eq_succ_of_ne_zero h
state_before: R : Type u
S : Type v
a b : R
m n✝ : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
n : ℕ
h : n ≠ 0
⊢ (X ^ n + C a).Monic
state_after: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
k : ℕ
h : k.succ ≠ 0
⊢ (X ^ k.succ + C a).Monic

tactic: exact monic_X_pow_add <| degree_C_le.trans Nat.WithBot.coe_nonneg
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
k : ℕ
h : k.succ ≠ 0
⊢ (X ^ k.succ + C a).Monic
state_after: no goals
Theorem: AffineBasis.basisOf_reindex
File: Mathlib/LinearAlgebra/AffineSpace/Basis.lean

tactic: ext j
state_before: ι : Type u_1
ι' : Type u_2
k : Type u_3
V : Type u_4
P : Type u_5
inst✝³ : AddCommGroup V
inst✝² : AffineSpace V P
inst✝¹ : Ring k
inst✝ : Module k V
b : AffineBasis ι k P
s : Finset ι
i✝ j : ι
e : ι ≃ ι'
i : ι'
⊢ (b.reindex e).basisOf i = (b.basisOf (e.symm i)).reindex (e.subtypeEquiv ⋯)
state_after: case a
ι : Type u_1
ι' : Type u_2
k : Type u_3
V : Type u_4
P : Type u_5
inst✝³ : AddCommGroup V
inst✝² : AffineSpace V P
inst✝¹ : Ring k
inst✝ : Module k V
b : AffineBasis ι k P
s : Finset ι
i✝ j✝ : ι
e : ι ≃ ι'
i : ι'
j : { j // j ≠ i }
⊢ ((b.reindex e).basisOf i) j = ((b.basisOf (e.symm i)).reindex (e.subtypeEquiv ⋯)) j

tactic: simp
state_before: case a
ι : Type u_1
ι' : Type u_2
k : Type u_3
V : Type u_4
P : Type u_5
inst✝³ : AddCommGroup V
inst✝² : AffineSpace V P
inst✝¹ : Ring k
inst✝ : Module k V
b : AffineBasis ι k P
s : Finset ι
i✝ j✝ : ι
e : ι ≃ ι'
i : ι'
j : { j // j ≠ i }
⊢ ((b.reindex e).basisOf i) j = ((b.basisOf (e.symm i)).reindex (e.subtypeEquiv ⋯)) j
state_after: no goals
Theorem: ConvexOn.monotoneOn_derivWithin
File: Mathlib/Analysis/Convex/Deriv.lean

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

tactic: rcases eq_or_lt_of_le hxy with rfl | hxy'
state_before: S : Set ℝ
f : ℝ → ℝ
x✝ y✝ f' : ℝ
hfc : ConvexOn ℝ S f
hfd : DifferentiableOn ℝ f S
x : ℝ
hx : x ∈ S
y : ℝ
hy : y ∈ S
hxy : x ≤ y
⊢ derivWithin f S x ≤ derivWithin f S y
state_after: case inl
S : Set ℝ
f : ℝ → ℝ
x✝ y f' : ℝ
hfc : ConvexOn ℝ 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 : ConvexOn ℝ S f
hfd : DifferentiableOn ℝ f S
x : ℝ
hx : x ∈ S
y : ℝ
hy : y ∈ S
hxy : x ≤ y
hxy' : x < y
⊢ derivWithin f S x ≤ derivWithin f S y

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

tactic: rfl
state_before: case inl
S : Set ℝ
f : ℝ → ℝ
x✝ y f' : ℝ
hfc : ConvexOn ℝ 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: CategoryTheory.isoSheafify_inv
File: Mathlib/CategoryTheory/Sites/Sheafification.lean

tactic: apply sheafifyLift_unique
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
J : GrothendieckTopology C
A : Type u₂
inst✝² : Category.{v₂, u₂} A
D : Type u_1
inst✝¹ : Category.{u_2, u_1} D
inst✝ : HasWeakSheafify J D
P : Cᵒᵖ ⥤ D
hP : Presheaf.IsSheaf J P
⊢ (isoSheafify J hP).inv = sheafifyLift J (𝟙 P) hP
state_after: case a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
J : GrothendieckTopology C
A : Type u₂
inst✝² : Category.{v₂, u₂} A
D : Type u_1
inst✝¹ : Category.{u_2, u_1} D
inst✝ : HasWeakSheafify J D
P : Cᵒᵖ ⥤ D
hP : Presheaf.IsSheaf J P
⊢ toSheafify J P ≫ (isoSheafify J hP).inv = 𝟙 P

tactic: simp [Iso.comp_inv_eq]
state_before: case a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
J : GrothendieckTopology C
A : Type u₂
inst✝² : Category.{v₂, u₂} A
D : Type u_1
inst✝¹ : Category.{u_2, u_1} D
inst✝ : HasWeakSheafify J D
P : Cᵒᵖ ⥤ D
hP : Presheaf.IsSheaf J P
⊢ toSheafify J P ≫ (isoSheafify J hP).inv = 𝟙 P
state_after: no goals
Theorem: Filter.map_comm
File: Mathlib/Order/Filter/Basic.lean

tactic: rw [Filter.map_map, H, ← Filter.map_map]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l f f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
φ : α → β
θ : α → γ
ψ : β → δ
ρ : γ → δ
H : ψ ∘ φ = ρ ∘ θ
F : Filter α
⊢ map ψ (map φ F) = map ρ (map θ F)
state_after: no goals
Theorem: Batteries.UnionFind.rootD_parent
File: .lake/packages/batteries/Batteries/Data/UnionFind/Basic.lean

tactic: simp [rootD, parent_lt]
state_before: self : UnionFind
x : Nat
⊢ self.rootD (self.parent x) = self.rootD x
state_after: self : UnionFind
x : Nat
⊢ (if h : x < self.arr.size then ↑(self.root ⟨self.parent x, ⋯⟩) else self.parent x) =
    if h : x < self.arr.size then ↑(self.root ⟨x, ⋯⟩) else x

tactic: split <;> simp [parentD, parentD_of_not_lt, *, -Array.get_eq_getElem]
state_before: self : UnionFind
x : Nat
⊢ (if h : x < self.arr.size then ↑(self.root ⟨self.parent x, ⋯⟩) else self.parent x) =
    if h : x < self.arr.size then ↑(self.root ⟨x, ⋯⟩) else x
state_after: case isTrue
self : UnionFind
x : Nat
h✝ : x < self.arr.size
⊢ ↑(self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩) = ↑(self.root ⟨x, ⋯⟩)

tactic: (conv => rhs; rw [root])
state_before: case isTrue
self : UnionFind
x : Nat
h✝ : x < self.arr.size
⊢ ↑(self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩) = ↑(self.root ⟨x, ⋯⟩)
state_after: case isTrue
self : UnionFind
x : Nat
h✝ : x < self.arr.size
⊢ ↑(self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩) =
    ↑(if h : (self.arr.get ⟨x, ⋯⟩).parent = ↑⟨x, ⋯⟩ then ⟨x, ⋯⟩
      else
        let_fun this := ⋯;
        self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩)

tactic: split
state_before: case isTrue
self : UnionFind
x : Nat
h✝ : x < self.arr.size
⊢ ↑(self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩) =
    ↑(if h : (self.arr.get ⟨x, ⋯⟩).parent = ↑⟨x, ⋯⟩ then ⟨x, ⋯⟩
      else
        let_fun this := ⋯;
        self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩)
state_after: case isTrue.isTrue
self : UnionFind
x : Nat
h✝¹ : x < self.arr.size
h✝ : (self.arr.get ⟨x, ⋯⟩).parent = ↑⟨x, ⋯⟩
⊢ ↑(self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩) = ↑⟨x, ⋯⟩

case isTrue.isFalse
self : UnionFind
x : Nat
h✝¹ : x < self.arr.size
h✝ : ¬(self.arr.get ⟨x, ⋯⟩).parent = ↑⟨x, ⋯⟩
⊢ ↑(self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩) =
    ↑(let_fun this := ⋯;
      self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩)

tactic: conv => rhs; rw [root]
state_before: case isTrue
self : UnionFind
x : Nat
h✝ : x < self.arr.size
⊢ ↑(self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩) = ↑(self.root ⟨x, ⋯⟩)
state_after: case isTrue
self : UnionFind
x : Nat
h✝ : x < self.arr.size
⊢ ↑(self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩) =
    ↑(if h : (self.arr.get ⟨x, ⋯⟩).parent = ↑⟨x, ⋯⟩ then ⟨x, ⋯⟩
      else
        let_fun this := ⋯;
        self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩)

tactic: rw [root, dif_pos] <;> simp [*, -Array.get_eq_getElem]
state_before: case isTrue.isTrue
self : UnionFind
x : Nat
h✝¹ : x < self.arr.size
h✝ : (self.arr.get ⟨x, ⋯⟩).parent = ↑⟨x, ⋯⟩
⊢ ↑(self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩) = ↑⟨x, ⋯⟩
state_after: no goals

tactic: simp
state_before: case isTrue.isFalse
self : UnionFind
x : Nat
h✝¹ : x < self.arr.size
h✝ : ¬(self.arr.get ⟨x, ⋯⟩).parent = ↑⟨x, ⋯⟩
⊢ ↑(self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩) =
    ↑(let_fun this := ⋯;
      self.root ⟨(self.arr.get ⟨x, ⋯⟩).parent, ⋯⟩)
state_after: no goals
Theorem: CategoryTheory.leftAdjointMate_id
File: Mathlib/CategoryTheory/Monoidal/Rigid/Basic.lean

tactic: simp [leftAdjointMate]
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
X : C
inst✝ : HasLeftDual X
⊢ (ᘁ𝟙 X) = 𝟙 ᘁX
state_after: no goals
Theorem: Equiv.Perm.IsCycle.of_zpow
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: cases n
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℤ
h1 : (f ^ n).IsCycle
h2 : f.support ⊆ (f ^ n).support
⊢ f.IsCycle
state_after: case ofNat
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
a✝ : ℕ
h1 : (f ^ Int.ofNat a✝).IsCycle
h2 : f.support ⊆ (f ^ Int.ofNat a✝).support
⊢ f.IsCycle

case negSucc
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
a✝ : ℕ
h1 : (f ^ Int.negSucc a✝).IsCycle
h2 : f.support ⊆ (f ^ Int.negSucc a✝).support
⊢ f.IsCycle

tactic: exact h1.of_pow h2
state_before: case ofNat
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
a✝ : ℕ
h1 : (f ^ Int.ofNat a✝).IsCycle
h2 : f.support ⊆ (f ^ Int.ofNat a✝).support
⊢ f.IsCycle
state_after: no goals

tactic: simp only [le_eq_subset, zpow_negSucc, Perm.support_inv] at h1 h2
state_before: case negSucc
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
a✝ : ℕ
h1 : (f ^ Int.negSucc a✝).IsCycle
h2 : f.support ⊆ (f ^ Int.negSucc a✝).support
⊢ f.IsCycle
state_after: case negSucc
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
a✝ : ℕ
h1 : (f ^ (a✝ + 1))⁻¹.IsCycle
h2 : f.support ⊆ (f ^ (a✝ + 1)).support
⊢ f.IsCycle

tactic: exact (inv_inv (f ^ _) ▸ h1.inv).of_pow h2
state_before: case negSucc
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
a✝ : ℕ
h1 : (f ^ (a✝ + 1))⁻¹.IsCycle
h2 : f.support ⊆ (f ^ (a✝ + 1)).support
⊢ f.IsCycle
state_after: no goals
Theorem: IntermediateField.extendScalars_adjoin
File: Mathlib/FieldTheory/Adjoin.lean

tactic: rw [extendScalars_restrictScalars, restrictScalars_adjoin]
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
K : IntermediateField F E
S : Set E
h : K ≤ adjoin F S
⊢ restrictScalars F (extendScalars h) = restrictScalars F (adjoin (↥K) S)
state_after: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
K : IntermediateField F E
S : Set E
h : K ≤ adjoin F S
⊢ adjoin F S = adjoin F (↑K ∪ S)

tactic: exact le_antisymm (adjoin.mono F S _ Set.subset_union_right) <| adjoin_le_iff.2 <|
  Set.union_subset h (subset_adjoin F S)
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
K : IntermediateField F E
S : Set E
h : K ≤ adjoin F S
⊢ adjoin F S = adjoin F (↑K ∪ S)
state_after: no goals
Theorem: InnerProductGeometry.angle_neg_right
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: unfold angle
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ angle x (-y) = π - angle x y
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ arccos (⟪x, -y⟫_ℝ / (‖x‖ * ‖-y‖)) = π - arccos (⟪x, y⟫_ℝ / (‖x‖ * ‖y‖))

tactic: rw [← Real.arccos_neg, norm_neg, inner_neg_right, neg_div]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ arccos (⟪x, -y⟫_ℝ / (‖x‖ * ‖-y‖)) = π - arccos (⟪x, y⟫_ℝ / (‖x‖ * ‖y‖))
state_after: no goals
Theorem: MeasureTheory.Submartingale.sub_supermartingale
File: Mathlib/Probability/Martingale/Basic.lean

tactic: rw [sub_eq_add_neg]
state_before: Ω : Type u_1
E : Type u_2
ι : Type u_3
inst✝⁵ : Preorder ι
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
f g : ι → Ω → E
ℱ : Filtration ι m0
inst✝¹ : Preorder E
inst✝ : CovariantClass E E (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
hf : Submartingale f ℱ μ
hg : Supermartingale g ℱ μ
⊢ Submartingale (f - g) ℱ μ
state_after: Ω : Type u_1
E : Type u_2
ι : Type u_3
inst✝⁵ : Preorder ι
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
f g : ι → Ω → E
ℱ : Filtration ι m0
inst✝¹ : Preorder E
inst✝ : CovariantClass E E (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
hf : Submartingale f ℱ μ
hg : Supermartingale g ℱ μ
⊢ Submartingale (f + -g) ℱ μ

tactic: exact hf.add hg.neg
state_before: Ω : Type u_1
E : Type u_2
ι : Type u_3
inst✝⁵ : Preorder ι
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : CompleteSpace E
f g : ι → Ω → E
ℱ : Filtration ι m0
inst✝¹ : Preorder E
inst✝ : CovariantClass E E (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
hf : Submartingale f ℱ μ
hg : Supermartingale g ℱ μ
⊢ Submartingale (f + -g) ℱ μ
state_after: no goals
Theorem: Matrix.vecMul_fromColumns
File: Mathlib/Data/Matrix/ColumnRowPartitioned.lean

tactic: ext (_ | _) <;> rfl
state_before: R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
B₁ : Matrix m n₁ R
B₂ : Matrix m n₂ R
v : m → R
⊢ v ᵥ* B₁.fromColumns B₂ = Sum.elim (v ᵥ* B₁) (v ᵥ* B₂)
state_after: no goals
Theorem: Fin.castSucc_pred_lt
File: Mathlib/Data/Fin/Basic.lean

tactic: rw [castSucc_pred_lt_iff, le_def]
state_before: n m : ℕ
a : Fin (n + 1)
ha : a ≠ 0
⊢ (a.pred ha).castSucc < a
state_after: no goals