ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Setoid.eqvGen_le
File: Mathlib/Data/Setoid/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
r : α → α → Prop
s : Setoid α
h : ∀ (x y : α), r x y → s.Rel x y
⊢ EqvGen.Setoid r ≤ s
state_after: α : Type u_1
β : Type u_2
r : α → α → Prop
s : Setoid α
h : ∀ (x y : α), r x y → s.Rel x y
⊢ sInf {s | ∀ ⦃x y : α⦄, r x y → s.Rel x y} ≤ s
tactic: rw [eqvGen_eq]
state_before: α : Type u_1
β : Type u_2
r : α → α → Prop
s : Setoid α
h : ∀ (x y : α), r x y → s.Rel x y
⊢ sInf {s | ∀ ⦃x y : α⦄, r x y → s.Rel x y} ≤ s
state_after: no goals
tactic: exact sInf_le h
Theorem: List.kerase_comm
File: Mathlib/Data/List/Sigma.lean

Proof steps:
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a₁ a₂ : α
l : List (Sigma β)
h : a₁ = a₂
⊢ kerase a₂ (kerase a₁ l) = kerase a₁ (kerase a₂ l)
state_after: no goals
tactic: simp [h]
state_before: α : Type u
β : α → Type v
l✝ l₁✝ l₂✝ : List (Sigma β)
inst✝ : DecidableEq α
a₁ a₂ : α
l : List (Sigma β)
h : ¬a₁ = a₂
ha₂ : a₂ ∈ l.keys
b₁ : β a₁
l₁ l₂ : List (Sigma β)
a₁_nin_l₁ : a₁ ∉ l₁.keys
x✝ : a₂ ∈ (l₁ ++ ⟨a₁, b₁⟩ :: l₂).keys
ha₁ : a₁ ∈ (l₁ ++ ⟨a₁, b₁⟩ :: l₂).keys
h' : a₂ ∈ l₁.keys
⊢ kerase a₂ (l₁ ++ l₂) = kerase a₁ (kerase a₂ (l₁ ++ ⟨a₁, b₁⟩ :: l₂))
state_after: no goals
tactic: simp [kerase_append_left h',
              kerase_append_right (mt (mem_keys_kerase_of_ne h).mp a₁_nin_l₁)]
state_before: α : Type u
β : α → Type v
l✝ l₁✝ l₂✝ : List (Sigma β)
inst✝ : DecidableEq α
a₁ a₂ : α
l : List (Sigma β)
h : ¬a₁ = a₂
ha₂ : a₂ ∈ l.keys
b₁ : β a₁
l₁ l₂ : List (Sigma β)
a₁_nin_l₁ : a₁ ∉ l₁.keys
x✝ : a₂ ∈ (l₁ ++ ⟨a₁, b₁⟩ :: l₂).keys
ha₁ : a₁ ∈ (l₁ ++ ⟨a₁, b₁⟩ :: l₂).keys
h' : a₂ ∉ l₁.keys
⊢ kerase a₂ (l₁ ++ l₂) = kerase a₁ (kerase a₂ (l₁ ++ ⟨a₁, b₁⟩ :: l₂))
state_after: no goals
tactic: simp [kerase_append_right h', kerase_append_right a₁_nin_l₁,
              @kerase_cons_ne _ _ _ a₂ ⟨a₁, b₁⟩ _ (Ne.symm h)]
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a₁ a₂ : α
l : List (Sigma β)
h : ¬a₁ = a₂
ha₁ : a₁ ∈ l.keys
ha₂ : a₂ ∉ l.keys
⊢ kerase a₂ (kerase a₁ l) = kerase a₁ (kerase a₂ l)
state_after: no goals
tactic: simp [ha₂, mt mem_keys_of_mem_keys_kerase ha₂]
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a₁ a₂ : α
l : List (Sigma β)
h : ¬a₁ = a₂
ha₁ : a₁ ∉ l.keys
⊢ kerase a₂ (kerase a₁ l) = kerase a₁ (kerase a₂ l)
state_after: no goals
tactic: simp [ha₁, mt mem_keys_of_mem_keys_kerase ha₁]
Theorem: FinVec.exists_iff
File: Mathlib/Data/Fin/Tuple/Reflection.lean

Proof steps:
state_before: m n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
P : (Fin 0 → α) → Prop
⊢ Exists P ↔ ∃ x, P x
state_after: m n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
P : (Fin 0 → α) → Prop
⊢ P Fin.elim0 ↔ P finZeroElim
tactic: simp only [Exists, Fin.exists_fin_zero_pi, Matrix.vecEmpty]
state_before: m n : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
P : (Fin 0 → α) → Prop
⊢ P Fin.elim0 ↔ P finZeroElim
state_after: no goals
tactic: rfl
state_before: m n✝ : ℕ
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
P : (Fin n.succ → α) → Prop
⊢ Exists P ↔ ∃ x, P x
state_after: no goals
tactic: simp only [Exists, exists_iff, Fin.exists_fin_succ_pi, Matrix.vecCons]
Theorem: CategoryTheory.ProjectiveResolution.homotopyEquiv_hom_π
File: Mathlib/CategoryTheory/Abelian/ProjectiveResolution.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
X : C
P Q : ProjectiveResolution X
⊢ (P.homotopyEquiv Q).hom ≫ Q.π = P.π
state_after: no goals
tactic: simp [homotopyEquiv]
Theorem: Asymptotics.isBigO_const_left_iff_pos_le_norm
File: Mathlib/Analysis/Asymptotics/Asymptotics.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
E' : Type u_6
F' : Type u_7
G' : Type u_8
E'' : Type u_9
F'' : Type u_10
G'' : Type u_11
E''' : Type u_12
R : Type u_13
R' : Type u_14
𝕜 : Type u_15
𝕜' : Type u_16
inst✝¹³ : Norm E
inst✝¹² : Norm F
inst✝¹¹ : Norm G
inst✝¹⁰ : SeminormedAddCommGroup E'
inst✝⁹ : SeminormedAddCommGroup F'
inst✝⁸ : SeminormedAddCommGroup G'
inst✝⁷ : NormedAddCommGroup E''
inst✝⁶ : NormedAddCommGroup F''
inst✝⁵ : NormedAddCommGroup G''
inst✝⁴ : SeminormedRing R
inst✝³ : SeminormedAddGroup E'''
inst✝² : SeminormedRing R'
inst✝¹ : NormedDivisionRing 𝕜
inst✝ : NormedDivisionRing 𝕜'
c✝ c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
c : E''
hc : c ≠ 0
⊢ (fun _x => c) =O[l] f' ↔ ∃ b, 0 < b ∧ ∀ᶠ (x : α) in l, b ≤ ‖f' x‖
state_after: case mp
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
E' : Type u_6
F' : Type u_7
G' : Type u_8
E'' : Type u_9
F'' : Type u_10
G'' : Type u_11
E''' : Type u_12
R : Type u_13
R' : Type u_14
𝕜 : Type u_15
𝕜' : Type u_16
inst✝¹³ : Norm E
inst✝¹² : Norm F
inst✝¹¹ : Norm G
inst✝¹⁰ : SeminormedAddCommGroup E'
inst✝⁹ : SeminormedAddCommGroup F'
inst✝⁸ : SeminormedAddCommGroup G'
inst✝⁷ : NormedAddCommGroup E''
inst✝⁶ : NormedAddCommGroup F''
inst✝⁵ : NormedAddCommGroup G''
inst✝⁴ : SeminormedRing R
inst✝³ : SeminormedAddGroup E'''
inst✝² : SeminormedRing R'
inst✝¹ : NormedDivisionRing 𝕜
inst✝ : NormedDivisionRing 𝕜'
c✝ c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
c : E''
hc : c ≠ 0
⊢ (fun _x => c) =O[l] f' → ∃ b, 0 < b ∧ ∀ᶠ (x : α) in l, b ≤ ‖f' x‖

case mpr
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
E' : Type u_6
F' : Type u_7
G' : Type u_8
E'' : Type u_9
F'' : Type u_10
G'' : Type u_11
E''' : Type u_12
R : Type u_13
R' : Type u_14
𝕜 : Type u_15
𝕜' : Type u_16
inst✝¹³ : Norm E
inst✝¹² : Norm F
inst✝¹¹ : Norm G
inst✝¹⁰ : SeminormedAddCommGroup E'
inst✝⁹ : SeminormedAddCommGroup F'
inst✝⁸ : SeminormedAddCommGroup G'
inst✝⁷ : NormedAddCommGroup E''
inst✝⁶ : NormedAddCommGroup F''
inst✝⁵ : NormedAddCommGroup G''
inst✝⁴ : SeminormedRing R
inst✝³ : SeminormedAddGroup E'''
inst✝² : SeminormedRing R'
inst✝¹ : NormedDivisionRing 𝕜
inst✝ : NormedDivisionRing 𝕜'
c✝ c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
c : E''
hc : c ≠ 0
⊢ (∃ b, 0 < b ∧ ∀ᶠ (x : α) in l, b ≤ ‖f' x‖) → (fun _x => c) =O[l] f'
tactic: constructor
Theorem: Finsupp.LinearEquiv.finsuppUnique_symm_apply
File: Mathlib/LinearAlgebra/Finsupp.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁴ : AddCommMonoid M
inst✝³ : Semiring R
inst✝² : Module R M
α : Type u_4
inst✝¹ inst✝ : Unique α
m : M
⊢ (finsuppUnique R M α).symm m = single default m
state_after: case h
R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁴ : AddCommMonoid M
inst✝³ : Semiring R
inst✝² : Module R M
α : Type u_4
inst✝¹ inst✝ : Unique α
m : M
⊢ ((finsuppUnique R M α).symm m) default = (single default m) default
tactic: ext
state_before: case h
R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁴ : AddCommMonoid M
inst✝³ : Semiring R
inst✝² : Module R M
α : Type u_4
inst✝¹ inst✝ : Unique α
m : M
⊢ ((finsuppUnique R M α).symm m) default = (single default m) default
state_after: no goals
tactic: simp [LinearEquiv.finsuppUnique, Equiv.funUnique, single, Pi.single,
    equivFunOnFinite, Function.update]
Theorem: IsMonoidHom.comp
File: Mathlib/Deprecated/Group.lean

Proof steps:
state_before: α : Type u
β : Type v
inst✝² : MulOneClass α
inst✝¹ : MulOneClass β
f : α → β
hf : IsMonoidHom f
γ : Type u_1
inst✝ : MulOneClass γ
g : β → γ
hg : IsMonoidHom g
⊢ g (f 1) = 1
state_after: no goals
tactic: rw [hf.map_one, hg.map_one]
Theorem: List.mem_eraseIdx_iff_getElem?
File: .lake/packages/batteries/Batteries/Data/List/EraseIdx.lean

Proof steps:
state_before: α : Type u
β : Type v
x : α
l : List α
k : Nat
⊢ x ∈ l.eraseIdx k ↔ ∃ i, i ≠ k ∧ l[i]? = some x
state_after: α : Type u
β : Type v
x : α
l : List α
k : Nat
⊢ (∃ i, i ≠ k ∧ ∃ x_1, l[i]? = some x) ↔ ∃ i, i ≠ k ∧ l[i]? = some x
tactic: simp only [mem_eraseIdx_iff_getElem, getElem_eq_iff, Fin.exists_iff, exists_and_left]
state_before: α : Type u
β : Type v
x : α
l : List α
k : Nat
⊢ (∃ i, i ≠ k ∧ ∃ x_1, l[i]? = some x) ↔ ∃ i, i ≠ k ∧ l[i]? = some x
state_after: α : Type u
β : Type v
x : α
l : List α
k i : Nat
⊢ (∃ x_1, l[i]? = some x) ↔ l[i]? = some x
tactic: refine exists_congr fun i => and_congr_right' ?_
state_before: α : Type u
β : Type v
x : α
l : List α
k i : Nat
⊢ (∃ x_1, l[i]? = some x) ↔ l[i]? = some x
state_after: case mp
α : Type u
β : Type v
x : α
l : List α
k i : Nat
⊢ (∃ x_1, l[i]? = some x) → l[i]? = some x

case mpr
α : Type u
β : Type v
x : α
l : List α
k i : Nat
⊢ l[i]? = some x → ∃ x_1, l[i]? = some x
tactic: constructor
Theorem: PiNat.exists_lipschitz_retraction_of_isClosed
File: Mathlib/Topology/MetricSpace/PiNat.lean

Proof steps:
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
hne : s.Nonempty
⊢ ∃ f, (∀ x ∈ s, f x = x) ∧ range f = s ∧ LipschitzWith 1 f
state_after: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
hne : s.Nonempty
f : ((n : ℕ) → E n) → (n : ℕ) → E n := fun x => if x ∈ s then x else ⋯.some
⊢ ∃ f, (∀ x ∈ s, f x = x) ∧ range f = s ∧ LipschitzWith 1 f
tactic: set f := fun x => if x ∈ s then x else (inter_cylinder_longestPrefix_nonempty hs hne x).some
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
hne : s.Nonempty
f : ((n : ℕ) → E n) → (n : ℕ) → E n := fun x => if x ∈ s then x else ⋯.some
⊢ ∃ f, (∀ x ∈ s, f x = x) ∧ range f = s ∧ LipschitzWith 1 f
state_after: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
hne : s.Nonempty
f : ((n : ℕ) → E n) → (n : ℕ) → E n := fun x => if x ∈ s then x else ⋯.some
fs : ∀ x ∈ s, f x = x
⊢ ∃ f, (∀ x ∈ s, f x = x) ∧ range f = s ∧ LipschitzWith 1 f
tactic: have fs : ∀ x ∈ s, f x = x := fun x xs => by simp [f, xs]
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
hne : s.Nonempty
f : ((n : ℕ) → E n) → (n : ℕ) → E n := fun x => if x ∈ s then x else ⋯.some
fs : ∀ x ∈ s, f x = x
⊢ ∃ f, (∀ x ∈ s, f x = x) ∧ range f = s ∧ LipschitzWith 1 f
state_after: case refine_1
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
hne : s.Nonempty
f : ((n : ℕ) → E n) → (n : ℕ) → E n := fun x => if x ∈ s then x else ⋯.some
fs : ∀ x ∈ s, f x = x
⊢ range f = s

case refine_2
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
hne : s.Nonempty
f : ((n : ℕ) → E n) → (n : ℕ) → E n := fun x => if x ∈ s then x else ⋯.some
fs : ∀ x ∈ s, f x = x
⊢ LipschitzWith 1 f
tactic: refine ⟨f, fs, ?_, ?_⟩
Theorem: RatFunc.single_zpow
File: Mathlib/RingTheory/LaurentSeries.lean

Proof steps:
state_before: R : Type u_1
F : Type u
inst✝ : Field F
p q : F[X]
f g : RatFunc F
n : ℤ
⊢ (single n) 1 = (single 1) 1 ^ n
state_after: case ofNat
R : Type u_1
F : Type u
inst✝ : Field F
p q : F[X]
f g : RatFunc F
n_pos : ℕ
⊢ (single (Int.ofNat n_pos)) 1 = (single 1) 1 ^ Int.ofNat n_pos

case negSucc
R : Type u_1
F : Type u
inst✝ : Field F
p q : F[X]
f g : RatFunc F
n_neg : ℕ
⊢ (single (Int.negSucc n_neg)) 1 = (single 1) 1 ^ Int.negSucc n_neg
tactic: induction' n with n_pos n_neg
Theorem: InnerProductGeometry.norm_div_tan_angle_sub_of_inner_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

Proof steps:
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
h0 : x = 0 ∨ y ≠ 0
⊢ ‖y‖ / Real.tan (angle x (x - y)) = ‖x‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x = 0 ∨ y ≠ 0
⊢ ‖y‖ / Real.tan (angle x (x - y)) = ‖x‖
tactic: rw [← neg_eq_zero, ← inner_neg_right] at h
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x = 0 ∨ y ≠ 0
⊢ ‖y‖ / Real.tan (angle x (x - y)) = ‖x‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x = 0 ∨ -y ≠ 0
⊢ ‖y‖ / Real.tan (angle x (x - y)) = ‖x‖
tactic: rw [← neg_ne_zero] at h0
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x = 0 ∨ -y ≠ 0
⊢ ‖y‖ / Real.tan (angle x (x - y)) = ‖x‖
state_after: no goals
tactic: rw [sub_eq_add_neg, ← norm_neg, norm_div_tan_angle_add_of_inner_eq_zero h h0]
Theorem: UniqueMDiffWithinAt.eq
File: Mathlib/Geometry/Manifold/MFDeriv/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝¹⁵ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁴ : NormedAddCommGroup E
inst✝¹³ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹² : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹¹ : TopologicalSpace M
inst✝¹⁰ : ChartedSpace H M
E' : Type u_5
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁷ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁶ : TopologicalSpace M'
inst✝⁵ : ChartedSpace H' M'
E'' : Type u_8
inst✝⁴ : NormedAddCommGroup E''
inst✝³ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝² : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝¹ : TopologicalSpace M''
inst✝ : ChartedSpace H'' M''
f f₀ f₁ : M → M'
x : M
s t : Set M
g : M' → M''
u : Set M'
Is : SmoothManifoldWithCorners I M
I's : SmoothManifoldWithCorners I' M'
I''s : SmoothManifoldWithCorners I'' M''
f' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)
g' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))
U : UniqueMDiffWithinAt I s x
h : HasMFDerivWithinAt I I' f s x f'
h₁ : HasMFDerivWithinAt I I' f s x f₁'
⊢ f' = f₁'
state_after: no goals
tactic: convert U.eq h.2 h₁.2
Theorem: one_div_mul_add_mul_one_div_eq_one_div_add_one_div
File: Mathlib/Algebra/Field/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
K : Type u_3
inst✝ : DivisionSemiring α
a b c d : α
ha : a ≠ 0
hb : b ≠ 0
⊢ 1 / a * (a + b) * (1 / b) = 1 / a + 1 / b
state_after: no goals
tactic: simpa only [one_div] using (inv_add_inv' ha hb).symm
Theorem: roth_3ap_theorem
File: Mathlib/Combinatorics/Additive/Corner/Roth.lean

Proof steps:
state_before: G : Type u_1
inst✝¹ : AddCommGroup G
inst✝ : Fintype G
A✝ B : Finset (G × G)
a b c d x y : G
n : ℕ
ε✝ ε : ℝ
hε : 0 < ε
hG : cornersTheoremBound ε ≤ Fintype.card G
A : Finset G
hAε : ε * ↑(Fintype.card G) ≤ ↑A.card
⊢ ¬ThreeAPFree ↑A
state_after: G : Type u_1
inst✝¹ : AddCommGroup G
inst✝ : Fintype G
A✝ B : Finset (G × G)
a b c d x y : G
n : ℕ
ε✝ ε : ℝ
hε : 0 < ε
hG : cornersTheoremBound ε ≤ Fintype.card G
A : Finset G
hAε : ε * ↑(Fintype.card G) ≤ ↑A.card
hA : ThreeAPFree ↑A
⊢ False
tactic: rintro hA
state_before: G : Type u_1
inst✝¹ : AddCommGroup G
inst✝ : Fintype G
A✝ B : Finset (G × G)
a b c d x y : G
n : ℕ
ε✝ ε : ℝ
hε : 0 < ε
hG : cornersTheoremBound ε ≤ Fintype.card G
A : Finset G
hAε : ε * ↑(Fintype.card G) ≤ ↑A.card
hA : ThreeAPFree ↑A
⊢ False
state_after: no goals
tactic: classical
  let B : Finset (G × G) := univ.filter fun (x, y) ↦ y - x ∈ A
  have : ε * card G ^ 2 ≤ B.card := by
    calc
      _ = card G * (ε * card G) := by ring
      _ ≤ card G * A.card := by gcongr
      _ = B.card := ?_
    norm_cast
    rw [← card_univ, ← card_product]
    exact card_equiv ((Equiv.refl _).prodShear fun a ↦ Equiv.addLeft a) (by simp [B])
  obtain ⟨x₁, y₁, x₂, y₂, hx₁y₁, hx₁y₂, hx₂y₁, hxy, hx₁x₂⟩ :
      ∃ x₁ y₁ x₂ y₂, y₁ - x₁ ∈ A ∧ y₂ - x₁ ∈ A ∧ y₁ - x₂ ∈ A ∧ x₁ + y₂ = x₂ + y₁ ∧ x₁ ≠ x₂ := by
    simpa [IsCornerFree, isCorner_iff, B, -exists_and_left, -exists_and_right]
      using corners_theorem ε hε hG B this
  have := hA hx₂y₁ hx₁y₁ hx₁y₂ $ by -- TODO: This really ought to just be `by linear_combination h`
    rw [sub_add_sub_comm, add_comm, add_sub_add_comm, add_right_cancel_iff,
      sub_eq_sub_iff_add_eq_add, add_comm, hxy, add_comm]
  exact hx₁x₂ $ by simpa using this.symm
Theorem: Filter.limsSup_bot
File: Mathlib/Order/LiminfLimsup.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteLattice α
⊢ ⊥ ∈ {a | ∀ᶠ (n : α) in ⊥, n ≤ a}
state_after: no goals
tactic: simp
Theorem: List.get?_rotate
File: Mathlib/Data/List/Rotate.lean

Proof steps:
state_before: α : Type u
l : List α
n m : ℕ
hml : m < l.length
⊢ (l.rotate n).get? m = l.get? ((m + n) % l.length)
state_after: α : Type u
l : List α
n m : ℕ
hml : m < l.length
⊢ some l[(m + n) % l.length] = l[(m + n) % l.length]?
tactic: simp only [get?_eq_getElem?, length_rotate, hml, getElem?_eq_getElem, getElem_rotate]
state_before: α : Type u
l : List α
n m : ℕ
hml : m < l.length
⊢ some l[(m + n) % l.length] = l[(m + n) % l.length]?
state_after: no goals
tactic: rw [← getElem?_eq_getElem]
Theorem: smul_ne_zero_iff
File: Mathlib/Algebra/Module/Defs.lean

Proof steps:
state_before: α : Type u_1
R : Type u_2
k : Type u_3
S : Type u_4
M : Type u_5
M₂ : Type u_6
M₃ : Type u_7
ι : Type u_8
inst✝³ : Zero R
inst✝² : Zero M
inst✝¹ : SMulWithZero R M
inst✝ : NoZeroSMulDivisors R M
c : R
x : M
⊢ c • x ≠ 0 ↔ c ≠ 0 ∧ x ≠ 0
state_after: no goals
tactic: rw [Ne, smul_eq_zero, not_or]
Theorem: IsSeparatedMap.isClosed_eqLocus
File: Mathlib/Topology/SeparatedMap.lean

Proof steps:
state_before: X : Type u_3
Y : Type u_2
A : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace A
f : X → Y
sep : IsSeparatedMap f
inj : IsLocallyInjective f
g₁ g₂ : A → X
h₁ : Continuous g₁
h₂ : Continuous g₂
he : f ∘ g₁ = f ∘ g₂
g : A → Function.Pullback f f := fun a => ⟨(g₁ a, g₂ a), ⋯⟩
⊢ Continuous g
state_after: no goals
tactic: fun_prop
Theorem: CliffordAlgebra.contractRight_mul_algebraMap
File: Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean

Proof steps:
state_before: R : Type u1
inst✝² : CommRing R
M : Type u2
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
d d' : Module.Dual R M
a : CliffordAlgebra Q
r : R
⊢ (contractRight (a * (algebraMap R (CliffordAlgebra Q)) r)) d =
    (contractRight a) d * (algebraMap R (CliffordAlgebra Q)) r
state_after: no goals
tactic: rw [← Algebra.commutes, contractRight_algebraMap_mul, Algebra.commutes]
Theorem: MonoidHom.comp_coprod
File: Mathlib/Algebra/Group/Prod.lean

Proof steps:
state_before: A : Type u_1
B : Type u_2
G : Type u_3
H : Type u_4
M : Type u_5
N : Type u_6
P : Type u_7
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : CommMonoid P
f✝ : M →* P
g✝ : N →* P
Q : Type u_8
inst✝ : CommMonoid Q
h : P →* Q
f : M →* P
g : N →* P
x : M × N
⊢ (h.comp (f.coprod g)) x = ((h.comp f).coprod (h.comp g)) x
state_after: no goals
tactic: simp
Theorem: Submodule.mem_span_mul_finite_of_mem_span_mul
File: Mathlib/Algebra/Algebra/Operations.lean

Proof steps:
state_before: ι : Sort uι
R✝ : Type u
inst✝⁶ : CommSemiring R✝
A✝ : Type v
inst✝⁵ : Semiring A✝
inst✝⁴ : Algebra R✝ A✝
S✝ T : Set A✝
M N P Q : Submodule R✝ A✝
m n : A✝
R : Type u_1
A : Type u_2
inst✝³ : Semiring R
inst✝² : AddCommMonoid A
inst✝¹ : Mul A
inst✝ : Module R A
S S' : Set A
x : A
hx : x ∈ span R (S * S')
⊢ ∃ T T', ↑T ⊆ S ∧ ↑T' ⊆ S' ∧ x ∈ span R (↑T * ↑T')
state_after: no goals
tactic: classical
  obtain ⟨U, h, hU⟩ := mem_span_finite_of_mem_span hx
  obtain ⟨T, T', hS, hS', h⟩ := Finset.subset_mul h
  use T, T', hS, hS'
  have h' : (U : Set A) ⊆ T * T' := by assumption_mod_cast
  have h'' := span_mono h' hU
  assumption
Theorem: Nat.exists_lt_succ
File: Mathlib/Data/Nat/Defs.lean

Proof steps:
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ (∃ m, m < n + 1 ∧ p m) ↔ (∃ m, m < n ∧ p m) ∨ p n
state_after: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ (¬∃ m, m < n + 1 ∧ p m) ↔ ¬((∃ m, m < n ∧ p m) ∨ p n)
tactic: rw [← not_iff_not]
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ (¬∃ m, m < n + 1 ∧ p m) ↔ ¬((∃ m, m < n ∧ p m) ∨ p n)
state_after: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ (∀ (m : ℕ), m < n + 1 → ¬p m) ↔ (∀ (m : ℕ), m < n → ¬p m) ∧ ¬p n
tactic: push_neg
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ (∀ (m : ℕ), m < n + 1 → ¬p m) ↔ (∀ (m : ℕ), m < n → ¬p m) ∧ ¬p n
state_after: no goals
tactic: exact forall_lt_succ
Theorem: CategoryTheory.ShortComplex.RightHomologyData.opcyclesIso_inv_comp_descOpcycles
File: Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean

Proof steps:
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
h : S.RightHomologyData
A : C
k : S.X₂ ⟶ A
hk : S.f ≫ k = 0
inst✝ : S.HasRightHomology
⊢ h.opcyclesIso.inv ≫ S.descOpcycles k hk = h.descQ k hk
state_after: no goals
tactic: simp only [← cancel_epi h.p, p_comp_opcyclesIso_inv_assoc, p_descOpcycles, p_descQ]
Theorem: EuclideanGeometry.angle_add_angle_eq_pi_of_angle_eq_pi
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean

Proof steps:
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 p4 : P
h : ∠ p2 p3 p4 = π
⊢ ∠ p1 p3 p2 + ∠ p1 p3 p4 = π
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 p4 : P
h : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π
⊢ ∠ p1 p3 p2 + ∠ p1 p3 p4 = π
tactic: unfold angle at h
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 p4 : P
h : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π
⊢ ∠ p1 p3 p2 + ∠ p1 p3 p4 = π
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 p4 : P
h : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π
⊢ ∠ p2 p3 p1 + ∠ p4 p3 p1 = π
tactic: rw [angle_comm p1 p3 p2, angle_comm p1 p3 p4]
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 p4 : P
h : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π
⊢ ∠ p2 p3 p1 + ∠ p4 p3 p1 = π
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 p4 : P
h : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π
⊢ InnerProductGeometry.angle (p2 -ᵥ p3) (p1 -ᵥ p3) + InnerProductGeometry.angle (p4 -ᵥ p3) (p1 -ᵥ p3) = π
tactic: unfold angle
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 p4 : P
h : InnerProductGeometry.angle (p2 -ᵥ p3) (p4 -ᵥ p3) = π
⊢ InnerProductGeometry.angle (p2 -ᵥ p3) (p1 -ᵥ p3) + InnerProductGeometry.angle (p4 -ᵥ p3) (p1 -ᵥ p3) = π
state_after: no goals
tactic: exact angle_add_angle_eq_pi_of_angle_eq_pi _ h
Theorem: root_X_pow_sub_C_ne_zero'
File: Mathlib/FieldTheory/KummerExtension.lean

Proof steps:
state_before: K : Type u
inst✝ : Field K
n : ℕ
a : K
hn : 0 < n
ha : a ≠ 0
⊢ root (X ^ n - C a) ≠ 0
state_after: case inl
K : Type u
inst✝ : Field K
a : K
ha : a ≠ 0
hn : 0 < Nat.succ 0
⊢ root (X ^ Nat.succ 0 - C a) ≠ 0

case inr
K : Type u
inst✝ : Field K
n : ℕ
a : K
hn✝ : 0 < n
ha : a ≠ 0
hn : Nat.succ 0 < n
⊢ root (X ^ n - C a) ≠ 0
tactic: obtain (rfl|hn) := (Nat.succ_le_iff.mpr hn).eq_or_lt
Theorem: map_add_eq_zero
File: Mathlib/Algebra/Group/Hom/Defs.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
H : Type u_8
F : Type u_9
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : FunLike F M N
inst✝ : MonoidHomClass F M N
f : F
a b : M
h : a * b = 1
⊢ f a * f b = 1
state_after: no goals
tactic: rw [← map_mul, h, map_one]