ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: ite_mul_one
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M✝ : Type u_4
M : Type u
inst✝¹ : MulOneClass M
P : Prop
inst✝ : Decidable P
a b : M
⊢ (if P then a * b else 1) = (if P then a else 1) * if P then b else 1
state_after: no goals
tactic: by_cases h : P <;> simp [h]
Theorem: Finset.prod_inter_mul_prod_diff
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
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 β
inst✝ : DecidableEq α
s t : Finset α
f : α → β
⊢ (∏ x ∈ s ∩ t, f x) * ∏ x ∈ s \ t, f x = ∏ x ∈ s, f x
state_after: case h.e'_3.a.h.e
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
s t : Finset α
f : α → β
x✝ : α
a✝ : x✝ ∈ s
⊢ f = t.piecewise f f
tactic: convert (s.prod_piecewise t f f).symm
state_before: case h.e'_3.a.h.e
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
s t : Finset α
f : α → β
x✝ : α
a✝ : x✝ ∈ s
⊢ f = t.piecewise f f
state_after: no goals
tactic: simp (config := { unfoldPartialApp := true }) [Finset.piecewise]
Theorem: Sum.map_traverse
File: Mathlib/Control/Traversable/Instances.lean

Proof steps:
state_before: σ : Type u
F G : Type u → Type u
inst✝² : Applicative F
inst✝¹ : Applicative G
inst✝ : LawfulApplicative G
α : Type u_1
β γ : Type u
g : α → G β
f : β → γ
x : σ ⊕ α
⊢ (fun x => f <$> x) <$> Sum.traverse g x = Sum.traverse (fun x => f <$> g x) x
state_after: no goals
tactic: cases x <;> simp [Sum.traverse, id_map, functor_norm] <;> congr
Theorem: UpperHalfPlane.verticalStrip_mono
File: Mathlib/Analysis/Complex/UpperHalfPlane/Topology.lean

Proof steps:
state_before: A B A' B' : ℝ
hA : A ≤ A'
hB : B' ≤ B
⊢ verticalStrip A B ⊆ verticalStrip A' B'
state_after: case intro
A B A' B' : ℝ
hA : A ≤ A'
hB : B' ≤ B
z : ℍ
hzre : |z.re| ≤ A
hzim : B ≤ z.im
⊢ z ∈ verticalStrip A' B'
tactic: rintro z ⟨hzre, hzim⟩
state_before: case intro
A B A' B' : ℝ
hA : A ≤ A'
hB : B' ≤ B
z : ℍ
hzre : |z.re| ≤ A
hzim : B ≤ z.im
⊢ z ∈ verticalStrip A' B'
state_after: no goals
tactic: exact ⟨hzre.trans hA, hB.trans hzim⟩
Theorem: Polynomial.pow_mul_divByMonic_rootMultiplicity_eq
File: Mathlib/Algebra/Polynomial/Div.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Ring R
p✝ q p : R[X]
a : R
⊢ (X - C a) ^ rootMultiplicity a p * (p /ₘ (X - C a) ^ rootMultiplicity a p) = p
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Ring R
p✝ q p : R[X]
a : R
this : ((X - C a) ^ rootMultiplicity a p).Monic
⊢ (X - C a) ^ rootMultiplicity a p * (p /ₘ (X - C a) ^ rootMultiplicity a p) = p
tactic: have : Monic ((X - C a) ^ rootMultiplicity a p) := (monic_X_sub_C _).pow _
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Ring R
p✝ q p : R[X]
a : R
this : ((X - C a) ^ rootMultiplicity a p).Monic
⊢ (X - C a) ^ rootMultiplicity a p * (p /ₘ (X - C a) ^ rootMultiplicity a p) = p
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Ring R
p✝ q p : R[X]
a : R
this : ((X - C a) ^ rootMultiplicity a p).Monic
⊢ (X - C a) ^ rootMultiplicity a p * (p /ₘ (X - C a) ^ rootMultiplicity a p) =
    0 + (X - C a) ^ rootMultiplicity a p * (p /ₘ (X - C a) ^ rootMultiplicity a p)
tactic: conv_rhs =>
      rw [← modByMonic_add_div p this,
        (modByMonic_eq_zero_iff_dvd this).2 (pow_rootMultiplicity_dvd _ _)]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Ring R
p✝ q p : R[X]
a : R
this : ((X - C a) ^ rootMultiplicity a p).Monic
⊢ (X - C a) ^ rootMultiplicity a p * (p /ₘ (X - C a) ^ rootMultiplicity a p) =
    0 + (X - C a) ^ rootMultiplicity a p * (p /ₘ (X - C a) ^ rootMultiplicity a p)
state_after: no goals
tactic: simp
Theorem: PosSMulReflectLT.lift
File: Mathlib/Algebra/Order/Module/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
a✝ a₁ a₂ : α
b b₁✝ b₂✝ : β
γ : Type u_3
inst✝⁸ : Zero α
inst✝⁷ : Preorder α
inst✝⁶ : Zero β
inst✝⁵ : Preorder β
inst✝⁴ : Zero γ
inst✝³ : Preorder γ
inst✝² : SMul α β
inst✝¹ : SMul α γ
f : β → γ
inst✝ : PosSMulReflectLT α γ
hf : ∀ {b₁ b₂ : β}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂
smul : ∀ (a : α) (b : β), f (a • b) = a • f b
a : α
ha : 0 ≤ a
b₁ b₂ : β
h : a • b₁ < a • b₂
⊢ b₁ < b₂
state_after: α : Type u_1
β : Type u_2
a✝ a₁ a₂ : α
b b₁✝ b₂✝ : β
γ : Type u_3
inst✝⁸ : Zero α
inst✝⁷ : Preorder α
inst✝⁶ : Zero β
inst✝⁵ : Preorder β
inst✝⁴ : Zero γ
inst✝³ : Preorder γ
inst✝² : SMul α β
inst✝¹ : SMul α γ
f : β → γ
inst✝ : PosSMulReflectLT α γ
hf : ∀ {b₁ b₂ : β}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂
a : α
ha : 0 ≤ a
b₁ b₂ : β
smul : α → β → True
h : a • f b₁ < a • f b₂
⊢ f b₁ < f b₂
tactic: simp only [← lt_iff_lt_of_le_iff_le' hf hf, smul] at *
state_before: α : Type u_1
β : Type u_2
a✝ a₁ a₂ : α
b b₁✝ b₂✝ : β
γ : Type u_3
inst✝⁸ : Zero α
inst✝⁷ : Preorder α
inst✝⁶ : Zero β
inst✝⁵ : Preorder β
inst✝⁴ : Zero γ
inst✝³ : Preorder γ
inst✝² : SMul α β
inst✝¹ : SMul α γ
f : β → γ
inst✝ : PosSMulReflectLT α γ
hf : ∀ {b₁ b₂ : β}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂
a : α
ha : 0 ≤ a
b₁ b₂ : β
smul : α → β → True
h : a • f b₁ < a • f b₂
⊢ f b₁ < f b₂
state_after: no goals
tactic: exact lt_of_smul_lt_smul_left h ha
Theorem: Function.Exact.of_ladder_linearEquiv_of_exact
File: Mathlib/Algebra/Exact.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
M' : Type u_3
N : Type u_4
N' : Type u_5
P : Type u_6
P' : Type u_7
inst✝¹² : Semiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M'
inst✝⁹ : AddCommMonoid N
inst✝⁸ : AddCommMonoid N'
inst✝⁷ : AddCommMonoid P
inst✝⁶ : AddCommMonoid P'
inst✝⁵ : Module R M
inst✝⁴ : Module R M'
inst✝³ : Module R N
inst✝² : Module R N'
inst✝¹ : Module R P
inst✝ : Module R P'
f : M →ₗ[R] N
g : N →ₗ[R] P
f₁₂ : M →ₗ[R] N
f₂₃ : N →ₗ[R] P
g₁₂ : M' →ₗ[R] N'
g₂₃ : N' →ₗ[R] P'
e₁ : M ≃ₗ[R] M'
e₂ : N ≃ₗ[R] N'
e₃ : P ≃ₗ[R] P'
h₁₂ : g₁₂ ∘ₗ ↑e₁ = ↑e₂ ∘ₗ f₁₂
h₂₃ : g₂₃ ∘ₗ ↑e₂ = ↑e₃ ∘ₗ f₂₃
H : Exact ⇑f₁₂ ⇑f₂₃
⊢ Exact ⇑g₁₂ ⇑g₂₃
state_after: no goals
tactic: rwa [iff_of_ladder_linearEquiv h₁₂ h₂₃]
Theorem: EMetric.preimage_smul_ball
File: Mathlib/Topology/MetricSpace/IsometricSMul.lean

Proof steps:
state_before: M : Type u
G : Type v
X : Type w
inst✝³ : PseudoEMetricSpace X
inst✝² : Group G
inst✝¹ : MulAction G X
inst✝ : IsometricSMul G X
c : G
x : X
r : ℝ≥0∞
⊢ (fun x => c • x) ⁻¹' ball x r = ball (c⁻¹ • x) r
state_after: no goals
tactic: rw [preimage_smul, smul_ball]
Theorem: MeasurableSet.const_smul_of_ne_zero
File: Mathlib/MeasureTheory/Group/Pointwise.lean

Proof steps:
state_before: G₀ : Type u_1
α : Type u_2
inst✝⁴ : GroupWithZero G₀
inst✝³ : MulAction G₀ α
inst✝² : MeasurableSpace G₀
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSMul G₀ α
s : Set α
hs : MeasurableSet s
a : G₀
ha : a ≠ 0
⊢ MeasurableSet (a • s)
state_after: G₀ : Type u_1
α : Type u_2
inst✝⁴ : GroupWithZero G₀
inst✝³ : MulAction G₀ α
inst✝² : MeasurableSpace G₀
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSMul G₀ α
s : Set α
hs : MeasurableSet s
a : G₀
ha : a ≠ 0
⊢ MeasurableSet ((fun x => a⁻¹ • x) ⁻¹' s)
tactic: rw [← preimage_smul_inv₀ ha]
state_before: G₀ : Type u_1
α : Type u_2
inst✝⁴ : GroupWithZero G₀
inst✝³ : MulAction G₀ α
inst✝² : MeasurableSpace G₀
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSMul G₀ α
s : Set α
hs : MeasurableSet s
a : G₀
ha : a ≠ 0
⊢ MeasurableSet ((fun x => a⁻¹ • x) ⁻¹' s)
state_after: no goals
tactic: exact measurable_const_smul _ hs
Theorem: AddMonoid.exponent_nsmul_eq_zero
File: Mathlib/GroupTheory/Exponent.lean

Proof steps:
state_before: G : Type u
inst✝ : Monoid G
g : G
⊢ g ^ exponent G = 1
state_after: case pos
G : Type u
inst✝ : Monoid G
g : G
h : ExponentExists G
⊢ g ^ exponent G = 1

case neg
G : Type u
inst✝ : Monoid G
g : G
h : ¬ExponentExists G
⊢ g ^ exponent G = 1
tactic: by_cases h : ExponentExists G
Theorem: SetTheory.PGame.mul_moveLeft_inl
File: Mathlib/SetTheory/Game/Basic.lean

Proof steps:
state_before: x y : PGame
i : x.LeftMoves
j : y.LeftMoves
⊢ (x * y).moveLeft (toLeftMovesMul (Sum.inl (i, j))) = x.moveLeft i * y + x * y.moveLeft j - x.moveLeft i * y.moveLeft j
state_after: case mk
y : PGame
j : y.LeftMoves
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
i : (mk α✝ β✝ a✝¹ a✝).LeftMoves
⊢ (mk α✝ β✝ a✝¹ a✝ * y).moveLeft (toLeftMovesMul (Sum.inl (i, j))) =
    (mk α✝ β✝ a✝¹ a✝).moveLeft i * y + mk α✝ β✝ a✝¹ a✝ * y.moveLeft j - (mk α✝ β✝ a✝¹ a✝).moveLeft i * y.moveLeft j
tactic: cases x
state_before: case mk
y : PGame
j : y.LeftMoves
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
i : (mk α✝ β✝ a✝¹ a✝).LeftMoves
⊢ (mk α✝ β✝ a✝¹ a✝ * y).moveLeft (toLeftMovesMul (Sum.inl (i, j))) =
    (mk α✝ β✝ a✝¹ a✝).moveLeft i * y + mk α✝ β✝ a✝¹ a✝ * y.moveLeft j - (mk α✝ β✝ a✝¹ a✝).moveLeft i * y.moveLeft j
state_after: case mk.mk
α✝¹ β✝¹ : Type u_1
a✝³ : α✝¹ → PGame
a✝² : β✝¹ → PGame
i : (mk α✝¹ β✝¹ a✝³ a✝²).LeftMoves
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
j : (mk α✝ β✝ a✝¹ a✝).LeftMoves
⊢ (mk α✝¹ β✝¹ a✝³ a✝² * mk α✝ β✝ a✝¹ a✝).moveLeft (toLeftMovesMul (Sum.inl (i, j))) =
    (mk α✝¹ β✝¹ a✝³ a✝²).moveLeft i * mk α✝ β✝ a✝¹ a✝ + mk α✝¹ β✝¹ a✝³ a✝² * (mk α✝ β✝ a✝¹ a✝).moveLeft j -
      (mk α✝¹ β✝¹ a✝³ a✝²).moveLeft i * (mk α✝ β✝ a✝¹ a✝).moveLeft j
tactic: cases y
state_before: case mk.mk
α✝¹ β✝¹ : Type u_1
a✝³ : α✝¹ → PGame
a✝² : β✝¹ → PGame
i : (mk α✝¹ β✝¹ a✝³ a✝²).LeftMoves
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
j : (mk α✝ β✝ a✝¹ a✝).LeftMoves
⊢ (mk α✝¹ β✝¹ a✝³ a✝² * mk α✝ β✝ a✝¹ a✝).moveLeft (toLeftMovesMul (Sum.inl (i, j))) =
    (mk α✝¹ β✝¹ a✝³ a✝²).moveLeft i * mk α✝ β✝ a✝¹ a✝ + mk α✝¹ β✝¹ a✝³ a✝² * (mk α✝ β✝ a✝¹ a✝).moveLeft j -
      (mk α✝¹ β✝¹ a✝³ a✝²).moveLeft i * (mk α✝ β✝ a✝¹ a✝).moveLeft j
state_after: no goals
tactic: rfl
Theorem: ContinuousOpenMap.cancel_left
File: Mathlib/Topology/Hom/Open.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
g : β →CO γ
f₁ f₂ : α →CO β
hg : Injective ⇑g
h : g.comp f₁ = g.comp f₂
a : α
⊢ g (f₁ a) = g (f₂ a)
state_after: no goals
tactic: rw [← comp_apply, h, comp_apply]
Theorem: SimpleGraph.induce_connected_adj_union
File: Mathlib/Combinatorics/SimpleGraph/Connectivity/Subgraph.lean

Proof steps:
state_before: V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v w : V
s t : Set V
sconn : (induce s G).Connected
tconn : (induce t G).Connected
hv : v ∈ s
hw : w ∈ t
ha : G.Adj v w
⊢ (induce (s ∪ t) G).Connected
state_after: V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v w : V
s t : Set V
sconn : (⊤.induce s).Connected
tconn : (⊤.induce t).Connected
hv : v ∈ s
hw : w ∈ t
ha : G.Adj v w
⊢ (⊤.induce (s ∪ t)).Connected
tactic: rw [connected_induce_iff] at sconn tconn ⊢
state_before: V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v w : V
s t : Set V
sconn : (⊤.induce s).Connected
tconn : (⊤.induce t).Connected
hv : v ∈ s
hw : w ∈ t
ha : G.Adj v w
⊢ (⊤.induce (s ∪ t)).Connected
state_after: case hle
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v w : V
s t : Set V
sconn : (⊤.induce s).Connected
tconn : (⊤.induce t).Connected
hv : v ∈ s
hw : w ∈ t
ha : G.Adj v w
⊢ ⊤.induce {v, w} ⊔ ⊤.induce s ⊔ ⊤.induce t ≤ ⊤.induce (s ∪ t)

case hv
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
v w : V
s t : Set V
sconn : (⊤.induce s).Connected
tconn : (⊤.induce t).Connected
hv : v ∈ s
hw : w ∈ t
ha : G.Adj v w
⊢ (⊤.induce {v, w} ⊔ ⊤.induce s ⊔ ⊤.induce t).verts = (⊤.induce (s ∪ t)).verts
tactic: apply (sconn.adj_union tconn hv hw ha).mono
Theorem: CategoryTheory.CommSq.HasLift.iff_op
File: Mathlib/CategoryTheory/CommSq.lean

Proof steps:
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
A B X Y : C
f : A ⟶ X
i : A ⟶ B
p : X ⟶ Y
g : B ⟶ Y
sq : CommSq f i p g
⊢ sq.HasLift ↔ ⋯.HasLift
state_after: C : Type u_1
inst✝ : Category.{u_2, u_1} C
A B X Y : C
f : A ⟶ X
i : A ⟶ B
p : X ⟶ Y
g : B ⟶ Y
sq : CommSq f i p g
⊢ Nonempty sq.LiftStruct ↔ Nonempty ⋯.LiftStruct
tactic: rw [iff, iff]
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
A B X Y : C
f : A ⟶ X
i : A ⟶ B
p : X ⟶ Y
g : B ⟶ Y
sq : CommSq f i p g
⊢ Nonempty sq.LiftStruct ↔ Nonempty ⋯.LiftStruct
state_after: no goals
tactic: exact Nonempty.congr (LiftStruct.opEquiv sq).toFun (LiftStruct.opEquiv sq).invFun
Theorem: exists_eq_right'
File: Mathlib/Logic/Basic.lean

Proof steps:
state_before: α : Sort u_1
β : Sort u_2
p q : α → Prop
a' : α
⊢ (∃ a, p a ∧ a' = a) ↔ p a'
state_after: no goals
tactic: simp [@eq_comm _ a']
Theorem: List.prod_eq_zero_iff
File: Mathlib/Algebra/BigOperators/Ring/List.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
M : Type u_3
M₀ : Type u_4
R : Type u_5
inst✝² : MonoidWithZero M₀
l : List M₀
inst✝¹ : Nontrivial M₀
inst✝ : NoZeroDivisors M₀
⊢ [].prod = 0 ↔ 0 ∈ []
state_after: no goals
tactic: simp
state_before: ι : Type u_1
κ : Type u_2
M : Type u_3
M₀ : Type u_4
R : Type u_5
inst✝² : MonoidWithZero M₀
l✝ : List M₀
inst✝¹ : Nontrivial M₀
inst✝ : NoZeroDivisors M₀
a : M₀
l : List M₀
⊢ (a :: l).prod = 0 ↔ 0 ∈ a :: l
state_after: no goals
tactic: rw [prod_cons, mul_eq_zero, prod_eq_zero_iff, mem_cons, eq_comm]
Theorem: nhds_basis_zero_abs_sub_lt
File: Mathlib/Topology/Order/LeftRightNhds.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrderedAddCommGroup α
inst✝¹ : OrderTopology α
l : Filter β
f g : β → α
inst✝ : NoMaxOrder α
⊢ (𝓝 0).HasBasis (fun ε => 0 < ε) fun ε => {b | |b| < ε}
state_after: no goals
tactic: simpa using nhds_basis_abs_sub_lt (0 : α)
Theorem: CategoryTheory.Subobject.pullback_map_self
File: Mathlib/CategoryTheory/Subobject/Basic.lean

Proof steps:
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasPullbacks C
f : X ⟶ Y
inst✝ : Mono f
g : Subobject X
⊢ (pullback f).obj ((map f).obj g) = g
state_after: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasPullbacks C
f : X ⟶ Y
inst✝ : Mono f
⊢ ∀ (g : Subobject X), (pullback f).obj ((map f).obj g) = g
tactic: revert g
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasPullbacks C
f : X ⟶ Y
inst✝ : Mono f
⊢ ∀ (g : Subobject X), (pullback f).obj ((map f).obj g) = g
state_after: no goals
tactic: exact Quotient.ind (fun g' => Quotient.sound ⟨(MonoOver.pullbackMapSelf f).app _⟩)
Theorem: archimedean_iff_int_lt
File: Mathlib/Algebra/Order/Archimedean.lean

Proof steps:
state_before: α : Type u_1
M : Type u_2
inst✝ : LinearOrderedField α
⊢ (∀ (x : α), ∃ n, x < ↑n) → Archimedean α
state_after: α : Type u_1
M : Type u_2
inst✝ : LinearOrderedField α
⊢ (∀ (x : α), ∃ n, x < ↑n) → ∀ (x : α), ∃ n, x < ↑n
tactic: rw [archimedean_iff_nat_lt]
state_before: α : Type u_1
M : Type u_2
inst✝ : LinearOrderedField α
⊢ (∀ (x : α), ∃ n, x < ↑n) → ∀ (x : α), ∃ n, x < ↑n
state_after: α : Type u_1
M : Type u_2
inst✝ : LinearOrderedField α
h : ∀ (x : α), ∃ n, x < ↑n
x : α
⊢ ∃ n, x < ↑n
tactic: intro h x
state_before: α : Type u_1
M : Type u_2
inst✝ : LinearOrderedField α
h : ∀ (x : α), ∃ n, x < ↑n
x : α
⊢ ∃ n, x < ↑n
state_after: case intro
α : Type u_1
M : Type u_2
inst✝ : LinearOrderedField α
h✝ : ∀ (x : α), ∃ n, x < ↑n
x : α
n : ℤ
h : x < ↑n
⊢ ∃ n, x < ↑n
tactic: obtain ⟨n, h⟩ := h x
state_before: case intro
α : Type u_1
M : Type u_2
inst✝ : LinearOrderedField α
h✝ : ∀ (x : α), ∃ n, x < ↑n
x : α
n : ℤ
h : x < ↑n
⊢ ∃ n, x < ↑n
state_after: case intro
α : Type u_1
M : Type u_2
inst✝ : LinearOrderedField α
h✝ : ∀ (x : α), ∃ n, x < ↑n
x : α
n : ℤ
h : x < ↑n
⊢ ↑n ≤ ↑n.toNat
tactic: refine ⟨n.toNat, h.trans_le ?_⟩
state_before: case intro
α : Type u_1
M : Type u_2
inst✝ : LinearOrderedField α
h✝ : ∀ (x : α), ∃ n, x < ↑n
x : α
n : ℤ
h : x < ↑n
⊢ ↑n ≤ ↑n.toNat
state_after: no goals
tactic: exact mod_cast Int.self_le_toNat _
Theorem: Nat.clog_of_two_le
File: Mathlib/Data/Nat/Log.lean

Proof steps:
state_before: b n : ℕ
hb : 1 < b
hn : 2 ≤ n
⊢ clog b n = clog b ((n + b - 1) / b) + 1
state_after: no goals
tactic: rw [clog, dif_pos (⟨hb, hn⟩ : 1 < b ∧ 1 < n)]
Theorem: mem_selfAdjointMatricesSubmodule'
File: Mathlib/LinearAlgebra/Matrix/BilinearForm.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝¹⁶ : CommSemiring R
inst✝¹⁵ : AddCommMonoid M
inst✝¹⁴ : Module R M
R₁ : Type u_3
M₁ : Type u_4
inst✝¹³ : CommRing R₁
inst✝¹² : AddCommGroup M₁
inst✝¹¹ : Module R₁ M₁
R₂ : Type u_5
M₂ : Type u_6
inst✝¹⁰ : CommSemiring R₂
inst✝⁹ : AddCommMonoid M₂
inst✝⁸ : Module R₂ M₂
R₃ : Type u_7
M₃ : Type u_8
inst✝⁷ : CommRing R₃
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : Module R₃ M₃
V : Type u_9
K : Type u_10
inst✝⁴ : Field K
inst✝³ : AddCommGroup V
inst✝² : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
n : Type u_11
inst✝¹ : Fintype n
b : Basis n R₃ M₃
J J₃ A A' : Matrix n n R₃
inst✝ : DecidableEq n
⊢ A ∈ selfAdjointMatricesSubmodule J ↔ J.IsSelfAdjoint A
state_after: no goals
tactic: simp only [mem_selfAdjointMatricesSubmodule]
Theorem: multiplicity.finite_of_not_isUnit
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : WfDvdMonoid α
a b : α
ha : ¬IsUnit a
hb : b ≠ 0
⊢ Finite a b
state_after: case intro.intro.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : WfDvdMonoid α
a : α
ha : ¬IsUnit a
n : ℕ
c : α
ndvd : ¬a ∣ c
hb : a ^ n * c ≠ 0
⊢ Finite a (a ^ n * c)
tactic: obtain ⟨n, c, ndvd, rfl⟩ := WfDvdMonoid.max_power_factor' hb ha
state_before: case intro.intro.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : WfDvdMonoid α
a : α
ha : ¬IsUnit a
n : ℕ
c : α
ndvd : ¬a ∣ c
hb : a ^ n * c ≠ 0
⊢ Finite a (a ^ n * c)
state_after: no goals
tactic: exact ⟨n, by rwa [pow_succ, mul_dvd_mul_iff_left (left_ne_zero_of_mul hb)]⟩
Theorem: Set.piecewise_univ
File: Mathlib/Data/Set/Function.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
δ : α → Sort u_6
s : Set α
f g : (i : α) → δ i
inst✝ : (i : α) → Decidable (i ∈ univ)
⊢ univ.piecewise f g = f
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
δ : α → Sort u_6
s : Set α
f g : (i : α) → δ i
inst✝ : (i : α) → Decidable (i ∈ univ)
i : α
⊢ univ.piecewise f g i = f i
tactic: ext i
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
δ : α → Sort u_6
s : Set α
f g : (i : α) → δ i
inst✝ : (i : α) → Decidable (i ∈ univ)
i : α
⊢ univ.piecewise f g i = f i
state_after: no goals
tactic: simp [piecewise]
Theorem: Int.bit_val
File: Mathlib/Data/Int/Bitwise.lean

Proof steps:
state_before: b : Bool
n : ℤ
⊢ bit b n = 2 * n + bif b then 1 else 0
state_after: case false
n : ℤ
⊢ bit false n = 2 * n + bif false then 1 else 0

case true
n : ℤ
⊢ bit true n = 2 * n + bif true then 1 else 0
tactic: cases b
Theorem: IsAddUnit.of_leftInverse
File: Mathlib/Algebra/Group/Units/Hom.lean

Proof steps:
state_before: F : Type u_1
G : Type u_2
α : Type u_3
M : Type u_4
N : Type u_5
inst✝⁴ : FunLike F M N
inst✝³ : FunLike G N M
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : MonoidHomClass G N M
f : F
x : M
g : G
hfg : LeftInverse ⇑g ⇑f
h : IsUnit (f x)
⊢ IsUnit x
state_after: no goals
tactic: simpa only [hfg x] using h.map g
Theorem: CategoryTheory.Under.mapId_eq
File: Mathlib/CategoryTheory/Comma/Over.lean

Proof steps:
state_before: T : Type u₁
inst✝ : Category.{v₁, u₁} T
X Y : T
⊢ map (𝟙 Y) = 𝟭 (Under Y)
state_after: case h_obj
T : Type u₁
inst✝ : Category.{v₁, u₁} T
X Y : T
⊢ ∀ (X : Under Y), (map (𝟙 Y)).obj X = (𝟭 (Under Y)).obj X

case h_map
T : Type u₁
inst✝ : Category.{v₁, u₁} T
X Y : T
⊢ autoParam (∀ (X Y_1 : Under Y) (f : X ⟶ Y_1), (map (𝟙 Y)).map f = eqToHom ⋯ ≫ (𝟭 (Under Y)).map f ≫ eqToHom ⋯) _auto✝
tactic: fapply Functor.ext
Theorem: QuaternionAlgebra.swapEquiv_symm_apply_imI
File: Mathlib/Algebra/Quaternion.lean

Proof steps:
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
c₁ c₂ r x y z : R
a b c x✝ : ℍ[R,c₁,c₂]
⊢ (fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK })
      ((fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK }) x✝) =
    x✝
state_after: no goals
tactic: simp
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
c₁ c₂ r x y z : R
a b c : ℍ[R,c₁,c₂]
x✝ : ℍ[R,c₂,c₁]
⊢ (fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK })
      ((fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK }) x✝) =
    x✝
state_after: no goals
tactic: simp
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
c₁ c₂ r x y z : R
a b c x✝¹ x✝ : ℍ[R,c₁,c₂]
⊢ { toFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK },
          invFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK }, left_inv := ⋯,
          right_inv := ⋯ }.toFun
      (x✝¹ * x✝) =
    { toFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK },
            invFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK }, left_inv := ⋯,
            right_inv := ⋯ }.toFun
        x✝¹ *
      { toFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK },
            invFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK }, left_inv := ⋯,
            right_inv := ⋯ }.toFun
        x✝
state_after: no goals
tactic: ext
      <;> simp only [mul_re, mul_imJ, mul_imI, add_left_inj, mul_imK, neg_mul, neg_add_rev,
                     neg_sub, mk_mul_mk, mul_neg, neg_neg, sub_neg_eq_add]
      <;> ring
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
c₁ c₂ r x y z : R
a b c x✝¹ x✝ : ℍ[R,c₁,c₂]
⊢ { toFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK },
          invFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK }, left_inv := ⋯,
          right_inv := ⋯ }.toFun
      (x✝¹ + x✝) =
    { toFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK },
            invFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK }, left_inv := ⋯,
            right_inv := ⋯ }.toFun
        x✝¹ +
      { toFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK },
            invFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK }, left_inv := ⋯,
            right_inv := ⋯ }.toFun
        x✝
state_after: no goals
tactic: ext <;> simp [add_comm]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
c₁ c₂ r x y z : R
a b c : ℍ[R,c₁,c₂]
x✝ : R
⊢ { toFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK },
          invFun := fun t => { re := t.re, imI := t.imJ, imJ := t.imI, imK := -t.imK }, left_inv := ⋯,
          right_inv := ⋯ }.toFun
      ((algebraMap R ℍ[R,c₁,c₂]) x✝) =
    (algebraMap R ℍ[R,c₂,c₁]) x✝
state_after: no goals
tactic: simp [algebraMap_eq]
Theorem: AlgebraicGeometry.basicOpen_eq_of_affine'
File: Mathlib/AlgebraicGeometry/Scheme.lean

Proof steps:
state_before: R : CommRingCat
f : ↑Γ(Spec R, ⊤)
⊢ (Spec R).basicOpen f = PrimeSpectrum.basicOpen ((Scheme.ΓSpecIso R).hom f)
state_after: case h.e'_2.h.e'_3
R : CommRingCat
f : ↑Γ(Spec R, ⊤)
⊢ f = (Scheme.ΓSpecIso R).inv ((Scheme.ΓSpecIso R).hom f)
tactic: convert basicOpen_eq_of_affine ((Scheme.ΓSpecIso R).hom f)
state_before: case h.e'_2.h.e'_3
R : CommRingCat
f : ↑Γ(Spec R, ⊤)
⊢ f = (Scheme.ΓSpecIso R).inv ((Scheme.ΓSpecIso R).hom f)
state_after: no goals
tactic: exact (Iso.hom_inv_id_apply (Scheme.ΓSpecIso R) f).symm
Theorem: List.countP_cons
File: .lake/packages/batteries/Batteries/Data/List/Count.lean

Proof steps:
state_before: α : Type u_1
p q : α → Bool
a : α
l : List α
⊢ countP p (a :: l) = countP p l + if p a = true then 1 else 0
state_after: no goals
tactic: by_cases h : p a <;> simp [h]