ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: CategoryTheory.GrothendieckTopology.Subpresheaf.le_sheafify
File: Mathlib/CategoryTheory/Sites/Subsheaf.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
⊢ G ≤ sheafify J G
state_after: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ s ∈ (sheafify J G).obj U
tactic: intro U s hs
state_before: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ s ∈ (sheafify J G).obj U
state_after: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ G.sieveOfSection s ∈ J.sieves (unop U)
tactic: change _ ∈ J _
state_before: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ G.sieveOfSection s ∈ J.sieves (unop U)
state_after: case h.e'_4
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ G.sieveOfSection s = ⊤
tactic: convert J.top_mem U.unop
state_before: case h.e'_4
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ G.sieveOfSection s = ⊤
state_after: case h.e'_4
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ ⊤ ≤ G.sieveOfSection s
tactic: rw [eq_top_iff]
state_before: case h.e'_4
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ ⊤ ≤ G.sieveOfSection s
state_after: case h.e'_4
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
V : C
i : V ⟶ unop U
⊢ (G.sieveOfSection s).arrows i
tactic: rintro V i -
state_before: case h.e'_4
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
V : C
i : V ⟶ unop U
⊢ (G.sieveOfSection s).arrows i
state_after: no goals
tactic: exact G.map i.op hs
Theorem: LieAlgebra.IsKilling.chainLength_of_eq_zsmul_add
File: Mathlib/Algebra/Lie/Weights/RootSystem.lean

Proof steps:
state_before: K : Type u_1
L : Type u_2
inst✝⁷ : Field K
inst✝⁶ : CharZero K
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra K L
inst✝³ : IsKilling K L
inst✝² : FiniteDimensional K L
H : LieSubalgebra K L
inst✝¹ : H.IsCartanSubalgebra
inst✝ : IsTriangularizable K (↥H) L
α β : Weight K (↥H) L
hα : α.IsNonZero
β' : Weight K (↥H) L
n : ℤ
hβ' : ⇑β' = n • ⇑α + ⇑β
⊢ chainLength α β' = chainLength α β
state_after: case pos
K : Type u_1
L : Type u_2
inst✝⁷ : Field K
inst✝⁶ : CharZero K
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra K L
inst✝³ : IsKilling K L
inst✝² : FiniteDimensional K L
H : LieSubalgebra K L
inst✝¹ : H.IsCartanSubalgebra
inst✝ : IsTriangularizable K (↥H) L
α β : Weight K (↥H) L
hα✝ : α.IsNonZero
β' : Weight K (↥H) L
n : ℤ
hβ' : ⇑β' = n • ⇑α + ⇑β
hα : α.IsZero
⊢ chainLength α β' = chainLength α β

case neg
K : Type u_1
L : Type u_2
inst✝⁷ : Field K
inst✝⁶ : CharZero K
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra K L
inst✝³ : IsKilling K L
inst✝² : FiniteDimensional K L
H : LieSubalgebra K L
inst✝¹ : H.IsCartanSubalgebra
inst✝ : IsTriangularizable K (↥H) L
α β : Weight K (↥H) L
hα✝ : α.IsNonZero
β' : Weight K (↥H) L
n : ℤ
hβ' : ⇑β' = n • ⇑α + ⇑β
hα : ¬α.IsZero
⊢ chainLength α β' = chainLength α β
tactic: by_cases hα : α.IsZero
Theorem: Function.Surjective.nonempty_preimage
File: Mathlib/Data/Set/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Sort u_3
f : α → β
hf : Surjective f
s : Set β
⊢ (f ⁻¹' s).Nonempty ↔ s.Nonempty
state_after: no goals
tactic: rw [← image_nonempty, hf.image_preimage]
Theorem: EuclideanGeometry.Sphere.sbtw_secondInter
File: Mathlib/Geometry/Euclidean/Sphere/SecondInter.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
s : Sphere P
p p' : P
hp : p ∈ s
hp' : dist p' s.center < s.radius
⊢ Sbtw ℝ p p' (s.secondInter p (p' -ᵥ p))
state_after: case refine_1
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
s : Sphere P
p p' : P
hp : p ∈ s
hp' : dist p' s.center < s.radius
⊢ p' ≠ p

case refine_2
V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
s : Sphere P
p p' : P
hp : p ∈ s
hp' : dist p' s.center < s.radius
⊢ p' ≠ s.secondInter p (p' -ᵥ p)
tactic: refine ⟨Sphere.wbtw_secondInter hp hp'.le, ?_, ?_⟩
Theorem: Nat.prod_range_succ_factorial
File: Mathlib/Data/Nat/Factorial/SuperFactorial.lean

Proof steps:
state_before: n✝ n : ℕ
⊢ ∏ x ∈ range (n + 1 + 1), x ! = sf n + 1
state_after: no goals
tactic: rw [prod_range_succ, prod_range_succ_factorial n, mul_comm, superFactorial]
Theorem: Cubic.of_d_eq_zero
File: Mathlib/Algebra/CubicDiscriminant.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
F : Type u_3
K : Type u_4
P Q : Cubic R
a b c d a' b' c' d' : R
inst✝ : Semiring R
ha : P.a = 0
hb : P.b = 0
hc : P.c = 0
hd : P.d = 0
⊢ P.toPoly = 0
state_after: no goals
tactic: rw [of_c_eq_zero ha hb hc, hd, C_0]
Theorem: Nat.add_one_le_ceil_iff
File: Mathlib/Algebra/Order/Floor.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a : α
n : ℕ
⊢ n + 1 ≤ ⌈a⌉₊ ↔ ↑n < a
state_after: no goals
tactic: rw [← Nat.lt_ceil, Nat.add_one_le_iff]
Theorem: NonUnitalCommRing.ext_iff
File: Mathlib/Algebra/Ring/Ext.lean

Proof steps:
state_before: R : Type u
inst₁ inst₂ : NonUnitalCommRing R
⊢ inst₁ = inst₂ → HAdd.hAdd = HAdd.hAdd ∧ HMul.hMul = HMul.hMul
state_after: R : Type u
inst₁ : NonUnitalCommRing R
⊢ HAdd.hAdd = HAdd.hAdd ∧ HMul.hMul = HMul.hMul
tactic: rintro rfl
state_before: R : Type u
inst₁ : NonUnitalCommRing R
⊢ HAdd.hAdd = HAdd.hAdd ∧ HMul.hMul = HMul.hMul
state_after: no goals
tactic: constructor <;> rfl
Theorem: CategoryTheory.Functor.mapSquare_map_τ₄
File: Mathlib/CategoryTheory/Square.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
X✝ Y✝ : Square C
φ : X✝ ⟶ Y✝
⊢ ((fun sq => sq.map F) X✝).f₁₂ ≫ F.map φ.τ₂ = F.map φ.τ₁ ≫ ((fun sq => sq.map F) Y✝).f₁₂
state_after: no goals
tactic: simpa only [Functor.map_comp] using F.congr_map φ.comm₁₂
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
X✝ Y✝ : Square C
φ : X✝ ⟶ Y✝
⊢ ((fun sq => sq.map F) X✝).f₁₃ ≫ F.map φ.τ₃ = F.map φ.τ₁ ≫ ((fun sq => sq.map F) Y✝).f₁₃
state_after: no goals
tactic: simpa only [Functor.map_comp] using F.congr_map φ.comm₁₃
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
X✝ Y✝ : Square C
φ : X✝ ⟶ Y✝
⊢ ((fun sq => sq.map F) X✝).f₂₄ ≫ F.map φ.τ₄ = F.map φ.τ₂ ≫ ((fun sq => sq.map F) Y✝).f₂₄
state_after: no goals
tactic: simpa only [Functor.map_comp] using F.congr_map φ.comm₂₄
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
X✝ Y✝ : Square C
φ : X✝ ⟶ Y✝
⊢ ((fun sq => sq.map F) X✝).f₃₄ ≫ F.map φ.τ₄ = F.map φ.τ₃ ≫ ((fun sq => sq.map F) Y✝).f₃₄
state_after: no goals
tactic: simpa only [Functor.map_comp] using F.congr_map φ.comm₃₄
Theorem: Set.biInter_inter
File: Mathlib/Data/Set/Lattice.lean

Proof steps:
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι✝ → Sort u_7
κ₁ : ι✝ → Sort u_8
κ₂ : ι✝ → Sort u_9
κ' : ι' → Sort u_10
ι : Type u_11
α : Type u_12
s : Set ι
hs : s.Nonempty
f : ι → Set α
t : Set α
⊢ ⋂ i ∈ s, f i ∩ t = (⋂ i ∈ s, f i) ∩ t
state_after: α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι✝ → Sort u_7
κ₁ : ι✝ → Sort u_8
κ₂ : ι✝ → Sort u_9
κ' : ι' → Sort u_10
ι : Type u_11
α : Type u_12
s : Set ι
hs : s.Nonempty
f : ι → Set α
t : Set α
this : Nonempty ↑s
⊢ ⋂ i ∈ s, f i ∩ t = (⋂ i ∈ s, f i) ∩ t
tactic: haveI : Nonempty s := hs.to_subtype
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι✝ → Sort u_7
κ₁ : ι✝ → Sort u_8
κ₂ : ι✝ → Sort u_9
κ' : ι' → Sort u_10
ι : Type u_11
α : Type u_12
s : Set ι
hs : s.Nonempty
f : ι → Set α
t : Set α
this : Nonempty ↑s
⊢ ⋂ i ∈ s, f i ∩ t = (⋂ i ∈ s, f i) ∩ t
state_after: no goals
tactic: simp [biInter_eq_iInter, ← iInter_inter]
Theorem: Finset.bind_toFinset
File: Mathlib/Data/Finset/Union.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s✝ s₁ s₂ : Finset α
t✝ t₁ t₂ : α → Finset β
inst✝¹ : DecidableEq β
inst✝ : DecidableEq α
s : Multiset α
t : α → Multiset β
x : β
⊢ x ∈ (s.bind t).toFinset ↔ x ∈ s.toFinset.biUnion fun a => (t a).toFinset
state_after: no goals
tactic: simp only [Multiset.mem_toFinset, mem_biUnion, Multiset.mem_bind, exists_prop]
Theorem: Num.castNum_xor
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: α : Type u_1
⊢ ∀ (m n : Num), ↑(m ^^^ n) = ↑m ^^^ ↑n
state_after: no goals
tactic: apply castNum_eq_bitwise PosNum.lxor <;> intros <;> (try cases_type* Bool) <;> rfl
Theorem: ENNReal.tsum_add_one_eq_top
File: Mathlib/Topology/Instances/ENNReal.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f✝ g : α → ℝ≥0∞
f : ℕ → ℝ≥0∞
hf : ∑' (n : ℕ), f n = ⊤
hf0 : f 0 ≠ ⊤
⊢ ∑' (n : ℕ), f (n + 1) = ⊤
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f✝ g : α → ℝ≥0∞
f : ℕ → ℝ≥0∞
hf : f 0 = ⊤ ∨ ∑' (b : ℕ), f (b + 1) = ⊤
hf0 : f 0 ≠ ⊤
⊢ ∑' (n : ℕ), f (n + 1) = ⊤
tactic: rw [tsum_eq_zero_add' ENNReal.summable, add_eq_top] at hf
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f✝ g : α → ℝ≥0∞
f : ℕ → ℝ≥0∞
hf : f 0 = ⊤ ∨ ∑' (b : ℕ), f (b + 1) = ⊤
hf0 : f 0 ≠ ⊤
⊢ ∑' (n : ℕ), f (n + 1) = ⊤
state_after: no goals
tactic: exact hf.resolve_left hf0
Theorem: mul_le_of_one_le_left
File: Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean

Proof steps:
state_before: α : Type u
β : Type u_1
inst✝⁵ : Semiring α
inst✝⁴ : Preorder α
a b c d : α
inst✝³ : ExistsAddOfLE α
inst✝² : MulPosMono α
inst✝¹ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
hb : b ≤ 0
h : 1 ≤ a
⊢ a * b ≤ b
state_after: no goals
tactic: simpa only [one_mul] using mul_le_mul_of_nonpos_right h hb
Theorem: Real.sqrtTwoAddSeries_zero
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

Proof steps:
state_before: x : ℝ
⊢ x.sqrtTwoAddSeries 0 = x
state_after: no goals
tactic: simp
Theorem: div_lt_div_left
File: Mathlib/Algebra/Order/Field/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 < a
hb : 0 < b
hc : 0 < c
⊢ a / b < a / c ↔ c < b
state_after: no goals
tactic: simp only [div_eq_mul_inv, mul_lt_mul_left ha, inv_lt_inv hb hc]
Theorem: EckmannHilton.mul_comm
File: Mathlib/GroupTheory/EckmannHilton.lean

Proof steps:
state_before: X : Type u
m₁ m₂ : X → X → X
e₁ e₂ : X
h₁ : IsUnital m₁ e₁
h₂ : IsUnital m₂ e₂
distrib : ∀ (a b c d : X), m₁ (m₂ a b) (m₂ c d) = m₂ (m₁ a c) (m₁ b d)
a b : X
⊢ m₂ a b = m₂ b a
state_after: no goals
tactic: simpa [mul h₁ h₂ distrib, h₂.left_id, h₂.right_id] using distrib e₂ a b e₂
Theorem: Polynomial.toFinsupp_sub
File: Mathlib/Algebra/Polynomial/Basic.lean

Proof steps:
state_before: R✝ : Type u
a✝ b✝ : R✝
m n : ℕ
inst✝¹ : Semiring R✝
p q : R✝[X]
R : Type u
inst✝ : Ring R
a b : R[X]
⊢ (a - b).toFinsupp = a.toFinsupp - b.toFinsupp
state_after: R✝ : Type u
a✝ b✝ : R✝
m n : ℕ
inst✝¹ : Semiring R✝
p q : R✝[X]
R : Type u
inst✝ : Ring R
a b : R[X]
⊢ (a - b).toFinsupp = (a + -b).toFinsupp
tactic: rw [sub_eq_add_neg, ← toFinsupp_neg, ← toFinsupp_add]
state_before: R✝ : Type u
a✝ b✝ : R✝
m n : ℕ
inst✝¹ : Semiring R✝
p q : R✝[X]
R : Type u
inst✝ : Ring R
a b : R[X]
⊢ (a - b).toFinsupp = (a + -b).toFinsupp
state_after: no goals
tactic: rfl
Theorem: mul_eq_of_eq_div
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Group G
a b c d : G
n : ℤ
h : a = c / b
⊢ a * b = c
state_after: no goals
tactic: simp [h]
Theorem: Nat.bodd_bit
File: Mathlib/Data/Nat/Bits.lean

Proof steps:
state_before: m n✝ : ℕ
b : Bool
n : ℕ
⊢ (bit b n).bodd = b
state_after: m n✝ : ℕ
b : Bool
n : ℕ
⊢ (2 * n + bif b then 1 else 0).bodd = b
tactic: rw [bit_val]
state_before: m n✝ : ℕ
b : Bool
n : ℕ
⊢ (2 * n + bif b then 1 else 0).bodd = b
state_after: m n✝ : ℕ
b : Bool
n : ℕ
⊢ (bif b then 1 else 0).bodd = b
tactic: simp only [Nat.mul_comm, Nat.add_comm, bodd_add, bodd_mul, bodd_succ, bodd_zero, Bool.not_false,
    Bool.not_true, Bool.and_false, Bool.xor_false]
state_before: m n✝ : ℕ
b : Bool
n : ℕ
⊢ (bif b then 1 else 0).bodd = b
state_after: no goals
tactic: cases b <;> cases bodd n <;> rfl
Theorem: WittVector.mapFun.zero
File: Mathlib/RingTheory/WittVector/Basic.lean

Proof steps:
state_before: p : ℕ
R : Type u_1
S : Type u_2
T : Type u_3
hp : Fact (Nat.Prime p)
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : CommRing T
α : Type u_4
β : Type u_5
f : R →+* S
x y : 𝕎 R
⊢ mapFun (⇑f) 0 = 0
state_after: no goals
tactic: map_fun_tac
Theorem: FractionalIdeal.le_self_mul_self
File: Mathlib/RingTheory/FractionalIdeal/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝² : CommRing R
S : Submonoid R
P : Type u_2
inst✝¹ : CommRing P
inst✝ : Algebra R P
loc : IsLocalization S P
I : FractionalIdeal S P
hI : 1 ≤ I
⊢ I ≤ I * I
state_after: case h.e'_3
R : Type u_1
inst✝² : CommRing R
S : Submonoid R
P : Type u_2
inst✝¹ : CommRing P
inst✝ : Algebra R P
loc : IsLocalization S P
I : FractionalIdeal S P
hI : 1 ≤ I
⊢ I = (fun x => I * x) 1
tactic: convert mul_left_mono I hI
state_before: case h.e'_3
R : Type u_1
inst✝² : CommRing R
S : Submonoid R
P : Type u_2
inst✝¹ : CommRing P
inst✝ : Algebra R P
loc : IsLocalization S P
I : FractionalIdeal S P
hI : 1 ≤ I
⊢ I = (fun x => I * x) 1
state_after: no goals
tactic: exact (mul_one I).symm
Theorem: FreeAddGroup.norm_eq_zero
File: Mathlib/GroupTheory/FreeGroup/Basic.lean

Proof steps:
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
inst✝ : DecidableEq α
x : FreeGroup α
⊢ x.norm = 0 ↔ x = 1
state_after: no goals
tactic: simp only [norm, List.length_eq_zero, toWord_eq_nil_iff]
Theorem: Multiset.powersetCardAux_eq_map_coe
File: Mathlib/Data/Multiset/Powerset.lean

Proof steps:
state_before: α : Type u_1
n : ℕ
l : List α
⊢ powersetCardAux n l = List.map ofList (sublistsLen n l)
state_after: no goals
tactic: rw [powersetCardAux, sublistsLenAux_eq, append_nil]
Theorem: QuadraticMap.polar_add_left_iff
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

Proof steps:
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : AddCommGroup N
f : M → N
x x' y : M
⊢ polar f (x + x') y = polar f x y + polar f x' y ↔
    f (x + x' + y) + (f x + f x' + f y) = f (x + x') + f (x' + y) + f (y + x)
state_after: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : AddCommGroup N
f : M → N
x x' y : M
⊢ polar f (x + x') y = polar f x y + polar f x' y ↔
    f (x + x' + y) + f x + f x' + f y = f (x + x') + f (x' + y) + f (y + x)
tactic: simp only [← add_assoc]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : AddCommGroup N
f : M → N
x x' y : M
⊢ polar f (x + x') y = polar f x y + polar f x' y ↔
    f (x + x' + y) + f x + f x' + f y = f (x + x') + f (x' + y) + f (y + x)
state_after: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : AddCommGroup N
f : M → N
x x' y : M
⊢ f (x + x' + y) + f y + f x' + f y + f x = f (x + y) + f (x' + y) + f y + f (x + x') ↔
    f (x + x' + y) + f x + f x' + f y = f (x + x') + f (x' + y) + f (y + x)
tactic: simp only [polar, sub_eq_iff_eq_add, eq_sub_iff_add_eq, sub_add_eq_add_sub, add_sub]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : AddCommGroup N
f : M → N
x x' y : M
⊢ f (x + x' + y) + f y + f x' + f y + f x = f (x + y) + f (x' + y) + f y + f (x + x') ↔
    f (x + x' + y) + f x + f x' + f y = f (x + x') + f (x' + y) + f (y + x)
state_after: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : AddCommGroup N
f : M → N
x x' y : M
⊢ f (x + x' + y) + f x + f x' + f y + f y = f (x + y) + f (x' + y) + f (x + x') + f y ↔
    f (x + x' + y) + f x + f x' + f y = f (x + x') + f (x' + y) + f (y + x)
tactic: simp only [add_right_comm _ (f y) _, add_right_comm _ (f x') (f x)]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : AddCommGroup N
f : M → N
x x' y : M
⊢ f (x + x' + y) + f x + f x' + f y + f y = f (x + y) + f (x' + y) + f (x + x') + f y ↔
    f (x + x' + y) + f x + f x' + f y = f (x + x') + f (x' + y) + f (y + x)
state_after: no goals
tactic: rw [add_comm y x, add_right_comm _ _ (f (x + y)), add_comm _ (f (x + y)),
    add_right_comm (f (x + y)), add_left_inj]
Theorem: Submodule.coe_sup
File: Mathlib/LinearAlgebra/Span.lean

Proof steps:
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
x : M
p p' : Submodule R M
inst✝⁴ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝³ : AddCommMonoid M₂
inst✝² : Module R₂ M₂
F : Type u_8
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F σ₁₂ M M₂
s t : Set M
⊢ ↑(p ⊔ p') = ↑p + ↑p'
state_after: case h
R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
x : M
p p' : Submodule R M
inst✝⁴ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝³ : AddCommMonoid M₂
inst✝² : Module R₂ M₂
F : Type u_8
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F σ₁₂ M M₂
s t : Set M
x✝ : M
⊢ x✝ ∈ ↑(p ⊔ p') ↔ x✝ ∈ ↑p + ↑p'
tactic: ext
state_before: case h
R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
x : M
p p' : Submodule R M
inst✝⁴ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝³ : AddCommMonoid M₂
inst✝² : Module R₂ M₂
F : Type u_8
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F σ₁₂ M M₂
s t : Set M
x✝ : M
⊢ x✝ ∈ ↑(p ⊔ p') ↔ x✝ ∈ ↑p + ↑p'
state_after: case h
R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
x : M
p p' : Submodule R M
inst✝⁴ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝³ : AddCommMonoid M₂
inst✝² : Module R₂ M₂
F : Type u_8
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F σ₁₂ M M₂
s t : Set M
x✝ : M
⊢ (∃ y ∈ p, ∃ z ∈ p', y + z = x✝) ↔ ∃ x ∈ ↑p, ∃ y ∈ ↑p', x + y = x✝
tactic: rw [SetLike.mem_coe, mem_sup, Set.mem_add]
state_before: case h
R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
x : M
p p' : Submodule R M
inst✝⁴ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝³ : AddCommMonoid M₂
inst✝² : Module R₂ M₂
F : Type u_8
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F σ₁₂ M M₂
s t : Set M
x✝ : M
⊢ (∃ y ∈ p, ∃ z ∈ p', y + z = x✝) ↔ ∃ x ∈ ↑p, ∃ y ∈ ↑p', x + y = x✝
state_after: no goals
tactic: simp
Theorem: Orientation.kahler_map_complex
File: Mathlib/Analysis/InnerProductSpace/TwoDim.lean

Proof steps:
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
f : E ≃ₗᵢ[ℝ] ℂ
hf : (map (Fin 2) f.toLinearEquiv) o = Complex.orientation
x y : E
⊢ (o.kahler x) y = (starRingEnd ℂ) (f x) * f y
state_after: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
f : E ≃ₗᵢ[ℝ] ℂ
hf : (map (Fin 2) f.toLinearEquiv) o = Complex.orientation
x y : E
⊢ (o.kahler x) y = (o.kahler (f.symm (f x))) (f.symm (f y))
tactic: rw [← Complex.kahler, ← hf, kahler_map (hF := _)]
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
f : E ≃ₗᵢ[ℝ] ℂ
hf : (map (Fin 2) f.toLinearEquiv) o = Complex.orientation
x y : E
⊢ (o.kahler x) y = (o.kahler (f.symm (f x))) (f.symm (f y))
state_after: no goals
tactic: iterate 2 rw [LinearIsometryEquiv.symm_apply_apply]
Theorem: Compactum.lim_eq_str
File: Mathlib/Topology/Category/Compactum.lean

Proof steps:
state_before: X : Compactum
F : Ultrafilter X.A
⊢ F.lim = X.str F
state_after: X : Compactum
F : Ultrafilter X.A
⊢ ∀ (s : Set X.A), X.str F ∈ s → IsOpen s → s ∈ ↑F
tactic: rw [Ultrafilter.lim_eq_iff_le_nhds, le_nhds_iff]
state_before: X : Compactum
F : Ultrafilter X.A
⊢ ∀ (s : Set X.A), X.str F ∈ s → IsOpen s → s ∈ ↑F
state_after: no goals
tactic: tauto
Theorem: Zsqrtd.norm_zero
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

Proof steps:
state_before: d : ℤ
⊢ norm 0 = 0
state_after: no goals
tactic: simp [norm]
Theorem: Nat.toDigitsCore_length
File: Mathlib/Data/Nat/Digits.lean

Proof steps:
state_before: n✝ b : ℕ
h : 2 ≤ b
f n e : ℕ
hlt : n < b ^ e
h_e_pos : 0 < e
⊢ (b.toDigitsCore f n []).length ≤ e
state_after: no goals
tactic: induction f generalizing n e hlt h_e_pos with
    simp only [Nat.toDigitsCore, List.length, Nat.zero_le]
  | succ f ih =>
    cases e with
    | zero => exact False.elim (Nat.lt_irrefl 0 h_e_pos)
    | succ e =>
      if h_pred_pos : 0 < e then
        have _ : 0 < b := Nat.lt_trans (by decide) h
        specialize ih (n / b) e (nat_repr_len_aux n b e ‹0 < b› hlt) h_pred_pos
        if hdiv_ten : n / b = 0 then
          simp only [hdiv_ten]; exact Nat.le.step h_pred_pos
        else
          simp only [hdiv_ten,
            toDigitsCore_lens_eq b f (n / b) (Nat.digitChar <| n % b), if_false]
          exact Nat.succ_le_succ ih
      else
        obtain rfl : e = 0 := Nat.eq_zero_of_not_pos h_pred_pos
        have _ : b ^ 1 = b := by simp only [Nat.pow_succ, pow_zero, Nat.one_mul]
        have _ : n < b := ‹b ^ 1 = b› ▸ hlt
        simp [(@Nat.div_eq_of_lt n b ‹n < b› : n / b = 0)]
Theorem: Finset.prod_eq_single
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 β
s : Finset α
f : α → β
a : α
h₀ : ∀ b ∈ s, b ≠ a → f b = 1
h₁ : a ∉ s → f a = 1
this✝ : DecidableEq α
this : a ∉ s
b : α
hb : b ∈ s
⊢ b ≠ a
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
this✝ : DecidableEq α
b : α
hb : b ∈ s
h₀ : ∀ b_1 ∈ s, b_1 ≠ b → f b_1 = 1
h₁ : b ∉ s → f b = 1
this : b ∉ s
⊢ False
tactic: rintro rfl
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
this✝ : DecidableEq α
b : α
hb : b ∈ s
h₀ : ∀ b_1 ∈ s, b_1 ≠ b → f b_1 = 1
h₁ : b ∉ s → f b = 1
this : b ∉ s
⊢ False
state_after: no goals
tactic: exact this hb