ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: ContinuousLinearMap.apply_norm_sq_eq_inner_adjoint_right
File: Mathlib/Analysis/InnerProductSpace/Adjoint.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁹ : RCLike 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace G
inst✝ : CompleteSpace F
A : E →L[𝕜] F
x : E
⊢ ‖A x‖ ^ 2 = re ⟪x, ((adjoint A).comp A) x⟫_𝕜
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁹ : RCLike 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace G
inst✝ : CompleteSpace F
A : E →L[𝕜] F
x : E
h : ⟪x, ((adjoint A).comp A) x⟫_𝕜 = ⟪A x, A x⟫_𝕜
⊢ ‖A x‖ ^ 2 = re ⟪x, ((adjoint A).comp A) x⟫_𝕜
tactic: have h : ⟪x, (A† ∘L A) x⟫ = ⟪A x, A x⟫ := by rw [← adjoint_inner_right]; rfl
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁹ : RCLike 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace G
inst✝ : CompleteSpace F
A : E →L[𝕜] F
x : E
h : ⟪x, ((adjoint A).comp A) x⟫_𝕜 = ⟪A x, A x⟫_𝕜
⊢ ‖A x‖ ^ 2 = re ⟪x, ((adjoint A).comp A) x⟫_𝕜
state_after: no goals
tactic: rw [h, ← inner_self_eq_norm_sq (𝕜 := 𝕜) _]
Theorem: CategoryTheory.MorphismProperty.map_isoClosure
File: Mathlib/CategoryTheory/MorphismProperty/Basic.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{u_2, u_1} D
P : MorphismProperty C
F : C ⥤ D
⊢ P.isoClosure.map F = P.map F
state_after: case a
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{u_2, u_1} D
P : MorphismProperty C
F : C ⥤ D
⊢ P.isoClosure.map F ≤ P.map F

case a
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{u_2, u_1} D
P : MorphismProperty C
F : C ⥤ D
⊢ P.map F ≤ P.isoClosure.map F
tactic: apply le_antisymm
Theorem: Filter.tendsto_prod_iff'
File: Mathlib/Order/Filter/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s✝ : Set α
t : Set β
f : Filter α
g : Filter β
g' : Filter γ
s : α → β × γ
⊢ Tendsto s f (g ×ˢ g') ↔ Tendsto (fun n => (s n).1) f g ∧ Tendsto (fun n => (s n).2) f g'
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s✝ : Set α
t : Set β
f : Filter α
g : Filter β
g' : Filter γ
s : α → β × γ
⊢ Tendsto s f (g.prod g') ↔ Tendsto (fun n => (s n).1) f g ∧ Tendsto (fun n => (s n).2) f g'
tactic: dsimp only [SProd.sprod]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s✝ : Set α
t : Set β
f : Filter α
g : Filter β
g' : Filter γ
s : α → β × γ
⊢ Tendsto s f (g.prod g') ↔ Tendsto (fun n => (s n).1) f g ∧ Tendsto (fun n => (s n).2) f g'
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s✝ : Set α
t : Set β
f : Filter α
g : Filter β
g' : Filter γ
s : α → β × γ
⊢ Tendsto s f (comap Prod.fst g ⊓ comap Prod.snd g') ↔ Tendsto (fun n => (s n).1) f g ∧ Tendsto (fun n => (s n).2) f g'
tactic: unfold Filter.prod
Theorem: BoxIntegral.Integrable.to_subbox_aux
File: Mathlib/Analysis/BoxIntegral/Basic.lean

Proof steps:
state_before: ι : Type u
E : Type v
F : Type w
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
I J : Box ι
π : TaggedPrepartition I
inst✝¹ : Fintype ι
l : IntegrationParams
f g : (ι → ℝ) → E
vol : ι →ᵇᵃ[⊤] E →L[ℝ] F
y y' : F
c c₁ c₂ : ℝ≥0
ε ε₁ ε₂ : ℝ
π₁ π₂ : TaggedPrepartition I
inst✝ : CompleteSpace F
h : Integrable I l f vol
hJ : J ≤ I
⊢ ∃ y, HasIntegral J l f vol y ∧ Tendsto (integralSum f vol) (l.toFilteriUnion I (Prepartition.single I J hJ)) (𝓝 y)
state_after: ι : Type u
E : Type v
F : Type w
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
I J : Box ι
π : TaggedPrepartition I
inst✝¹ : Fintype ι
l : IntegrationParams
f g : (ι → ℝ) → E
vol : ι →ᵇᵃ[⊤] E →L[ℝ] F
y✝ y' : F
c c₁ c₂ : ℝ≥0
ε ε₁ ε₂ : ℝ
π₁ π₂ : TaggedPrepartition I
inst✝ : CompleteSpace F
h : Integrable I l f vol
hJ : J ≤ I
y : F
hy : Tendsto (integralSum f vol) (l.toFilteriUnion I (Prepartition.single I J hJ)) (𝓝 y)
⊢ HasIntegral J l f vol y
tactic: refine (cauchy_map_iff_exists_tendsto.1
    (h.cauchy_map_integralSum_toFilteriUnion (.single I J hJ))).imp fun y hy ↦ ⟨?_, hy⟩
state_before: ι : Type u
E : Type v
F : Type w
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
I J : Box ι
π : TaggedPrepartition I
inst✝¹ : Fintype ι
l : IntegrationParams
f g : (ι → ℝ) → E
vol : ι →ᵇᵃ[⊤] E →L[ℝ] F
y✝ y' : F
c c₁ c₂ : ℝ≥0
ε ε₁ ε₂ : ℝ
π₁ π₂ : TaggedPrepartition I
inst✝ : CompleteSpace F
h : Integrable I l f vol
hJ : J ≤ I
y : F
hy : Tendsto (integralSum f vol) (l.toFilteriUnion I (Prepartition.single I J hJ)) (𝓝 y)
⊢ HasIntegral J l f vol y
state_after: no goals
tactic: convert hy.comp (l.tendsto_embedBox_toFilteriUnion_top hJ)
Theorem: eq_mul_of_div_eq'
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✝ : CommGroup G
a b c d : G
h : a / b = c
⊢ a = b * c
state_after: no goals
tactic: simp [h.symm]
Theorem: Matrix.posSemidef_diagonal_iff
File: Mathlib/LinearAlgebra/Matrix/PosDef.lean

Proof steps:
state_before: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : CommRing R
inst✝⁴ : PartialOrder R
inst✝³ : StarRing R
inst✝² : StarOrderedRing R
inst✝¹ : RCLike 𝕜
inst✝ : DecidableEq n
d : n → R
⊢ (diagonal d).PosSemidef ↔ ∀ (i : n), 0 ≤ d i
state_after: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : CommRing R
inst✝⁴ : PartialOrder R
inst✝³ : StarRing R
inst✝² : StarOrderedRing R
inst✝¹ : RCLike 𝕜
inst✝ : DecidableEq n
d : n → R
⊢ (∀ (i : n), 0 ≤ d i) → (diagonal d).PosSemidef
tactic: refine ⟨fun ⟨_, hP⟩ i ↦ by simpa using hP (Pi.single i 1), ?_⟩
state_before: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : CommRing R
inst✝⁴ : PartialOrder R
inst✝³ : StarRing R
inst✝² : StarOrderedRing R
inst✝¹ : RCLike 𝕜
inst✝ : DecidableEq n
d : n → R
⊢ (∀ (i : n), 0 ≤ d i) → (diagonal d).PosSemidef
state_after: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : CommRing R
inst✝⁴ : PartialOrder R
inst✝³ : StarRing R
inst✝² : StarOrderedRing R
inst✝¹ : RCLike 𝕜
inst✝ : DecidableEq n
d : n → R
hd : ∀ (i : n), 0 ≤ d i
⊢ ∀ (x : n → R), 0 ≤ star x ⬝ᵥ diagonal d *ᵥ x
tactic: refine fun hd ↦ ⟨isHermitian_diagonal_iff.2 fun i ↦ IsSelfAdjoint.of_nonneg (hd i), ?_⟩
state_before: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : CommRing R
inst✝⁴ : PartialOrder R
inst✝³ : StarRing R
inst✝² : StarOrderedRing R
inst✝¹ : RCLike 𝕜
inst✝ : DecidableEq n
d : n → R
hd : ∀ (i : n), 0 ≤ d i
⊢ ∀ (x : n → R), 0 ≤ star x ⬝ᵥ diagonal d *ᵥ x
state_after: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : CommRing R
inst✝⁴ : PartialOrder R
inst✝³ : StarRing R
inst✝² : StarOrderedRing R
inst✝¹ : RCLike 𝕜
inst✝ : DecidableEq n
d : n → R
hd : ∀ (i : n), 0 ≤ d i
x : n → R
i : n
x✝ : i ∈ Finset.univ
⊢ 0 ≤ star x i * (diagonal d *ᵥ x) i
tactic: refine fun x ↦ Finset.sum_nonneg fun i _ ↦ ?_
state_before: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : CommRing R
inst✝⁴ : PartialOrder R
inst✝³ : StarRing R
inst✝² : StarOrderedRing R
inst✝¹ : RCLike 𝕜
inst✝ : DecidableEq n
d : n → R
hd : ∀ (i : n), 0 ≤ d i
x : n → R
i : n
x✝ : i ∈ Finset.univ
⊢ 0 ≤ star x i * (diagonal d *ᵥ x) i
state_after: no goals
tactic: simpa only [mulVec_diagonal, mul_assoc] using conjugate_nonneg (hd i) _
Theorem: MvPolynomial.weightedHomogeneousSubmodule_eq_finsupp_supported
File: Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
m : M
⊢ weightedHomogeneousSubmodule R w m = supported R R {d | (weight w) d = m}
state_after: case h
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
m : M
x : MvPolynomial σ R
⊢ x ∈ weightedHomogeneousSubmodule R w m ↔ x ∈ supported R R {d | (weight w) d = m}
tactic: ext x
state_before: case h
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
m : M
x : MvPolynomial σ R
⊢ x ∈ weightedHomogeneousSubmodule R w m ↔ x ∈ supported R R {d | (weight w) d = m}
state_after: case h
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
m : M
x : MvPolynomial σ R
⊢ x ∈ weightedHomogeneousSubmodule R w m ↔ ∀ x_1 ∈ ↑x.support, x_1 ∈ {d | (weight w) d = m}
tactic: rw [mem_supported, Set.subset_def]
state_before: case h
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
m : M
x : MvPolynomial σ R
⊢ x ∈ weightedHomogeneousSubmodule R w m ↔ ∀ x_1 ∈ ↑x.support, x_1 ∈ {d | (weight w) d = m}
state_after: case h
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
m : M
x : MvPolynomial σ R
⊢ x ∈ weightedHomogeneousSubmodule R w m ↔ ∀ (x_1 : σ →₀ ℕ), x x_1 ≠ 0 → x_1 ∈ {d | (weight w) d = m}
tactic: simp only [Finsupp.mem_support_iff, mem_coe]
state_before: case h
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
m : M
x : MvPolynomial σ R
⊢ x ∈ weightedHomogeneousSubmodule R w m ↔ ∀ (x_1 : σ →₀ ℕ), x x_1 ≠ 0 → x_1 ∈ {d | (weight w) d = m}
state_after: no goals
tactic: rfl
Theorem: Matrix.cons_add
File: Mathlib/Algebra/Group/Fin/Tuple.lean

Proof steps:
state_before: α : Type u_1
M : Type u_2
n : ℕ
inst✝ : Add α
x : α
v : Fin n → α
w : Fin n.succ → α
⊢ vecCons x v + w = vecCons (x + vecHead w) (v + vecTail w)
state_after: case h
α : Type u_1
M : Type u_2
n : ℕ
inst✝ : Add α
x : α
v : Fin n → α
w : Fin n.succ → α
i : Fin n.succ
⊢ (vecCons x v + w) i = vecCons (x + vecHead w) (v + vecTail w) i
tactic: ext i
state_before: case h
α : Type u_1
M : Type u_2
n : ℕ
inst✝ : Add α
x : α
v : Fin n → α
w : Fin n.succ → α
i : Fin n.succ
⊢ (vecCons x v + w) i = vecCons (x + vecHead w) (v + vecTail w) i
state_after: no goals
tactic: refine i.cases ?_ ?_ <;> simp [vecHead, vecTail]
Theorem: MeasureTheory.OuterMeasure.IsMetric.le_caratheodory
File: Mathlib/MeasureTheory/Measure/Hausdorff.lean

Proof steps:
state_before: ι : Type u_1
X : Type u_2
Y : Type u_3
inst✝³ : EMetricSpace X
inst✝² : EMetricSpace Y
μ : OuterMeasure X
inst✝¹ : MeasurableSpace X
inst✝ : BorelSpace X
hm : μ.IsMetric
⊢ inst✝¹ ≤ μ.caratheodory
state_after: ι : Type u_1
X : Type u_2
Y : Type u_3
inst✝³ : EMetricSpace X
inst✝² : EMetricSpace Y
μ : OuterMeasure X
inst✝¹ : MeasurableSpace X
inst✝ : BorelSpace X
hm : μ.IsMetric
⊢ borel X ≤ μ.caratheodory
tactic: rw [BorelSpace.measurable_eq (α := X)]
state_before: ι : Type u_1
X : Type u_2
Y : Type u_3
inst✝³ : EMetricSpace X
inst✝² : EMetricSpace Y
μ : OuterMeasure X
inst✝¹ : MeasurableSpace X
inst✝ : BorelSpace X
hm : μ.IsMetric
⊢ borel X ≤ μ.caratheodory
state_after: no goals
tactic: exact hm.borel_le_caratheodory
Theorem: Nat.div_le_self'
File: Mathlib/Data/Nat/Defs.lean

Proof steps:
state_before: a b c d m✝ n✝ k : ℕ
p q : ℕ → Prop
m n : ℕ
⊢ m / n ≤ m
state_after: case inl
a b c d m✝ n k : ℕ
p q : ℕ → Prop
m : ℕ
⊢ m / 0 ≤ m

case inr
a b c d m✝ n✝ k : ℕ
p q : ℕ → Prop
m n : ℕ
hn : n > 0
⊢ m / n ≤ m
tactic: obtain rfl | hn := n.eq_zero_or_pos
Theorem: ZMod.ringChar_zmod_n
File: Mathlib/Data/ZMod/Basic.lean

Proof steps:
state_before: n : ℕ
⊢ ringChar (ZMod n) = n
state_after: n : ℕ
⊢ CharP (ZMod n) n
tactic: rw [ringChar.eq_iff]
state_before: n : ℕ
⊢ CharP (ZMod n) n
state_after: no goals
tactic: exact ZMod.charP n
Theorem: Convex.mem_extremePoints_iff_mem_diff_convexHull_diff
File: Mathlib/Analysis/Convex/Extreme.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
ι : Type u_4
π : ι → Type u_5
inst✝⁴ : LinearOrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : DenselyOrdered 𝕜
inst✝ : NoZeroSMulDivisors 𝕜 E
A B : Set E
x : E
hA : Convex 𝕜 A
⊢ x ∈ extremePoints 𝕜 A ↔ x ∈ A \ (convexHull 𝕜) (A \ {x})
state_after: no goals
tactic: rw [hA.mem_extremePoints_iff_convex_diff, hA.convex_remove_iff_not_mem_convexHull_remove,
    mem_diff]
Theorem: List.formPerm_pow_apply_getElem
File: Mathlib/GroupTheory/Perm/List.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
w : l.Nodup
n i : ℕ
h : i < l.length
⊢ (l.formPerm ^ n) l[i] = l[(i + n) % l.length]
state_after: case zero
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
w : l.Nodup
i : ℕ
h : i < l.length
⊢ (l.formPerm ^ 0) l[i] = l[(i + 0) % l.length]

case succ
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
w : l.Nodup
i : ℕ
h : i < l.length
n : ℕ
hn : (l.formPerm ^ n) l[i] = l[(i + n) % l.length]
⊢ (l.formPerm ^ (n + 1)) l[i] = l[(i + (n + 1)) % l.length]
tactic: induction' n with n hn
Theorem: ZMod.isSquare_neg_one_iff'
File: Mathlib/NumberTheory/SumTwoSquares.lean

Proof steps:
state_before: n : ℕ
hn : Squarefree n
⊢ IsSquare (-1) ↔ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3
state_after: n : ℕ
hn : Squarefree n
help : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3
⊢ IsSquare (-1) ↔ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3
tactic: have help : ∀ a b : ZMod 4, a ≠ 3 → b ≠ 3 → a * b ≠ 3 := by decide
state_before: n : ℕ
hn : Squarefree n
help : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3
⊢ IsSquare (-1) ↔ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3
state_after: n : ℕ
hn : Squarefree n
help : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3
⊢ (∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3) ↔ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3
tactic: rw [ZMod.isSquare_neg_one_iff hn]
state_before: n : ℕ
hn : Squarefree n
help : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3
⊢ (∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3) ↔ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3
state_after: n : ℕ
hn : Squarefree n
help : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3
⊢ (∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3) → ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3
tactic: refine ⟨?_, fun H q _ => H⟩
state_before: n : ℕ
hn : Squarefree n
help : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3
⊢ (∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3) → ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3
state_after: n : ℕ
hn : Squarefree n
help : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3
H : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3
⊢ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3
tactic: intro H
state_before: n : ℕ
hn : Squarefree n
help : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3
H : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3
⊢ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3
state_after: case refine_1
n : ℕ
hn : Squarefree n
help : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3
H : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3
⊢ 0 ∣ n → 0 % 4 ≠ 3

case refine_2
n : ℕ
hn : Squarefree n
help : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3
H : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3
⊢ 1 ∣ n → 1 % 4 ≠ 3

case refine_3
n : ℕ
hn : Squarefree n
help : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3
H : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3
p q : ℕ
hp : Nat.Prime p
hq : q ∣ n → q % 4 ≠ 3
hpq : p * q ∣ n
⊢ p * q % 4 ≠ 3
tactic: refine @induction_on_primes _ ?_ ?_ (fun p q hp hq hpq => ?_)
Theorem: abs_sub_sq
File: Mathlib/Algebra/Order/Ring/Abs.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedCommRing α
a✝ b✝ c d a b : α
⊢ |a - b| * |a - b| = a * a + b * b - (1 + 1) * a * b
state_after: α : Type u_1
inst✝ : LinearOrderedCommRing α
a✝ b✝ c d a b : α
⊢ (a - b) * (a - b) = a * a + b * b - (1 + 1) * a * b
tactic: rw [abs_mul_abs_self]
state_before: α : Type u_1
inst✝ : LinearOrderedCommRing α
a✝ b✝ c d a b : α
⊢ (a - b) * (a - b) = a * a + b * b - (1 + 1) * a * b
state_after: no goals
tactic: simp only [mul_add, add_comm, add_left_comm, mul_comm, sub_eq_add_neg, mul_one, mul_neg,
    neg_add_rev, neg_neg, add_assoc]
Theorem: LieSubmodule.lieSpan_le
File: Mathlib/Algebra/Lie/Submodule.lean

Proof steps:
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N✝ N' : LieSubmodule R L M
I J : LieIdeal R L
s : Set M
N : LieSubmodule R L M
⊢ lieSpan R L s ≤ N ↔ s ⊆ ↑N
state_after: case mp
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N✝ N' : LieSubmodule R L M
I J : LieIdeal R L
s : Set M
N : LieSubmodule R L M
⊢ lieSpan R L s ≤ N → s ⊆ ↑N

case mpr
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N✝ N' : LieSubmodule R L M
I J : LieIdeal R L
s : Set M
N : LieSubmodule R L M
⊢ s ⊆ ↑N → lieSpan R L s ≤ N
tactic: constructor
Theorem: HomologicalComplex.homologyIsoSc'_hom_ι
File: Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean

Proof steps:
state_before: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
inst✝² : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K : HomologicalComplex C c
i j k : ι
hi : c.prev j = i
hk : c.next j = k
inst✝¹ : K.HasHomology j
inst✝ : (K.sc' i j k).HasHomology
⊢ (K.homologyIsoSc' i j k hi hk).hom ≫ (K.sc' i j k).homologyι = K.homologyι j ≫ (K.opcyclesIsoSc' i j k hi hk).hom
state_after: no goals
tactic: apply ShortComplex.homologyι_naturality
Theorem: Polynomial.expand_one
File: Mathlib/Algebra/Polynomial/Expand.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p q : ℕ
f : R[X]
r : R
⊢ (expand R 1) (C r) = C r
state_after: no goals
tactic: rw [expand_C]
state_before: R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p q : ℕ
f✝ f g : R[X]
ihf : (expand R 1) f = f
ihg : (expand R 1) g = g
⊢ (expand R 1) (f + g) = f + g
state_after: no goals
tactic: rw [map_add, ihf, ihg]
state_before: R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p q : ℕ
f : R[X]
n : ℕ
r : R
x✝ : (expand R 1) (C r * X ^ n) = C r * X ^ n
⊢ (expand R 1) (C r * X ^ (n + 1)) = C r * X ^ (n + 1)
state_after: no goals
tactic: rw [map_mul, expand_C, map_pow, expand_X, pow_one]
Theorem: LowerSet.iSup_Iic
File: Mathlib/Order/UpperLower/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
s✝ t : Set α
x : α
s : Set α
⊢ ⨆ a ∈ s, Iic a = lowerClosure s
state_after: case a.h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
s✝ t : Set α
x : α
s : Set α
x✝ : α
⊢ x✝ ∈ ↑(⨆ a ∈ s, Iic a) ↔ x✝ ∈ ↑(lowerClosure s)
tactic: ext
state_before: case a.h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
s✝ t : Set α
x : α
s : Set α
x✝ : α
⊢ x✝ ∈ ↑(⨆ a ∈ s, Iic a) ↔ x✝ ∈ ↑(lowerClosure s)
state_after: no goals
tactic: simp
Theorem: MeasureTheory.measure_union₀
File: Mathlib/MeasureTheory/Measure/NullMeasurable.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
m0 : MeasurableSpace α
μ : Measure α
s t : Set α
ht : NullMeasurableSet t μ
hd : AEDisjoint μ s t
⊢ μ (s ∪ t) = μ s + μ t
state_after: no goals
tactic: rw [← measure_union_add_inter₀ s ht, hd, add_zero]
Theorem: Ordinal.IsNormal.cof_le
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

Proof steps:
state_before: α : Type u_1
r : α → α → Prop
f : Ordinal.{u_2} → Ordinal.{u_2}
hf : IsNormal f
a : Ordinal.{u_2}
⊢ a.cof ≤ (f a).cof
state_after: case inl
α : Type u_1
r : α → α → Prop
f : Ordinal.{u_2} → Ordinal.{u_2}
hf : IsNormal f
⊢ cof 0 ≤ (f 0).cof

case inr.inl.intro
α : Type u_1
r : α → α → Prop
f : Ordinal.{u_2} → Ordinal.{u_2}
hf : IsNormal f
b : Ordinal.{u_2}
⊢ (succ b).cof ≤ (f (succ b)).cof

case inr.inr
α : Type u_1
r : α → α → Prop
f : Ordinal.{u_2} → Ordinal.{u_2}
hf : IsNormal f
a : Ordinal.{u_2}
ha : a.IsLimit
⊢ a.cof ≤ (f a).cof
tactic: rcases zero_or_succ_or_limit a with (rfl | ⟨b, rfl⟩ | ha)
Theorem: Set.diagonal_subset_iff
File: Mathlib/Data/Set/Prod.lean

Proof steps:
state_before: α : Type u_1
s✝ t : Set α
s : Set (α × α)
⊢ diagonal α ⊆ s ↔ ∀ (x : α), (x, x) ∈ s
state_after: no goals
tactic: rw [← range_diag, range_subset_iff]
Theorem: ax_grothendieck_of_locally_finite
File: Mathlib/FieldTheory/AxGrothendieck.lean

Proof steps:
state_before: ι : Type u_1
K : Type u_2
R : Type u_3
inst✝⁵ : Field K
inst✝⁴ : Finite K
inst✝³ : CommRing R
inst✝² : Finite ι
inst✝¹ : Algebra K R
inst✝ : Algebra.IsAlgebraic K R
ps : ι → MvPolynomial ι R
hinj : Injective fun v i => (MvPolynomial.eval v) (ps i)
⊢ Surjective fun v i => (MvPolynomial.eval v) (ps i)
state_after: no goals
tactic: classical
    intro v
    cases nonempty_fintype ι
    /- `s` is the set of all coefficients of the polynomial, as well as all of
      the coordinates of `v`, the point I am trying to find the preimage of. -/
    let s : Finset R :=
      (Finset.biUnion (univ : Finset ι) fun i => (ps i).support.image fun x => coeff x (ps i)) ∪
        (univ : Finset ι).image v
    have hv : ∀ i, v i ∈ Algebra.adjoin K (s : Set R) := fun j =>
      Algebra.subset_adjoin (mem_union_right _ (mem_image.2 ⟨j, mem_univ _, rfl⟩))
    have hs₁ : ∀ (i : ι) (k : ι →₀ ℕ),
        k ∈ (ps i).support → coeff k (ps i) ∈ Algebra.adjoin K (s : Set R) :=
      fun i k hk => Algebra.subset_adjoin
        (mem_union_left _ (mem_biUnion.2 ⟨i, mem_univ _, mem_image_of_mem _ hk⟩))
    letI := isNoetherian_adjoin_finset s fun x _ => Algebra.IsIntegral.isIntegral (R := K) x
    letI := Module.IsNoetherian.finite K (Algebra.adjoin K (s : Set R))
    letI : Finite (Algebra.adjoin K (s : Set R)) :=
      FiniteDimensional.finite_of_finite K (Algebra.adjoin K (s : Set R))
    -- The restriction of the polynomial map, `ps`, to the subalgebra generated by `s`
    let res : (ι → Algebra.adjoin K (s : Set R)) → ι → Algebra.adjoin K (s : Set R) := fun x i =>
      ⟨eval (fun j : ι => (x j : R)) (ps i), eval_mem (hs₁ _) fun i => (x i).2⟩
    have hres_inj : Injective res := by
      intro x y hxy
      ext i
      simp only [Subtype.ext_iff, funext_iff] at hxy
      exact congr_fun (hinj (funext hxy)) i
    have hres_surj : Surjective res := Finite.injective_iff_surjective.1 hres_inj
    cases' hres_surj fun i => ⟨v i, hv i⟩ with w hw
    use fun i => w i
    simpa only [Subtype.ext_iff, funext_iff] using hw
Theorem: Nat.mem_divisors
File: Mathlib/NumberTheory/Divisors.lean

Proof steps:
state_before: n m : ℕ
⊢ n ∈ m.divisors ↔ n ∣ m ∧ m ≠ 0
state_after: case inl
n : ℕ
⊢ n ∈ divisors 0 ↔ n ∣ 0 ∧ 0 ≠ 0

case inr
n m : ℕ
hm : m ≠ 0
⊢ n ∈ m.divisors ↔ n ∣ m ∧ m ≠ 0
tactic: rcases eq_or_ne m 0 with (rfl | hm)
state_before: case inr
n m : ℕ
hm : m ≠ 0
⊢ n ∈ m.divisors ↔ n ∣ m ∧ m ≠ 0
state_after: case inr
n m : ℕ
hm : m ≠ 0
⊢ n ∣ m → n ≤ m
tactic: simp only [hm, Ne, not_false_iff, and_true_iff, ← filter_dvd_eq_divisors hm, mem_filter,
    mem_range, and_iff_right_iff_imp, Nat.lt_succ_iff]
state_before: case inr
n m : ℕ
hm : m ≠ 0
⊢ n ∣ m → n ≤ m
state_after: no goals
tactic: exact le_of_dvd hm.bot_lt
Theorem: Mathlib.Meta.NormNum.IsRat.neg_to_eq
File: Mathlib/Tactic/NormNum/Result.lean

Proof steps:
state_before: α✝ : Type u
u : Level
α : Type u_1
inst✝ : DivisionRing α
n d : ℕ
inv✝ : Invertible ↑d
⊢ ↑(Int.negOfNat n) * ⅟↑d = -(↑n / ↑d)
state_after: no goals
tactic: simp [div_eq_mul_inv]