1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: hasStrictFDerivAt_euclidean
File: Mathlib/Analysis/InnerProductSpace/Calculus.lean

tactic: rw [← (EuclideanSpace.equiv ι 𝕜).comp_hasStrictFDerivAt_iff, hasStrictFDerivAt_pi']
state_before: 𝕜 : Type u_1
ι : Type u_2
H : Type u_3
inst✝³ : _root_.RCLike 𝕜
inst✝² : NormedAddCommGroup H
inst✝¹ : NormedSpace 𝕜 H
inst✝ : Fintype ι
f : H → EuclideanSpace 𝕜 ι
f' : H →L[𝕜] EuclideanSpace 𝕜 ι
t : Set H
y : H
⊢ HasStrictFDerivAt f f' y ↔ ∀ (i : ι), HasStrictFDerivAt (fun x => f x i) ((EuclideanSpace.proj i).comp f') y
state_after: 𝕜 : Type u_1
ι : Type u_2
H : Type u_3
inst✝³ : _root_.RCLike 𝕜
inst✝² : NormedAddCommGroup H
inst✝¹ : NormedSpace 𝕜 H
inst✝ : Fintype ι
f : H → EuclideanSpace 𝕜 ι
f' : H →L[𝕜] EuclideanSpace 𝕜 ι
t : Set H
y : H
⊢ (∀ (i : ι),
      HasStrictFDerivAt (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i)
        ((proj i).comp ((↑(EuclideanSpace.equiv ι 𝕜)).comp f')) y) ↔
    ∀ (i : ι), HasStrictFDerivAt (fun x => f x i) ((EuclideanSpace.proj i).comp f') y

tactic: rfl
state_before: 𝕜 : Type u_1
ι : Type u_2
H : Type u_3
inst✝³ : _root_.RCLike 𝕜
inst✝² : NormedAddCommGroup H
inst✝¹ : NormedSpace 𝕜 H
inst✝ : Fintype ι
f : H → EuclideanSpace 𝕜 ι
f' : H →L[𝕜] EuclideanSpace 𝕜 ι
t : Set H
y : H
⊢ (∀ (i : ι),
      HasStrictFDerivAt (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i)
        ((proj i).comp ((↑(EuclideanSpace.equiv ι 𝕜)).comp f')) y) ↔
    ∀ (i : ι), HasStrictFDerivAt (fun x => f x i) ((EuclideanSpace.proj i).comp f') y
state_after: no goals
Theorem: Mathlib.Meta.NormNum.intPow_negOfNat_bit1
File: Mathlib/Tactic/NormNum/Pow.lean

tactic: rw [← hb, Int.negOfNat_eq, Int.negOfNat_eq, Int.pow_eq, pow_succ, pow_mul, neg_pow_two, ← pow_mul,
  two_mul, pow_add, ← hc, ← h1]
state_before: a b' : ℕ
c' b c : ℕ
h1 : a.pow b' = c'
hb : 2 * b' + 1 = b
hc : c' * (c' * a) = c
⊢ (Int.negOfNat a).pow b = Int.negOfNat c
state_after: a b' : ℕ
c' b c : ℕ
h1 : a.pow b' = c'
hb : 2 * b' + 1 = b
hc : c' * (c' * a) = c
⊢ Int.ofNat a ^ b' * Int.ofNat a ^ b' * -Int.ofNat a = -Int.ofNat (a.pow b' * (a.pow b' * a))

tactic: simp [mul_assoc, mul_comm, mul_left_comm]
state_before: a b' : ℕ
c' b c : ℕ
h1 : a.pow b' = c'
hb : 2 * b' + 1 = b
hc : c' * (c' * a) = c
⊢ Int.ofNat a ^ b' * Int.ofNat a ^ b' * -Int.ofNat a = -Int.ofNat (a.pow b' * (a.pow b' * a))
state_after: no goals
Theorem: Real.ennnorm_eq_ofReal
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: rw [← ofReal_norm_eq_coe_nnnorm, norm_of_nonneg hr]
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝¹ : SeminormedCommGroup E
inst✝ : SeminormedCommGroup F
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
hr : 0 ≤ r
⊢ ↑‖r‖₊ = ENNReal.ofReal r
state_after: no goals
Theorem: Traversable.pure_traverse
File: Mathlib/Control/Traversable/Lemmas.lean

tactic: have : traverse pure x = pure (traverse (m := Id) pure x) :=
    (naturality (PureTransformation F) pure x).symm
state_before: t : Type u → Type u
inst✝⁵ : Traversable t
inst✝⁴ : LawfulTraversable t
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : LawfulApplicative F
inst✝¹ : Applicative G
inst✝ : LawfulApplicative G
α β γ : Type u
g : α → F β
h : β → G γ
f : β → γ
x✝ : t β
x : t α
⊢ traverse pure x = pure x
state_after: t : Type u → Type u
inst✝⁵ : Traversable t
inst✝⁴ : LawfulTraversable t
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : LawfulApplicative F
inst✝¹ : Applicative G
inst✝ : LawfulApplicative G
α β γ : Type u
g : α → F β
h : β → G γ
f : β → γ
x✝ : t β
x : t α
this : traverse pure x = pure (traverse pure x)
⊢ traverse pure x = pure x

tactic: rwa [id_traverse] at this
state_before: t : Type u → Type u
inst✝⁵ : Traversable t
inst✝⁴ : LawfulTraversable t
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : LawfulApplicative F
inst✝¹ : Applicative G
inst✝ : LawfulApplicative G
α β γ : Type u
g : α → F β
h : β → G γ
f : β → γ
x✝ : t β
x : t α
this : traverse pure x = pure (traverse pure x)
⊢ traverse pure x = pure x
state_after: no goals
Theorem: Complex.cos_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: rw [← ofReal_cos, Real.cos_pi]
state_before: ⊢ cos ↑π = -1
state_after: ⊢ ↑(-1) = -1

tactic: simp
state_before: ⊢ ↑(-1) = -1
state_after: no goals
Theorem: List.getLast_replicate_succ
File: Mathlib/Data/List/Basic.lean

tactic: simp only [replicate_succ']
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
m : ℕ
a : α
⊢ (replicate (m + 1) a).getLast ⋯ = a
state_after: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
m : ℕ
a : α
⊢ (replicate m a ++ [a]).getLast ⋯ = a

tactic: exact getLast_append_singleton _
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
m : ℕ
a : α
⊢ (replicate m a ++ [a]).getLast ⋯ = a
state_after: no goals
Theorem: singleton_mul_closedBall_one
File: Mathlib/Analysis/Normed/Group/Pointwise.lean

tactic: simp
state_before: E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x y : E
⊢ {x} * closedBall 1 δ = closedBall x δ
state_after: no goals
Theorem: Finite.exists_type_zero_nonempty_mulEquiv
File: Mathlib/Logic/Equiv/TransferInstance.lean

tactic: obtain ⟨n, ⟨e⟩⟩ := Finite.exists_equiv_fin G
state_before: α : Type u
β : Type v
G : Type u
inst✝¹ : Group G
inst✝ : Finite G
⊢ ∃ G' x x_1, Nonempty (G ≃* G')
state_after: case intro.intro
α : Type u
β : Type v
G : Type u
inst✝¹ : Group G
inst✝ : Finite G
n : ℕ
e : G ≃ Fin n
⊢ ∃ G' x x_1, Nonempty (G ≃* G')

tactic: letI groupH : Group (Fin n) := Equiv.group e.symm
state_before: case intro.intro
α : Type u
β : Type v
G : Type u
inst✝¹ : Group G
inst✝ : Finite G
n : ℕ
e : G ≃ Fin n
⊢ ∃ G' x x_1, Nonempty (G ≃* G')
state_after: case intro.intro
α : Type u
β : Type v
G : Type u
inst✝¹ : Group G
inst✝ : Finite G
n : ℕ
e : G ≃ Fin n
groupH : Group (Fin n) := e.symm.group
⊢ ∃ G' x x_1, Nonempty (G ≃* G')

tactic: exact ⟨Fin n, inferInstance, inferInstance, ⟨MulEquiv.symm <| Equiv.mulEquiv e.symm⟩⟩
state_before: case intro.intro
α : Type u
β : Type v
G : Type u
inst✝¹ : Group G
inst✝ : Finite G
n : ℕ
e : G ≃ Fin n
groupH : Group (Fin n) := e.symm.group
⊢ ∃ G' x x_1, Nonempty (G ≃* G')
state_after: no goals
Theorem: zpow_injective
File: Mathlib/Algebra/Order/Field/Power.lean

tactic: rcases h₁.lt_or_lt with (H | H)
state_before: α : Type u_1
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h₀ : 0 < a
h₁ : a ≠ 1
⊢ Injective fun x => a ^ x
state_after: case inl
α : Type u_1
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h₀ : 0 < a
h₁ : a ≠ 1
H : a < 1
⊢ Injective fun x => a ^ x

case inr
α : Type u_1
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h₀ : 0 < a
h₁ : a ≠ 1
H : 1 < a
⊢ Injective fun x => a ^ x

tactic: exact (zpow_strictAnti h₀ H).injective
state_before: case inl
α : Type u_1
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h₀ : 0 < a
h₁ : a ≠ 1
H : a < 1
⊢ Injective fun x => a ^ x
state_after: no goals

tactic: exact (zpow_strictMono H).injective
state_before: case inr
α : Type u_1
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h₀ : 0 < a
h₁ : a ≠ 1
H : 1 < a
⊢ Injective fun x => a ^ x
state_after: no goals
Theorem: List.mem_toArray
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: simp [Array.mem_def]
state_before: α : Type u_1
a : α
l : List α
⊢ a ∈ toArray l ↔ a ∈ l
state_after: no goals
Theorem: MeasurableEmbedding.measurableSet_image
File: Mathlib/MeasureTheory/MeasurableSpace/Embedding.lean

tactic: simpa only [hf.injective.preimage_image] using hf.measurable h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
mα : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
f : α → β
g : β → γ
hf : MeasurableEmbedding f
h : MeasurableSet (f '' s)
⊢ MeasurableSet s
state_after: no goals
Theorem: HolderOnWith.edist_le_of_le
File: Mathlib/Topology/MetricSpace/Holder.lean

tactic: gcongr
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f : X → Y
s t : Set X
h : HolderOnWith C r f s
x y : X
hx : x ∈ s
hy : y ∈ s
d : ℝ≥0∞
hd : edist x y ≤ d
⊢ ↑C * edist x y ^ ↑r ≤ ↑C * d ^ ↑r
state_after: no goals
Theorem: essSup_eq_sInf
File: Mathlib/MeasureTheory/Function/EssSup.lean

tactic: dsimp [essSup, limsup, limsSup]
state_before: α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : Measure α
f : α → β
⊢ essSup f μ = sInf {a | μ {x | a < f x} = 0}
state_after: α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : Measure α
f : α → β
⊢ sInf {a | ∀ᶠ (n : β) in map f (ae μ), n ≤ a} = sInf {a | μ {x | a < f x} = 0}

tactic: simp only [eventually_map, ae_iff, not_le]
state_before: α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : Measure α
f : α → β
⊢ sInf {a | ∀ᶠ (n : β) in map f (ae μ), n ≤ a} = sInf {a | μ {x | a < f x} = 0}
state_after: no goals
Theorem: Real.sin_eq_zero_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: simp [sub_eq_add_neg, sin_add, h, sin_int_mul_pi]
state_before: x : ℝ
h : sin x = 0
h₃ : x - ↑⌊x / π⌋ * π > 0
⊢ 0 = sin (x - ↑⌊x / π⌋ * π)
state_after: no goals
Theorem: HasDerivAt.comp_of_eq
File: Mathlib/Analysis/Calculus/Deriv/Comp.lean

tactic: rw [hy] at hh₂
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
E : Type w
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
𝕜' : Type u_1
inst✝³ : NontriviallyNormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
s' t' : Set 𝕜'
h : 𝕜 → 𝕜'
h₁ : 𝕜 → 𝕜
h₂ : 𝕜' → 𝕜'
h' h₂' : 𝕜'
h₁' : 𝕜
g₁ : 𝕜' → F
g₁' : F
L' : Filter 𝕜'
y : 𝕜'
hh₂ : HasDerivAt h₂ h₂' y
hh : HasDerivAt h h' x
hy : y = h x
⊢ HasDerivAt (h₂ ∘ h) (h₂' * h') x
state_after: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
E : Type w
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
𝕜' : Type u_1
inst✝³ : NontriviallyNormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
s' t' : Set 𝕜'
h : 𝕜 → 𝕜'
h₁ : 𝕜 → 𝕜
h₂ : 𝕜' → 𝕜'
h' h₂' : 𝕜'
h₁' : 𝕜
g₁ : 𝕜' → F
g₁' : F
L' : Filter 𝕜'
y : 𝕜'
hh₂ : HasDerivAt h₂ h₂' (h x)
hh : HasDerivAt h h' x
hy : y = h x
⊢ HasDerivAt (h₂ ∘ h) (h₂' * h') x

tactic: exact hh₂.comp x hh
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
E : Type w
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
𝕜' : Type u_1
inst✝³ : NontriviallyNormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
s' t' : Set 𝕜'
h : 𝕜 → 𝕜'
h₁ : 𝕜 → 𝕜
h₂ : 𝕜' → 𝕜'
h' h₂' : 𝕜'
h₁' : 𝕜
g₁ : 𝕜' → F
g₁' : F
L' : Filter 𝕜'
y : 𝕜'
hh₂ : HasDerivAt h₂ h₂' (h x)
hh : HasDerivAt h h' x
hy : y = h x
⊢ HasDerivAt (h₂ ∘ h) (h₂' * h') x
state_after: no goals
Theorem: Matrix.mem_orthogonalGroup_iff
File: Mathlib/LinearAlgebra/UnitaryGroup.lean

tactic: refine ⟨And.right, fun hA => ⟨?_, hA⟩⟩
state_before: n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
α : Type v
inst✝² : CommRing α
inst✝¹ : StarRing α
A✝ : Matrix n n α
β : Type v
inst✝ : CommRing β
A : Matrix n n β
⊢ A ∈ orthogonalGroup n β ↔ A * star A = 1
state_after: n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
α : Type v
inst✝² : CommRing α
inst✝¹ : StarRing α
A✝ : Matrix n n α
β : Type v
inst✝ : CommRing β
A : Matrix n n β
hA : A * star A = 1
⊢ star A * A = 1

tactic: simpa only [mul_eq_one_comm] using hA
state_before: n : Type u
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
α : Type v
inst✝² : CommRing α
inst✝¹ : StarRing α
A✝ : Matrix n n α
β : Type v
inst✝ : CommRing β
A : Matrix n n β
hA : A * star A = 1
⊢ star A * A = 1
state_after: no goals
Theorem: Real.exp_one_rpow
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rw [← exp_mul, one_mul]
state_before: x✝ y z x : ℝ
⊢ rexp 1 ^ x = rexp x
state_after: no goals
Theorem: Polynomial.cyclotomic_eq_minpoly_rat
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Roots.lean

tactic: rw [← map_cyclotomic_int, cyclotomic_eq_minpoly h hpos]
state_before: R : Type u_1
inst✝² : CommRing R
n✝ n : ℕ
K : Type u_2
inst✝¹ : Field K
μ : K
h : IsPrimitiveRoot μ n
hpos : 0 < n
inst✝ : CharZero K
⊢ cyclotomic n ℚ = minpoly ℚ μ
state_after: R : Type u_1
inst✝² : CommRing R
n✝ n : ℕ
K : Type u_2
inst✝¹ : Field K
μ : K
h : IsPrimitiveRoot μ n
hpos : 0 < n
inst✝ : CharZero K
⊢ map (Int.castRingHom ℚ) (minpoly ℤ μ) = minpoly ℚ μ

tactic: exact (minpoly.isIntegrallyClosed_eq_field_fractions' _ (IsPrimitiveRoot.isIntegral h hpos)).symm
state_before: R : Type u_1
inst✝² : CommRing R
n✝ n : ℕ
K : Type u_2
inst✝¹ : Field K
μ : K
h : IsPrimitiveRoot μ n
hpos : 0 < n
inst✝ : CharZero K
⊢ map (Int.castRingHom ℚ) (minpoly ℤ μ) = minpoly ℚ μ
state_after: no goals
Theorem: Set.exists_lower_bound_image
File: Mathlib/Data/Set/Finite.lean

tactic: rcases s.eq_empty_or_nonempty with rfl | hs
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t : Set α
inst✝¹ : Nonempty α
inst✝ : LinearOrder β
s : Set α
f : α → β
h : s.Finite
⊢ ∃ a, ∀ b ∈ s, f a ≤ f b
state_after: case inl
α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
inst✝¹ : Nonempty α
inst✝ : LinearOrder β
f : α → β
h : ∅.Finite
⊢ ∃ a, ∀ b ∈ ∅, f a ≤ f b

case inr
α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t : Set α
inst✝¹ : Nonempty α
inst✝ : LinearOrder β
s : Set α
f : α → β
h : s.Finite
hs : s.Nonempty
⊢ ∃ a, ∀ b ∈ s, f a ≤ f b

tactic: exact ‹Nonempty α›.elim fun a => ⟨a, fun _ => False.elim⟩
state_before: case inl
α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
inst✝¹ : Nonempty α
inst✝ : LinearOrder β
f : α → β
h : ∅.Finite
⊢ ∃ a, ∀ b ∈ ∅, f a ≤ f b
state_after: no goals

tactic: rcases Set.exists_min_image s f h hs with ⟨x₀, _, hx₀⟩
state_before: case inr
α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t : Set α
inst✝¹ : Nonempty α
inst✝ : LinearOrder β
s : Set α
f : α → β
h : s.Finite
hs : s.Nonempty
⊢ ∃ a, ∀ b ∈ s, f a ≤ f b
state_after: case inr.intro.intro
α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t : Set α
inst✝¹ : Nonempty α
inst✝ : LinearOrder β
s : Set α
f : α → β
h : s.Finite
hs : s.Nonempty
x₀ : α
left✝ : x₀ ∈ s
hx₀ : ∀ b ∈ s, f x₀ ≤ f b
⊢ ∃ a, ∀ b ∈ s, f a ≤ f b

tactic: exact ⟨x₀, fun x hx => hx₀ x hx⟩
state_before: case inr.intro.intro
α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t : Set α
inst✝¹ : Nonempty α
inst✝ : LinearOrder β
s : Set α
f : α → β
h : s.Finite
hs : s.Nonempty
x₀ : α
left✝ : x₀ ∈ s
hx₀ : ∀ b ∈ s, f x₀ ≤ f b
⊢ ∃ a, ∀ b ∈ s, f a ≤ f b
state_after: no goals
Theorem: Fin.coe_cycleRange_of_le
File: Mathlib/GroupTheory/Perm/Fin.lean

tactic: rw [cycleRange_of_le h]
state_before: n : ℕ
i j : Fin n.succ
h : j ≤ i
⊢ ↑(i.cycleRange j) = if j = i then 0 else ↑j + 1
state_after: n : ℕ
i j : Fin n.succ
h : j ≤ i
⊢ ↑(if j = i then 0 else j + 1) = if j = i then 0 else ↑j + 1

tactic: split_ifs with h'
state_before: n : ℕ
i j : Fin n.succ
h : j ≤ i
⊢ ↑(if j = i then 0 else j + 1) = if j = i then 0 else ↑j + 1
state_after: case pos
n : ℕ
i j : Fin n.succ
h : j ≤ i
h' : j = i
⊢ ↑0 = 0

case neg
n : ℕ
i j : Fin n.succ
h : j ≤ i
h' : ¬j = i
⊢ ↑(j + 1) = ↑j + 1

tactic: exact
  val_add_one_of_lt
    (calc
      (j : ℕ) < i := Fin.lt_iff_val_lt_val.mp (lt_of_le_of_ne h h')
      _ ≤ n := Nat.lt_succ_iff.mp i.2)
state_before: case neg
n : ℕ
i j : Fin n.succ
h : j ≤ i
h' : ¬j = i
⊢ ↑(j + 1) = ↑j + 1
state_after: no goals

tactic: rfl
state_before: case pos
n : ℕ
i j : Fin n.succ
h : j ≤ i
h' : j = i
⊢ ↑0 = 0
state_after: no goals
Theorem: CochainComplex.mappingCone.inr_f_desc_f
File: Mathlib/Algebra/Homology/HomotopyCategory/MappingCone.lean

tactic: simp [desc]
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
K : CochainComplex C ℤ
α : Cochain F K (-1)
β : G ⟶ K
eq : δ (-1) 0 α = Cochain.ofHom (φ ≫ β)
p : ℤ
⊢ (inr φ).f p ≫ (desc φ α β eq).f p = β.f p
state_after: no goals
Theorem: PMF.toOuterMeasure_uniformOfFintype_apply
File: Mathlib/Probability/Distributions/Uniform.lean

tactic: rw [uniformOfFintype, toOuterMeasure_uniformOfFinset_apply,Fintype.card_ofFinset]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Fintype α
inst✝ : Nonempty α
s : Set α
⊢ (uniformOfFintype α).toOuterMeasure s = ↑(Fintype.card ↑s) / ↑(Fintype.card α)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Fintype α
inst✝ : Nonempty α
s : Set α
⊢ ↑(Finset.filter (fun x => x ∈ s) Finset.univ).card / ↑Finset.univ.card =
    ↑(Finset.filter (fun x => x ∈ s) Finset.univ).card / ↑(Fintype.card α)

tactic: rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Fintype α
inst✝ : Nonempty α
s : Set α
⊢ ↑(Finset.filter (fun x => x ∈ s) Finset.univ).card / ↑Finset.univ.card =
    ↑(Finset.filter (fun x => x ∈ s) Finset.univ).card / ↑(Fintype.card α)
state_after: no goals
Theorem: rank_mul_rank
File: Mathlib/LinearAlgebra/Dimension/Free.lean

tactic: convert lift_rank_mul_lift_rank F K A <;> rw [lift_id]
state_before: F : Type u
K : Type v
A✝ : Type w
inst✝¹⁵ : Ring F
inst✝¹⁴ : Ring K
inst✝¹³ : AddCommGroup A✝
inst✝¹² : Module F K
inst✝¹¹ : Module K A✝
inst✝¹⁰ : Module F A✝
inst✝⁹ : IsScalarTower F K A✝
inst✝⁸ : StrongRankCondition F
inst✝⁷ : StrongRankCondition K
inst✝⁶ : Module.Free F K
inst✝⁵ : Module.Free K A✝
A : Type v
inst✝⁴ : AddCommGroup A
inst✝³ : Module K A
inst✝² : Module F A
inst✝¹ : IsScalarTower F K A
inst✝ : Module.Free K A
⊢ Module.rank F K * Module.rank K A = Module.rank F A
state_after: no goals
Theorem: HahnSeries.embDomain_add
File: Mathlib/RingTheory/HahnSeries/Addition.lean

tactic: ext g
state_before: Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : AddMonoid R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x y : HahnSeries Γ R
⊢ embDomain f (x + y) = embDomain f x + embDomain f y
state_after: case coeff.h
Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : AddMonoid R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x y : HahnSeries Γ R
g : Γ'
⊢ (embDomain f (x + y)).coeff g = (embDomain f x + embDomain f y).coeff g

tactic: by_cases hg : g ∈ Set.range f
state_before: case coeff.h
Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : AddMonoid R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x y : HahnSeries Γ R
g : Γ'
⊢ (embDomain f (x + y)).coeff g = (embDomain f x + embDomain f y).coeff g
state_after: case pos
Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : AddMonoid R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x y : HahnSeries Γ R
g : Γ'
hg : g ∈ Set.range ⇑f
⊢ (embDomain f (x + y)).coeff g = (embDomain f x + embDomain f y).coeff g

case neg
Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : AddMonoid R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x y : HahnSeries Γ R
g : Γ'
hg : g ∉ Set.range ⇑f
⊢ (embDomain f (x + y)).coeff g = (embDomain f x + embDomain f y).coeff g

tactic: obtain ⟨a, rfl⟩ := hg
state_before: case pos
Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : AddMonoid R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x y : HahnSeries Γ R
g : Γ'
hg : g ∈ Set.range ⇑f
⊢ (embDomain f (x + y)).coeff g = (embDomain f x + embDomain f y).coeff g
state_after: case pos.intro
Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : AddMonoid R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x y : HahnSeries Γ R
a : Γ
⊢ (embDomain f (x + y)).coeff (f a) = (embDomain f x + embDomain f y).coeff (f a)

tactic: simp
state_before: case pos.intro
Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : AddMonoid R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x y : HahnSeries Γ R
a : Γ
⊢ (embDomain f (x + y)).coeff (f a) = (embDomain f x + embDomain f y).coeff (f a)
state_after: no goals

tactic: simp [embDomain_notin_range hg]
state_before: case neg
Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : AddMonoid R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x y : HahnSeries Γ R
g : Γ'
hg : g ∉ Set.range ⇑f
⊢ (embDomain f (x + y)).coeff g = (embDomain f x + embDomain f y).coeff g
state_after: no goals
Theorem: Ideal.isIdempotentElem_iff_eq_bot_or_top
File: Mathlib/RingTheory/Ideal/IdempotentFG.lean

tactic: constructor
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
I : Ideal R
h : I.FG
⊢ IsIdempotentElem I ↔ I = ⊥ ∨ I = ⊤
state_after: case mp
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
I : Ideal R
h : I.FG
⊢ IsIdempotentElem I → I = ⊥ ∨ I = ⊤

case mpr
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
I : Ideal R
h : I.FG
⊢ I = ⊥ ∨ I = ⊤ → IsIdempotentElem I

tactic: intro H
state_before: case mp
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
I : Ideal R
h : I.FG
⊢ IsIdempotentElem I → I = ⊥ ∨ I = ⊤
state_after: case mp
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
I : Ideal R
h : I.FG
H : IsIdempotentElem I
⊢ I = ⊥ ∨ I = ⊤

tactic: obtain ⟨e, he, rfl⟩ := (I.isIdempotentElem_iff_of_fg h).mp H
state_before: case mp
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
I : Ideal R
h : I.FG
H : IsIdempotentElem I
⊢ I = ⊥ ∨ I = ⊤
state_after: case mp.intro.intro
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
e : R
he : IsIdempotentElem e
h : FG (Submodule.span R {e})
H : IsIdempotentElem (Submodule.span R {e})
⊢ Submodule.span R {e} = ⊥ ∨ Submodule.span R {e} = ⊤

tactic: simp only [Ideal.submodule_span_eq, Ideal.span_singleton_eq_bot]
state_before: case mp.intro.intro
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
e : R
he : IsIdempotentElem e
h : FG (Submodule.span R {e})
H : IsIdempotentElem (Submodule.span R {e})
⊢ Submodule.span R {e} = ⊥ ∨ Submodule.span R {e} = ⊤
state_after: case mp.intro.intro
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
e : R
he : IsIdempotentElem e
h : FG (Submodule.span R {e})
H : IsIdempotentElem (Submodule.span R {e})
⊢ e = 0 ∨ span {e} = ⊤

tactic: apply Or.imp id _ (IsIdempotentElem.iff_eq_zero_or_one.mp he)
state_before: case mp.intro.intro
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
e : R
he : IsIdempotentElem e
h : FG (Submodule.span R {e})
H : IsIdempotentElem (Submodule.span R {e})
⊢ e = 0 ∨ span {e} = ⊤
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
e : R
he : IsIdempotentElem e
h : FG (Submodule.span R {e})
H : IsIdempotentElem (Submodule.span R {e})
⊢ e = 1 → span {e} = ⊤

tactic: rintro rfl
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
e : R
he : IsIdempotentElem e
h : FG (Submodule.span R {e})
H : IsIdempotentElem (Submodule.span R {e})
⊢ e = 1 → span {e} = ⊤
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
he : IsIdempotentElem 1
h : FG (Submodule.span R {1})
H : IsIdempotentElem (Submodule.span R {1})
⊢ span {1} = ⊤

tactic: simp
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
he : IsIdempotentElem 1
h : FG (Submodule.span R {1})
H : IsIdempotentElem (Submodule.span R {1})
⊢ span {1} = ⊤
state_after: no goals

tactic: rintro (rfl | rfl) <;> simp [IsIdempotentElem]
state_before: case mpr
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
I : Ideal R
h : I.FG
⊢ I = ⊥ ∨ I = ⊤ → IsIdempotentElem I
state_after: no goals