tasksource/leandojo huggingface dataset:
Theorem: CategoryTheory.OplaxNatTrans.whiskerRight_naturality_comp
File: Mathlib/CategoryTheory/Bicategory/NaturalTransformation.lean

tactic: rw [← associator_naturality_middle, ← comp_whiskerRight_assoc, naturality_comp]
state_before: B : Type u₁
inst✝¹ : Bicategory B
C : Type u₂
inst✝ : Bicategory C
F G H : OplaxFunctor B C
η : OplaxNatTrans F G
θ : OplaxNatTrans G H
a b c : B
a' : C
f : a ⟶ b
g : b ⟶ c
h : (↑G.toPrelaxFunctor).obj c ⟶ a'
⊢ naturality η (f ≫ g) ▷ h ≫
      (α_ (app η a) ((↑G.toPrelaxFunctor).map (f ≫ g)) h).hom ≫ app η a ◁ OplaxFunctor.mapComp G f g ▷ h =
    OplaxFunctor.mapComp F f g ▷ app η c ▷ h ≫
      (α_ ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g) (app η c)).hom ▷ h ≫
        (α_ ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g ≫ app η c) h).hom ≫
          (↑F.toPrelaxFunctor).map f ◁ naturality η g ▷ h ≫
            (α_ ((↑F.toPrelaxFunctor).map f) (app η b ≫ (↑G.toPrelaxFunctor).map g) h).inv ≫
              (α_ ((↑F.toPrelaxFunctor).map f) (app η b) ((↑G.toPrelaxFunctor).map g)).inv ▷ h ≫
                naturality η f ▷ (↑G.toPrelaxFunctor).map g ▷ h ≫
                  (α_ (app η a) ((↑G.toPrelaxFunctor).map f) ((↑G.toPrelaxFunctor).map g)).hom ▷ h ≫
                    (α_ (app η a) ((↑G.toPrelaxFunctor).map f ≫ (↑G.toPrelaxFunctor).map g) h).hom

tactic: simp
state_before: B : Type u₁
inst✝¹ : Bicategory B
C : Type u₂
inst✝ : Bicategory C
F G H : OplaxFunctor B C
η : OplaxNatTrans F G
θ : OplaxNatTrans G H
a b c : B
a' : C
f : a ⟶ b
g : b ⟶ c
h : (↑G.toPrelaxFunctor).obj c ⟶ a'
⊢ (OplaxFunctor.mapComp F f g ▷ app η c ≫
          (α_ ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g) (app η c)).hom ≫
            (↑F.toPrelaxFunctor).map f ◁ naturality η g ≫
              (α_ ((↑F.toPrelaxFunctor).map f) (app η b) ((↑G.toPrelaxFunctor).map g)).inv ≫
                naturality η f ▷ (↑G.toPrelaxFunctor).map g ≫
                  (α_ (app η a) ((↑G.toPrelaxFunctor).map f) ((↑G.toPrelaxFunctor).map g)).hom) ▷
        h ≫
      (α_ (app η a) ((↑G.toPrelaxFunctor).map f ≫ (↑G.toPrelaxFunctor).map g) h).hom =
    OplaxFunctor.mapComp F f g ▷ app η c ▷ h ≫
      (α_ ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g) (app η c)).hom ▷ h ≫
        (α_ ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g ≫ app η c) h).hom ≫
          (↑F.toPrelaxFunctor).map f ◁ naturality η g ▷ h ≫
            (α_ ((↑F.toPrelaxFunctor).map f) (app η b ≫ (↑G.toPrelaxFunctor).map g) h).inv ≫
              (α_ ((↑F.toPrelaxFunctor).map f) (app η b) ((↑G.toPrelaxFunctor).map g)).inv ▷ h ≫
                naturality η f ▷ (↑G.toPrelaxFunctor).map g ▷ h ≫
                  (α_ (app η a) ((↑G.toPrelaxFunctor).map f) ((↑G.toPrelaxFunctor).map g)).hom ▷ h ≫
                    (α_ (app η a) ((↑G.toPrelaxFunctor).map f ≫ (↑G.toPrelaxFunctor).map g) h).hom
Theorem: List.nil_eq_append
File: Std/Data/List/Lemmas.lean

tactic: rw [eq_comm, append_eq_nil]
state_before: α✝ : Type u_1
a b : List α✝
⊢ [] = a ++ b ↔ a = [] ∧ b = []
Theorem: Matrix.conjTranspose_circulant
File: Mathlib/LinearAlgebra/Matrix/Circulant.lean

tactic: ext
state_before: α : Type u_1
β : Type ?u.7051
m : Type ?u.7054
n : Type u_2
R : Type ?u.7060
inst✝¹ : Star α
inst✝ : AddGroup n
v : n → α
⊢ (circulant v)ᴴ = circulant (star fun i => v (-i))

tactic: simp
state_before: case a.h
α : Type u_1
β : Type ?u.7051
m : Type ?u.7054
n : Type u_2
R : Type ?u.7060
inst✝¹ : Star α
inst✝ : AddGroup n
v : n → α
i✝ x✝ : n
⊢ (circulant v)ᴴ i✝ x✝ = circulant (star fun i => v (-i)) i✝ x✝
Theorem: Finset.inter_sdiff_self
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [mem_inter, mem_sdiff]
state_before: α : Type u_1
β : Type ?u.221592
γ : Type ?u.221595
inst✝ : DecidableEq α
s t u v : Finset α
a b : α
s₁ s₂ : Finset α
⊢ ∀ (x : α), ¬x ∈ s₁ ∩ (s₂ \ s₁)

tactic: rintro x ⟨h, _, hn⟩
state_before: α : Type u_1
β : Type ?u.221592
γ : Type ?u.221595
inst✝ : DecidableEq α
s t u v : Finset α
a b : α
s₁ s₂ : Finset α
⊢ ∀ (x : α), ¬(x ∈ s₁ ∧ x ∈ s₂ ∧ ¬x ∈ s₁)

tactic: exact hn h
state_before: case intro.intro
α : Type u_1
β : Type ?u.221592
γ : Type ?u.221595
inst✝ : DecidableEq α
s t u v : Finset α
a b : α
s₁ s₂ : Finset α
x : α
h : x ∈ s₁
left✝ : x ∈ s₂
hn : ¬x ∈ s₁
⊢ False
Theorem: Equiv.Perm.signAux_swap_zero_one
File: Mathlib/GroupTheory/Perm/Sign.lean

tactic: decide
state_before: α : Type u
β : Type v
inst✝ : DecidableEq α
n : ℕ
hn : 2 ≤ n
⊢ 0 < 2

tactic: decide
state_before: α : Type u
β : Type v
inst✝ : DecidableEq α
n : ℕ
hn : 2 ≤ n
⊢ 1 < 2

tactic: rcases n with (_ | _ | n)
state_before: α : Type u
β : Type v
inst✝ : DecidableEq α
n : ℕ
hn : 2 ≤ n
⊢ signAux (swap { val := 0, isLt := (_ : 0 < n) } { val := 1, isLt := (_ : 1 < n) }) = -1

tactic: norm_num at hn
state_before: case zero
α : Type u
β : Type v
inst✝ : DecidableEq α
hn : 2 ≤ Nat.zero
⊢ signAux (swap { val := 0, isLt := (_ : 0 < Nat.zero) } { val := 1, isLt := (_ : 1 < Nat.zero) }) = -1

tactic: norm_num at hn
state_before: case succ.zero
α : Type u
β : Type v
inst✝ : DecidableEq α
hn : 2 ≤ Nat.succ Nat.zero
⊢ signAux (swap { val := 0, isLt := (_ : 0 < Nat.succ Nat.zero) } { val := 1, isLt := (_ : 1 < Nat.succ Nat.zero) }) =
    -1

tactic: exact signAux_swap_zero_one' n
state_before: case succ.succ
α : Type u
β : Type v
inst✝ : DecidableEq α
n : ℕ
hn : 2 ≤ Nat.succ (Nat.succ n)
⊢ signAux
      (swap { val := 0, isLt := (_ : 0 < Nat.succ (Nat.succ n)) }
        { val := 1, isLt := (_ : 1 < Nat.succ (Nat.succ n)) }) =
    -1
Theorem: CategoryTheory.IsPushout.of_is_bilimit'
File: Mathlib/CategoryTheory/Limits/Shapes/CommSq.lean

tactic: refine' IsPushout.of_right _ (by simp) (IsPushout.inl_snd' h)
state_before: C : Type u₁
inst✝² : Category C
Z X Y P : C
f : Z ⟶ X
g : Z ⟶ Y
inl : X ⟶ P
inr : Y ⟶ P
inst✝¹ : HasZeroObject C
inst✝ : HasZeroMorphisms C
b : BinaryBicone X Y
h : BinaryBicone.IsBilimit b
⊢ IsPushout b.fst b.snd 0 0

tactic: simp
state_before: C : Type u₁
inst✝² : Category C
Z X Y P : C
f : Z ⟶ X
g : Z ⟶ Y
inl : X ⟶ P
inr : Y ⟶ P
inst✝¹ : HasZeroObject C
inst✝ : HasZeroMorphisms C
b : BinaryBicone X Y
h : BinaryBicone.IsBilimit b
⊢ IsPushout (b.inl ≫ b.fst) 0 0 (0 ≫ 0)

tactic: simp
state_before: C : Type u₁
inst✝² : Category C
Z X Y P : C
f : Z ⟶ X
g : Z ⟶ Y
inl : X ⟶ P
inr : Y ⟶ P
inst✝¹ : HasZeroObject C
inst✝ : HasZeroMorphisms C
b : BinaryBicone X Y
h : BinaryBicone.IsBilimit b
⊢ b.fst ≫ 0 = b.snd ≫ 0
Theorem: Int.div_self
File: Std/Data/Int/DivMod.lean

tactic: have := Int.mul_div_cancel 1 H
state_before: a : Int
H : a ≠ 0
⊢ div a a = 1

tactic: rwa [Int.one_mul] at this
state_before: a : Int
H : a ≠ 0
this : div (1 * a) a = 1
⊢ div a a = 1
Theorem: Int.le_of_sub_nonpos
File: Std/Data/Int/Lemmas.lean

tactic: have h := Int.add_le_add_right h b
state_before: a b : Int
h : a - b ≤ 0
⊢ a ≤ b

tactic: rwa [Int.sub_add_cancel, Int.zero_add] at h
state_before: a b : Int
h✝ : a - b ≤ 0
h : a - b + b ≤ 0 + b
⊢ a ≤ b
Theorem: Finsupp.neLocus_eq_empty
File: Mathlib/Data/Finsupp/NeLocus.lean

tactic: simp only [neLocus, Ne.def, eq_self_iff_true, not_true, Finset.filter_False]
state_before: α : Type u_1
M : Type ?u.2977
N : Type u_2
P : Type ?u.2983
inst✝² : DecidableEq α
inst✝¹ : DecidableEq N
inst✝ : Zero N
f✝ g✝ f g : α →₀ N
h : f = g
⊢ neLocus f f = ∅
Theorem: Matrix.toLinAlgEquiv_toMatrixAlgEquiv
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: rw [← Matrix.toLinAlgEquiv_symm, AlgEquiv.apply_symm_apply]
state_before: R : Type u_1
inst✝⁹ : CommSemiring R
l : Type ?u.2268827
m : Type ?u.2268830
n : Type u_3
inst✝⁸ : Fintype n
inst✝⁷ : Fintype m
inst✝⁶ : DecidableEq n
M₁ : Type u_2
M₂ : Type ?u.2268854
inst✝⁵ : AddCommMonoid M₁
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R M₁
inst✝² : Module R M₂
v₁ : Basis n R M₁
v₂ : Basis m R M₂
M₃ : Type ?u.2269356
inst✝¹ : AddCommMonoid M₃
inst✝ : Module R M₃
v₃ : Basis l R M₃
f : M₁ →ₗ[R] M₁
⊢ ↑(toLinAlgEquiv v₁) (↑(toMatrixAlgEquiv v₁) f) = f
Theorem: Wcovby.eq_or_eq
File: Mathlib/Order/Cover.lean

tactic: rcases h2.eq_or_lt with (h2 | h2)
state_before: α : Type u_1
β : Type ?u.16370
inst✝ : PartialOrder α
a b c : α
h : a ⩿ b
h2 : a ≤ c
h3 : c ≤ b
⊢ c = a ∨ c = b

tactic: rcases h3.eq_or_lt with (h3 | h3)
state_before: case inr
α : Type u_1
β : Type ?u.16370
inst✝ : PartialOrder α
a b c : α
h : a ⩿ b
h2✝ : a ≤ c
h3 : c ≤ b
h2 : a < c
⊢ c = a ∨ c = b

tactic: exact (h.2 h2 h3).elim
state_before: case inr.inr
α : Type u_1
β : Type ?u.16370
inst✝ : PartialOrder α
a b c : α
h : a ⩿ b
h2✝ : a ≤ c
h3✝ : c ≤ b
h2 : a < c
h3 : c < b
⊢ c = a ∨ c = b

tactic: exact Or.inl h2.symm
state_before: case inl
α : Type u_1
β : Type ?u.16370
inst✝ : PartialOrder α
a b c : α
h : a ⩿ b
h2✝ : a ≤ c
h3 : c ≤ b
h2 : a = c
⊢ c = a ∨ c = b

tactic: exact Or.inr h3
state_before: case inr.inl
α : Type u_1
β : Type ?u.16370
inst✝ : PartialOrder α
a b c : α
h : a ⩿ b
h2✝ : a ≤ c
h3✝ : c ≤ b
h2 : a < c
h3 : c = b
⊢ c = a ∨ c = b
Theorem: List.prod_rotate_eq_one_of_prod_eq_one
File: Mathlib/Data/List/Rotate.lean

tactic: simp
state_before: α : Type u
inst✝ : Group α
x✝¹ : prod [] = 1
x✝ : ℕ
⊢ prod (rotate [] x✝) = 1

tactic: have : n % List.length (a :: l) ≤ List.length (a :: l) := le_of_lt (Nat.mod_lt _ (by simp))
state_before: α : Type u
inst✝ : Group α
a : α
l : List α
hl : prod (a :: l) = 1
n : ℕ
⊢ prod (rotate (a :: l) n) = 1

tactic: rw [← List.take_append_drop (n % List.length (a :: l)) (a :: l)] at hl
state_before: α : Type u
inst✝ : Group α
a : α
l : List α
hl : prod (a :: l) = 1
n : ℕ
this : n % length (a :: l) ≤ length (a :: l)
⊢ prod (rotate (a :: l) n) = 1

tactic: rw [← rotate_mod, rotate_eq_drop_append_take this, List.prod_append, mul_eq_one_iff_inv_eq, ←
  one_mul (List.prod _)⁻¹, ← hl, List.prod_append, mul_assoc, mul_inv_self, mul_one]
state_before: α : Type u
inst✝ : Group α
a : α
l : List α
n : ℕ
hl : prod (take (n % length (a :: l)) (a :: l) ++ drop (n % length (a :: l)) (a :: l)) = 1
this : n % length (a :: l) ≤ length (a :: l)
⊢ prod (rotate (a :: l) n) = 1

tactic: simp
state_before: α : Type u
inst✝ : Group α
a : α
l : List α
hl : prod (a :: l) = 1
n : ℕ
⊢ length (a :: l) > 0
Theorem: Ordinal.le_bmex_of_forall
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: by_contra' h
state_before: α : Type ?u.382605
β : Type ?u.382608
γ : Type ?u.382611
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
f : (a : Ordinal) → a < o → Ordinal
a : Ordinal
H : ∀ (b : Ordinal), b < a → ∃ i hi, f i hi = b
⊢ a ≤ bmex o f

tactic: exact bmex_not_mem_brange f (H _ h)
state_before: α : Type ?u.382605
β : Type ?u.382608
γ : Type ?u.382611
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
f : (a : Ordinal) → a < o → Ordinal
a : Ordinal
H : ∀ (b : Ordinal), b < a → ∃ i hi, f i hi = b
h : bmex o f < a
⊢ False
Theorem: ContinuousMap.dist_lt_iff
File: Mathlib/Topology/ContinuousFunction/Compact.lean

tactic: rw [← dist_mkOfCompact, dist_lt_iff_of_compact C0]
state_before: α : Type u_1
β : Type u_2
E : Type ?u.78801
inst✝³ : TopologicalSpace α
inst✝² : CompactSpace α
inst✝¹ : MetricSpace β
inst✝ : NormedAddCommGroup E
f g : C(α, β)
C : ℝ
C0 : 0 < C
⊢ dist f g < C ↔ ∀ (x : α), dist (↑f x) (↑g x) < C

tactic: simp only [mkOfCompact_apply]
state_before: α : Type u_1
β : Type u_2
E : Type ?u.78801
inst✝³ : TopologicalSpace α
inst✝² : CompactSpace α
inst✝¹ : MetricSpace β
inst✝ : NormedAddCommGroup E
f g : C(α, β)
C : ℝ
C0 : 0 < C
⊢ (∀ (x : α), dist (↑(mkOfCompact f) x) (↑(mkOfCompact g) x) < C) ↔ ∀ (x : α), dist (↑f x) (↑g x) < C
Theorem: BoundedContinuousFunction.toLp_denseRange
File: Mathlib/MeasureTheory/Function/ContinuousMapDense.lean

tactic: haveI : NormedSpace ℝ E := RestrictScalars.normedSpace ℝ 𝕜 E
state_before: α : Type u_1
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : NormalSpace α
inst✝⁷ : BorelSpace α
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
p : ℝ≥0∞
inst✝⁵ : SecondCountableTopologyEither α E
_i : Fact (1 ≤ p)
hp : p ≠ ⊤
𝕜 : Type u_3
inst✝⁴ : NormedField 𝕜
inst✝³ : NormedAlgebra ℝ 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : Measure.WeaklyRegular μ
inst✝ : IsFiniteMeasure μ
⊢ DenseRange ↑(toLp p μ 𝕜)

tactic: rw [denseRange_iff_closure_range]
state_before: α : Type u_1
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : NormalSpace α
inst✝⁷ : BorelSpace α
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
p : ℝ≥0∞
inst✝⁵ : SecondCountableTopologyEither α E
_i : Fact (1 ≤ p)
hp : p ≠ ⊤
𝕜 : Type u_3
inst✝⁴ : NormedField 𝕜
inst✝³ : NormedAlgebra ℝ 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : Measure.WeaklyRegular μ
inst✝ : IsFiniteMeasure μ
this : NormedSpace ℝ E
⊢ DenseRange ↑(toLp p μ 𝕜)

tactic: suffices (LinearMap.range (toLp p μ 𝕜 : _ →L[𝕜] Lp E p μ)).toAddSubgroup.topologicalClosure = ⊤
  by exact congr_arg ((↑) : AddSubgroup (Lp E p μ) → Set (Lp E p μ)) this
state_before: α : Type u_1
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : NormalSpace α
inst✝⁷ : BorelSpace α
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
p : ℝ≥0∞
inst✝⁵ : SecondCountableTopologyEither α E
_i : Fact (1 ≤ p)
hp : p ≠ ⊤
𝕜 : Type u_3
inst✝⁴ : NormedField 𝕜
inst✝³ : NormedAlgebra ℝ 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : Measure.WeaklyRegular μ
inst✝ : IsFiniteMeasure μ
this : NormedSpace ℝ E
⊢ closure (range ↑(toLp p μ 𝕜)) = univ

tactic: simpa [range_toLp p μ] using MeasureTheory.Lp.boundedContinuousFunction_dense E hp
state_before: α : Type u_1
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : NormalSpace α
inst✝⁷ : BorelSpace α
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
p : ℝ≥0∞
inst✝⁵ : SecondCountableTopologyEither α E
_i : Fact (1 ≤ p)
hp : p ≠ ⊤
𝕜 : Type u_3
inst✝⁴ : NormedField 𝕜
inst✝³ : NormedAlgebra ℝ 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : Measure.WeaklyRegular μ
inst✝ : IsFiniteMeasure μ
this : NormedSpace ℝ E
⊢ AddSubgroup.topologicalClosure (Submodule.toAddSubgroup (LinearMap.range (toLp p μ 𝕜))) = ⊤

tactic: exact congr_arg ((↑) : AddSubgroup (Lp E p μ) → Set (Lp E p μ)) this
state_before: α : Type u_1
inst✝¹⁰ : MeasurableSpace α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : NormalSpace α
inst✝⁷ : BorelSpace α
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
μ : MeasureTheory.Measure α
p : ℝ≥0∞
inst✝⁵ : SecondCountableTopologyEither α E
_i : Fact (1 ≤ p)
hp : p ≠ ⊤
𝕜 : Type u_3
inst✝⁴ : NormedField 𝕜
inst✝³ : NormedAlgebra ℝ 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : Measure.WeaklyRegular μ
inst✝ : IsFiniteMeasure μ
this✝ : NormedSpace ℝ E
this : AddSubgroup.topologicalClosure (Submodule.toAddSubgroup (LinearMap.range (toLp p μ 𝕜))) = ⊤
⊢ closure (range ↑(toLp p μ 𝕜)) = univ
Theorem: Nat.add_mul_mod_self_right
File: Std/Data/Nat/Lemmas.lean

tactic: rw [Nat.mul_comm, add_mul_mod_self_left]
state_before: x y z : Nat
⊢ (x + y * z) % z = x % z
Theorem: Finset.le_sum_condensed
File: Mathlib/Analysis/PSeries.lean

tactic: convert add_le_add_left (le_sum_condensed' hf n) (f 0)
state_before: M : Type u_1
inst✝ : OrderedAddCommMonoid M
f : ℕ → M
hf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m
n : ℕ
⊢ ∑ k in range (2 ^ n), f k ≤ f 0 + ∑ k in range n, 2 ^ k • f (2 ^ k)

tactic: rw [← sum_range_add_sum_Ico _ n.one_le_two_pow, sum_range_succ, sum_range_zero, zero_add]
state_before: case h.e'_3
M : Type u_1
inst✝ : OrderedAddCommMonoid M
f : ℕ → M
hf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m
n : ℕ
⊢ ∑ k in range (2 ^ n), f k = f 0 + ∑ k in Ico 1 (2 ^ n), f k
Theorem: FinVec.seq_eq
File: Mathlib/Data/Fin/Tuple/Reflection.lean

tactic: simp_rw [seq, seq_eq]
state_before: m n✝ : ℕ
α : Type u_2
β : Type u_1
γ : Type ?u.1470
n : ℕ
f : Fin (n + 1) → α → β
v : Fin (n + 1) → α
i : Fin (n + 1)
⊢ seq f v i = f i (v i)

tactic: refine' i.cases _ fun i => _
state_before: m n✝ : ℕ
α : Type u_2
β : Type u_1
γ : Type ?u.1470
n : ℕ
f : Fin (n + 1) → α → β
v : Fin (n + 1) → α
i : Fin (n + 1)
⊢ Matrix.vecCons (f 0 (v 0)) (fun i => Matrix.vecTail f i (Matrix.vecTail v i)) i = f i (v i)

tactic: rfl
state_before: case refine'_1
m n✝ : ℕ
α : Type u_2
β : Type u_1
γ : Type ?u.1470
n : ℕ
f : Fin (n + 1) → α → β
v : Fin (n + 1) → α
i : Fin (n + 1)
⊢ Matrix.vecCons (f 0 (v 0)) (fun i => Matrix.vecTail f i (Matrix.vecTail v i)) 0 = f 0 (v 0)

tactic: rw [Matrix.cons_val_succ]
state_before: case refine'_2
m n✝ : ℕ
α : Type u_2
β : Type u_1
γ : Type ?u.1470
n : ℕ
f : Fin (n + 1) → α → β
v : Fin (n + 1) → α
i✝ : Fin (n + 1)
i : Fin n
⊢ Matrix.vecCons (f 0 (v 0)) (fun i => Matrix.vecTail f i (Matrix.vecTail v i)) (Fin.succ i) =
    f (Fin.succ i) (v (Fin.succ i))

tactic: rfl
state_before: case refine'_2
m n✝ : ℕ
α : Type u_2
β : Type u_1
γ : Type ?u.1470
n : ℕ
f : Fin (n + 1) → α → β
v : Fin (n + 1) → α
i✝ : Fin (n + 1)
i : Fin n
⊢ Matrix.vecTail f i (Matrix.vecTail v i) = f (Fin.succ i) (v (Fin.succ i))
Theorem: Metric.mem_ball_self
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rwa [mem_ball, dist_self]
state_before: α : Type u
β : Type v
X : Type ?u.25444
ι : Type ?u.25447
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
h : 0 < ε
⊢ x ∈ ball x ε
Theorem: Polynomial.divX_mul_X_add
File: Mathlib/Data/Polynomial/Inductions.lean

tactic: rintro ⟨_ | _⟩ <;> simp [coeff_C, Nat.succ_ne_zero, coeff_mul_X]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
⊢ ∀ (n : ℕ), coeff (divX p * X + ↑C (coeff p 0)) n = coeff p n
Theorem: iSup₂_comm
File: Mathlib/Order/CompleteLattice.lean

tactic: simp only [@iSup_comm _ (κ₁ _), @iSup_comm _ ι₁]
state_before: α : Type u_5
β : Type ?u.94563
β₂ : Type ?u.94566
γ : Type ?u.94569
ι : Sort ?u.94572
ι' : Sort ?u.94575
κ : ι → Sort ?u.94580
κ' : ι' → Sort ?u.94585
inst✝ : CompleteLattice α
f✝ g s t : ι → α
a b : α
ι₁ : Sort u_1
ι₂ : Sort u_2
κ₁ : ι₁ → Sort u_3
κ₂ : ι₂ → Sort u_4
f : (i₁ : ι₁) → κ₁ i₁ → (i₂ : ι₂) → κ₂ i₂ → α
⊢ (⨆ (i₁ : ι₁) (j₁ : κ₁ i₁) (i₂ : ι₂) (j₂ : κ₂ i₂), f i₁ j₁ i₂ j₂) =
    ⨆ (i₂ : ι₂) (j₂ : κ₂ i₂) (i₁ : ι₁) (j₁ : κ₁ i₁), f i₁ j₁ i₂ j₂
Theorem: Finset.sum_const_nat
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [← Nat.nsmul_eq_mul, ← sum_const]
state_before: ι : Type ?u.817246
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g : α → β
m : ℕ
f : α → ℕ
h₁ : ∀ (x : α), x ∈ s → f x = m
⊢ ∑ x in s, f x = card s * m

tactic: apply sum_congr rfl h₁
state_before: ι : Type ?u.817246
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f✝ g : α → β
m : ℕ
f : α → ℕ
h₁ : ∀ (x : α), x ∈ s → f x = m
⊢ ∑ x in s, f x = ∑ _x in s, m
Theorem: CategoryTheory.Limits.hasFiniteLimits_of_hasFiniteLimits_of_size
File: Mathlib/CategoryTheory/Limits/Shapes/FiniteLimits.lean

tactic: haveI := h (ULiftHom.{w} (ULift.{w} J)) <| @CategoryTheory.finCategoryUlift J hJ hhJ
state_before: C : Type u
inst✝ : Category C
h : ∀ (J : Type w) {𝒥 : SmallCategory J}, FinCategory J → HasLimitsOfShape J C
J : Type
hJ : SmallCategory J
hhJ : FinCategory J
⊢ HasLimitsOfShape J C

tactic: have l :
  @Equivalence J (ULiftHom (ULift J)) hJ (@ULiftHom.category (ULift J) (@uliftCategory J hJ))
  := @ULiftHomULiftCategory.equiv J hJ
state_before: C : Type u
inst✝ : Category C
h : ∀ (J : Type w) {𝒥 : SmallCategory J}, FinCategory J → HasLimitsOfShape J C
J : Type
hJ : SmallCategory J
hhJ : FinCategory J
this : HasLimitsOfShape (ULiftHom (ULift J)) C
⊢ HasLimitsOfShape J C

tactic: apply @hasLimitsOfShape_of_equivalence (ULiftHom (ULift J))
  (@ULiftHom.category (ULift J) (@uliftCategory J hJ)) C _ J hJ
  (@Equivalence.symm J hJ (ULiftHom (ULift J))
  (@ULiftHom.category (ULift J) (@uliftCategory J hJ)) l) _
state_before: C : Type u
inst✝ : Category C
h : ∀ (J : Type w) {𝒥 : SmallCategory J}, FinCategory J → HasLimitsOfShape J C
J : Type
hJ : SmallCategory J
hhJ : FinCategory J
this : HasLimitsOfShape (ULiftHom (ULift J)) C
l : J ≌ ULiftHom (ULift J)
⊢ HasLimitsOfShape J C
Theorem: Set.image_update_Ioo_left
File: Mathlib/Data/Set/Intervals/Pi.lean

tactic: simpa using image_update_Ioo f i a (f i)
state_before: ι : Type u_1
α : ι → Type u_2
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → PartialOrder (α i)
f : (i : ι) → α i
i : ι
a : α i
⊢ update f i '' Ioo a (f i) = Ioo (update f i a) f
Theorem: Nat.le_fib_self
File: Mathlib/Data/Nat/Fib.lean

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

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

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

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 (succ n)

tactic: decide
state_before: n✝ n : ℕ
five_le_n : Nat.le 5 n
IH : n ≤ fib n
⊢ 2 ≤ 5
Theorem: MeasureTheory.OuterMeasure.iUnion_null_iff'
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: by_cases i : ι <;> simp [i]
state_before: α : Type u_1
β : Type ?u.4975
R : Type ?u.4978
R' : Type ?u.4981
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
ι : Prop
s : ι → Set α
⊢ (∀ (i : ι), ↑m (s i) = 0) → ↑m (⋃ (i : ι), s i) = 0

tactic: exact (fun h => h (Iff.mpr (Iff.of_eq (eq_true i)) trivial))
state_before: case pos
α : Type u_1
β : Type ?u.4975
R : Type ?u.4978
R' : Type ?u.4981
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
ι : Prop
s : ι → Set α
i : ι
⊢ (∀ (i : ι), ↑m (s i) = 0) → ↑m (s (_ : ι)) = 0
Theorem: ENNReal.continuous_sub_left
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: refine continuousOn_sub.comp_continuous (Continuous.Prod.mk a) fun x => ?_
state_before: α : Type ?u.108898
β : Type ?u.108901
γ : Type ?u.108904
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
a : ℝ≥0∞
a_ne_top : a ≠ ⊤
⊢ Continuous (uncurry Sub.sub ∘ fun x => (a, x))

tactic: simp only [a_ne_top, Ne.def, mem_setOf_eq, Prod.mk.inj_iff, false_and_iff, not_false_iff]
state_before: α : Type ?u.108898
β : Type ?u.108901
γ : Type ?u.108904
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x✝ y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
a : ℝ≥0∞
a_ne_top : a ≠ ⊤
x : ℝ≥0∞
⊢ (a, x) ∈ {p | p ≠ (⊤, ⊤)}
Theorem: String.csize_pos
File: Std/Data/Char.lean

tactic: rcases csize_eq c with _|_|_|_ <;> simp_all
state_before: c : Char
⊢ 0 < csize c
Theorem: BoxIntegral.Prepartition.sum_fiberwise
File: Mathlib/Analysis/BoxIntegral/Partition/Basic.lean

tactic: convert sum_fiberwise_of_maps_to (fun _ => Finset.mem_image_of_mem f) g
state_before: ι : Type u_3
I J J₁ J₂ : Box ι
π✝ π₁ π₂ : Prepartition I
x : ι → ℝ
πi πi₁ πi₂ : (J : Box ι) → Prepartition J
α : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
π : Prepartition I
f : Box ι → α
g : Box ι → M
⊢ ∑ y in Finset.image f π.boxes, ∑ J in (filter π fun J => f J = y).boxes, g J = ∑ J in π.boxes, g J
Theorem: Set.Definable.preimage_comp
File: Mathlib/ModelTheory/Definability.lean

tactic: obtain ⟨φ, rfl⟩ := h
state_before: M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type u_1
B : Set M
s✝ : Set (α → M)
f : α → β
s : Set (α → M)
h : Definable A L s
⊢ Definable A L ((fun g => g ∘ f) ⁻¹' s)

tactic: refine' ⟨φ.relabel f, _⟩
state_before: case intro
M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type u_1
B : Set M
s : Set (α → M)
f : α → β
φ : Formula (L[[↑A]]) α
⊢ Definable A L ((fun g => g ∘ f) ⁻¹' setOf (Formula.Realize φ))

tactic: ext
state_before: case intro
M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type u_1
B : Set M
s : Set (α → M)
f : α → β
φ : Formula (L[[↑A]]) α
⊢ (fun g => g ∘ f) ⁻¹' setOf (Formula.Realize φ) = setOf (Formula.Realize (Formula.relabel f φ))

tactic: simp only [Set.preimage_setOf_eq, mem_setOf_eq, Formula.realize_relabel]
state_before: case intro.h
M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type u_1
B : Set M
s : Set (α → M)
f : α → β
φ : Formula (L[[↑A]]) α
x✝ : β → M
⊢ x✝ ∈ (fun g => g ∘ f) ⁻¹' setOf (Formula.Realize φ) ↔ x✝ ∈ setOf (Formula.Realize (Formula.relabel f φ))
Theorem: ENNReal.coe_rpow_of_ne_zero
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: rw [← ENNReal.some_eq_coe]
state_before: x : ℝ≥0
h : x ≠ 0
y : ℝ
⊢ ↑x ^ y = ↑(x ^ y)

tactic: simp [h]
state_before: x : ℝ≥0
h : x ≠ 0
y : ℝ
⊢ (if x = 0 ∧ y < 0 then ⊤ else ↑(NNReal.rpow x y)) = ↑(NNReal.rpow x y)
Theorem: Set.mem_ordConnectedComponent_comm
File: Mathlib/Data/Set/Intervals/OrdConnectedComponent.lean

tactic: rw [mem_ordConnectedComponent, mem_ordConnectedComponent, uIcc_comm]
state_before: α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x y z : α
⊢ y ∈ ordConnectedComponent s x ↔ x ∈ ordConnectedComponent s y