ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: DirectSum.isInternal_submodule_iff_isCompl
File: Mathlib/Algebra/DirectSum/Module.lean

Proof steps:
state_before: R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
⊢ IsInternal A ↔ IsCompl (A i) (A j)
state_after: R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
this : ∀ (k : ι), k = i ∨ k = j
⊢ IsInternal A ↔ IsCompl (A i) (A j)
tactic: have : ∀ k, k = i ∨ k = j := fun k ↦ by simpa using Set.ext_iff.mp h k
state_before: R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
this : ∀ (k : ι), k = i ∨ k = j
⊢ IsInternal A ↔ IsCompl (A i) (A j)
state_after: R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
this : ∀ (k : ι), k = i ∨ k = j
⊢ Disjoint (A i) (A j) ∧ A i ⊔ A j = ⊤ ↔ IsCompl (A i) (A j)
tactic: rw [isInternal_submodule_iff_independent_and_iSup_eq_top, iSup, ← Set.image_univ, h,
    Set.image_insert_eq, Set.image_singleton, sSup_pair, CompleteLattice.independent_pair hij this]
state_before: R : Type u
inst✝² : Ring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommGroup M
inst✝ : Module R M
A : ι → Submodule R M
i j : ι
hij : i ≠ j
h : Set.univ = {i, j}
this : ∀ (k : ι), k = i ∨ k = j
⊢ Disjoint (A i) (A j) ∧ A i ⊔ A j = ⊤ ↔ IsCompl (A i) (A j)
state_after: no goals
tactic: exact ⟨fun ⟨hd, ht⟩ ↦ ⟨hd, codisjoint_iff.mpr ht⟩, fun ⟨hd, ht⟩ ↦ ⟨hd, ht.eq_top⟩⟩
Theorem: Polynomial.eval₂_natCast
File: Mathlib/Algebra/Polynomial/Eval.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
f : R →+* S
x : S
n : ℕ
⊢ eval₂ f x ↑n = ↑n
state_after: case zero
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
f : R →+* S
x : S
⊢ eval₂ f x ↑0 = ↑0

case succ
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
f : R →+* S
x : S
n : ℕ
ih : eval₂ f x ↑n = ↑n
⊢ eval₂ f x ↑(n + 1) = ↑(n + 1)
tactic: induction' n with n ih
Theorem: Nat.Prime.sum_divisors
File: Mathlib/NumberTheory/Divisors.lean

Proof steps:
state_before: n : ℕ
α : Type u_1
inst✝ : CommMonoid α
p : ℕ
f : ℕ → α
h : Prime p
⊢ ∏ x ∈ p.divisors, f x = f p * f 1
state_after: no goals
tactic: rw [← cons_self_properDivisors h.ne_zero, prod_cons, h.prod_properDivisors]
Theorem: List.length_finRange
File: Mathlib/Data/List/Range.lean

Proof steps:
state_before: α : Type u
n : ℕ
⊢ (finRange n).length = n
state_after: no goals
tactic: rw [finRange, length_pmap, length_range]
Theorem: Ordinal.lift_natCast
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

Proof steps:
state_before: ⊢ lift.{u, v} ↑0 = ↑0
state_after: no goals
tactic: simp
state_before: n : ℕ
⊢ lift.{u, v} ↑(n + 1) = ↑(n + 1)
state_after: no goals
tactic: simp [lift_natCast n]
Theorem: Set.Ioo_inter_Ioc_of_left_le
File: Mathlib/Order/Interval/Set/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
a a₁ a₂ b b₁ b₂ c d : α
h : b₁ ≤ b₂
⊢ Ioo a₁ b₁ ∩ Ioc a₂ b₂ = Ioo (max a₁ a₂) b₁
state_after: no goals
tactic: rw [inter_comm, Ioc_inter_Ioo_of_right_le h, max_comm]
Theorem: DFinsupp.sum_inner
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : _root_.RCLike 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
ι : Type u_4
inst✝² : DecidableEq ι
α : ι → Type u_5
inst✝¹ : (i : ι) → AddZeroClass (α i)
inst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)
f : (i : ι) → α i → E
l : Π₀ (i : ι), α i
x : E
⊢ ⟪l.sum f, x⟫_𝕜 = l.sum fun i a => ⟪f i a, x⟫_𝕜
state_after: no goals
tactic: simp (config := { contextual := true }) only [DFinsupp.sum, _root_.sum_inner, smul_eq_mul]
Theorem: Finsupp.filter_pos_add_filter_neg
File: Mathlib/Data/Finsupp/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝¹ : AddZeroClass M
f : α →₀ M
p : α → Prop
inst✝ : DecidablePred p
⊢ (fun f => ⇑f) (filter p f + filter (fun a => ¬p a) f) = (fun f => ⇑f) f
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝¹ : AddZeroClass M
f : α →₀ M
p : α → Prop
inst✝ : DecidablePred p
⊢ {x | p x}.indicator ⇑f + {a | ¬p a}.indicator ⇑f = ⇑f
tactic: simp only [coe_add, filter_eq_indicator]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝¹ : AddZeroClass M
f : α →₀ M
p : α → Prop
inst✝ : DecidablePred p
⊢ {x | p x}.indicator ⇑f + {a | ¬p a}.indicator ⇑f = ⇑f
state_after: no goals
tactic: exact Set.indicator_self_add_compl { x | p x } f
Theorem: MeasureTheory.Measure.mkMetric_mono
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
inst✝¹ : MeasurableSpace X
inst✝ : BorelSpace X
m₁ m₂ : ℝ≥0∞ → ℝ≥0∞
hle : m₁ ≤ᶠ[𝓝[≥] 0] m₂
⊢ mkMetric m₁ ≤ mkMetric m₂
state_after: no goals
tactic: convert @mkMetric_mono_smul X _ _ _ _ m₂ _ ENNReal.one_ne_top one_ne_zero _ <;> simp [*]
Theorem: Submodule.range_dualMap_mkQ_eq
File: Mathlib/LinearAlgebra/Dual.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
M' : Type u_3
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup M'
inst✝ : Module R M'
W : Submodule R M
⊢ LinearMap.range W.mkQ.dualMap = W.dualAnnihilator
state_after: case h
R : Type u_1
M : Type u_2
M' : Type u_3
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup M'
inst✝ : Module R M'
W : Submodule R M
φ : Dual R M
⊢ φ ∈ LinearMap.range W.mkQ.dualMap ↔ φ ∈ W.dualAnnihilator
tactic: ext φ
state_before: case h
R : Type u_1
M : Type u_2
M' : Type u_3
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup M'
inst✝ : Module R M'
W : Submodule R M
φ : Dual R M
⊢ φ ∈ LinearMap.range W.mkQ.dualMap ↔ φ ∈ W.dualAnnihilator
state_after: case h
R : Type u_1
M : Type u_2
M' : Type u_3
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup M'
inst✝ : Module R M'
W : Submodule R M
φ : Dual R M
⊢ (∃ y, W.mkQ.dualMap y = φ) ↔ φ ∈ W.dualAnnihilator
tactic: rw [LinearMap.mem_range]
state_before: case h
R : Type u_1
M : Type u_2
M' : Type u_3
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup M'
inst✝ : Module R M'
W : Submodule R M
φ : Dual R M
⊢ (∃ y, W.mkQ.dualMap y = φ) ↔ φ ∈ W.dualAnnihilator
state_after: case h.mp
R : Type u_1
M : Type u_2
M' : Type u_3
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup M'
inst✝ : Module R M'
W : Submodule R M
φ : Dual R M
⊢ (∃ y, W.mkQ.dualMap y = φ) → φ ∈ W.dualAnnihilator

case h.mpr
R : Type u_1
M : Type u_2
M' : Type u_3
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup M'
inst✝ : Module R M'
W : Submodule R M
φ : Dual R M
⊢ φ ∈ W.dualAnnihilator → ∃ y, W.mkQ.dualMap y = φ
tactic: constructor
Theorem: smul_mem_nhds
File: Mathlib/Topology/Algebra/Group/Basic.lean

Proof steps:
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace β
inst✝² : Group α
inst✝¹ : MulAction α β
inst✝ : ContinuousConstSMul α β
s : Set α
t : Set β
a : α
x : β
ht : t ∈ 𝓝 x
⊢ a • t ∈ 𝓝 (a • x)
state_after: case intro.intro.intro
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace β
inst✝² : Group α
inst✝¹ : MulAction α β
inst✝ : ContinuousConstSMul α β
s : Set α
t : Set β
a : α
x : β
ht : t ∈ 𝓝 x
u : Set β
ut : u ⊆ t
u_open : IsOpen u
hu : x ∈ u
⊢ a • t ∈ 𝓝 (a • x)
tactic: rcases mem_nhds_iff.1 ht with ⟨u, ut, u_open, hu⟩
state_before: case intro.intro.intro
G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace β
inst✝² : Group α
inst✝¹ : MulAction α β
inst✝ : ContinuousConstSMul α β
s : Set α
t : Set β
a : α
x : β
ht : t ∈ 𝓝 x
u : Set β
ut : u ⊆ t
u_open : IsOpen u
hu : x ∈ u
⊢ a • t ∈ 𝓝 (a • x)
state_after: no goals
tactic: exact mem_nhds_iff.2 ⟨a • u, smul_set_mono ut, u_open.smul a, smul_mem_smul_set hu⟩
Theorem: ComplexShape.QFactorsThroughHomotopy_of_exists_prev
File: Mathlib/Algebra/Homology/Localization.lean

Proof steps:
state_before: ι : Type u_1
c : ComplexShape ι
hc : ∀ (j : ι), ∃ i, c.Rel i j
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
inst✝ : CategoryWithHomology C
K L : HomologicalComplex C c
f g : K ⟶ L
h : Homotopy f g
⊢ AreEqualizedByLocalization (HomologicalComplex.quasiIso C c) f g
state_after: ι : Type u_1
c : ComplexShape ι
hc : ∀ (j : ι), ∃ i, c.Rel i j
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
inst✝ : CategoryWithHomology C
K L : HomologicalComplex C c
f g : K ⟶ L
h : Homotopy f g
this : DecidableRel c.Rel
⊢ AreEqualizedByLocalization (HomologicalComplex.quasiIso C c) f g
tactic: have : DecidableRel c.Rel := by classical infer_instance
state_before: ι : Type u_1
c : ComplexShape ι
hc : ∀ (j : ι), ∃ i, c.Rel i j
C : Type u_2
inst✝³ : Category.{u_3, u_2} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
inst✝ : CategoryWithHomology C
K L : HomologicalComplex C c
f g : K ⟶ L
h : Homotopy f g
this : DecidableRel c.Rel
⊢ AreEqualizedByLocalization (HomologicalComplex.quasiIso C c) f g
state_after: no goals
tactic: exact h.map_eq_of_inverts_homotopyEquivalences hc _
      (MorphismProperty.IsInvertedBy.of_le _ _ _
        (Localization.inverts _ (HomologicalComplex.quasiIso C _))
        (homotopyEquivalences_le_quasiIso C _))
Theorem: MeasureTheory.predictablePart_bdd_difference
File: Mathlib/Probability/Martingale/Centering.lean

Proof steps:
state_before: Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ✝ : Filtration ℕ m0
n : ℕ
R : ℝ≥0
f : ℕ → Ω → ℝ
ℱ : Filtration ℕ m0
hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R
state_after: Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ✝ : Filtration ℕ m0
n : ℕ
R : ℝ≥0
f : ℕ → Ω → ℝ
ℱ : Filtration ℕ m0
hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(μ[f (i + 1) - f i|↑ℱ i]) ω| ≤ ↑R
tactic: simp_rw [predictablePart, Finset.sum_apply, Finset.sum_range_succ_sub_sum]
state_before: Ω : Type u_1
E : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ : ℕ → Ω → E
ℱ✝ : Filtration ℕ m0
n : ℕ
R : ℝ≥0
f : ℕ → Ω → ℝ
ℱ : Filtration ℕ m0
hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R
⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(μ[f (i + 1) - f i|↑ℱ i]) ω| ≤ ↑R
state_after: no goals
tactic: exact ae_all_iff.2 fun i => ae_bdd_condexp_of_ae_bdd <| ae_all_iff.1 hbdd i
Theorem: Filter.tendsto_mul_const_atBot_iff
File: Mathlib/Order/Filter/AtTopBot.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : LinearOrderedField α
l : Filter β
f : β → α
r : α
inst✝ : l.NeBot
⊢ Tendsto (fun x => f x * r) l atBot ↔ 0 < r ∧ Tendsto f l atBot ∨ r < 0 ∧ Tendsto f l atTop
state_after: no goals
tactic: simp only [mul_comm _ r, tendsto_const_mul_atBot_iff]
Theorem: CompHaus.pullback_fst_eq
File: Mathlib/Topology/Category/CompHaus/Limits.lean

Proof steps:
state_before: X Y B : CompHaus
f : X ⟶ B
g : Y ⟶ B
⊢ pullback.fst f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.fst f g
state_after: X Y B : CompHaus
f : X ⟶ B
g : Y ⟶ B
⊢ pullback.fst f g =
    ((pullback.isLimit f g).conePointUniqueUpToIso (limit.isLimit (cospan f g))).hom ≫ Limits.pullback.fst f g
tactic: dsimp [pullbackIsoPullback]
state_before: X Y B : CompHaus
f : X ⟶ B
g : Y ⟶ B
⊢ pullback.fst f g =
    ((pullback.isLimit f g).conePointUniqueUpToIso (limit.isLimit (cospan f g))).hom ≫ Limits.pullback.fst f g
state_after: no goals
tactic: simp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_π]
Theorem: Real.fourierIntegral_fderiv
File: Mathlib/Analysis/Fourier/FourierTransformDeriv.lean

Proof steps:
state_before: E : Type u_1
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℂ E
V : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : FiniteDimensional ℝ V
inst✝¹ : MeasurableSpace V
inst✝ : BorelSpace V
f : V → E
hf : Integrable f volume
h'f : Differentiable ℝ f
hf' : Integrable (fderiv ℝ f) volume
⊢ 𝓕 (fderiv ℝ f) = fourierSMulRight (-innerSL ℝ) (𝓕 f)
state_after: E : Type u_1
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℂ E
V : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : FiniteDimensional ℝ V
inst✝¹ : MeasurableSpace V
inst✝ : BorelSpace V
f : V → E
hf : Integrable f volume
h'f : Differentiable ℝ f
hf' : Integrable (fderiv ℝ f) volume
⊢ 𝓕 (fderiv ℝ f) = fourierSMulRight (-(innerSL ℝ).flip) (𝓕 f)
tactic: rw [← innerSL_real_flip V]
state_before: E : Type u_1
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℂ E
V : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : FiniteDimensional ℝ V
inst✝¹ : MeasurableSpace V
inst✝ : BorelSpace V
f : V → E
hf : Integrable f volume
h'f : Differentiable ℝ f
hf' : Integrable (fderiv ℝ f) volume
⊢ 𝓕 (fderiv ℝ f) = fourierSMulRight (-(innerSL ℝ).flip) (𝓕 f)
state_after: no goals
tactic: exact VectorFourier.fourierIntegral_fderiv (innerSL ℝ) hf h'f hf'
Theorem: log_add_one_le_harmonic
File: Mathlib/NumberTheory/Harmonic/Bounds.lean

Proof steps:
state_before: n : ℕ
⊢ Real.log ↑(n + 1) ≤ ↑(harmonic n)
state_after: case calc_1
n : ℕ
⊢ Real.log ↑(n + 1) = ∫ (x : ℝ) in ↑1 ..↑(n + 1), x⁻¹

case calc_2
n : ℕ
⊢ ∫ (x : ℝ) in ↑1 ..↑(n + 1), x⁻¹ ≤ ∑ d ∈ Finset.Icc 1 n, (↑d)⁻¹

case calc_3
n : ℕ
⊢ ∑ d ∈ Finset.Icc 1 n, (↑d)⁻¹ = ↑(harmonic n)
tactic: calc _ = ∫ x in (1 : ℕ)..↑(n+1), x⁻¹ := ?_
       _ ≤ ∑ d ∈ Finset.Icc 1 n, (d : ℝ)⁻¹ := ?_
       _ = harmonic n := ?_
Theorem: Computation.tail_think
File: Mathlib/Data/Seq/Computation.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
⊢ s.think.tail = s
state_after: case mk
α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
⊢ (think ⟨f, al⟩).tail = ⟨f, al⟩
tactic: cases' s with f al
state_before: case mk
α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
⊢ (think ⟨f, al⟩).tail = ⟨f, al⟩
state_after: case mk.a
α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
⊢ ↑(think ⟨f, al⟩).tail = ↑⟨f, al⟩
tactic: apply Subtype.eq
state_before: case mk.a
α : Type u
β : Type v
γ : Type w
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
⊢ ↑(think ⟨f, al⟩).tail = ↑⟨f, al⟩
state_after: no goals
tactic: dsimp [tail, think]
Theorem: monomial_mem_adjoin_monomial
File: Mathlib/RingTheory/ReesAlgebra.lean

Proof steps:
state_before: R M : Type u
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I✝ I : Ideal R
n : ℕ
r : R
hr : r ∈ I ^ n
⊢ (monomial n) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)
state_after: case zero
R M : Type u
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I✝ I : Ideal R
r : R
hr : r ∈ I ^ 0
⊢ (monomial 0) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)

case succ
R M : Type u
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I✝ I : Ideal R
n : ℕ
hn : ∀ {r : R}, r ∈ I ^ n → (monomial n) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)
r : R
hr : r ∈ I ^ (n + 1)
⊢ (monomial (n + 1)) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)
tactic: induction' n with n hn generalizing r
Theorem: Nat.pair_unpair'
File: Mathlib/Data/Nat/Pairing.lean

Proof steps:
state_before: n a b : ℕ
H : unpair n = (a, b)
⊢ pair a b = n
state_after: no goals
tactic: simpa [H] using pair_unpair n
Theorem: EuclideanGeometry.Sphere.dist_div_sin_oangle_div_two_eq_radius
File: Mathlib/Geometry/Euclidean/Angle/Sphere.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
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
s : Sphere P
p₁ p₂ p₃ : P
hp₁ : p₁ ∈ s
hp₂ : p₂ ∈ s
hp₃ : p₃ ∈ s
hp₁p₂ : p₁ ≠ p₂
hp₁p₃ : p₁ ≠ p₃
hp₂p₃ : p₂ ≠ p₃
⊢ dist p₁ p₃ / |(∡ p₁ p₂ p₃).sin| / 2 = s.radius
state_after: case h.e'_2.h.e'_5.h.e'_6
V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
s : Sphere P
p₁ p₂ p₃ : P
hp₁ : p₁ ∈ s
hp₂ : p₂ ∈ s
hp₃ : p₃ ∈ s
hp₁p₂ : p₁ ≠ p₂
hp₁p₃ : p₁ ≠ p₃
hp₂p₃ : p₂ ≠ p₃
⊢ |(∡ p₁ p₂ p₃).sin| = (∡ p₃ p₁ s.center).cos
tactic: convert dist_div_cos_oangle_center_div_two_eq_radius hp₁ hp₃ hp₁p₃
state_before: case h.e'_2.h.e'_5.h.e'_6
V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
s : Sphere P
p₁ p₂ p₃ : P
hp₁ : p₁ ∈ s
hp₂ : p₂ ∈ s
hp₃ : p₃ ∈ s
hp₁p₂ : p₁ ≠ p₂
hp₁p₃ : p₁ ≠ p₃
hp₂p₃ : p₂ ≠ p₃
⊢ |(∡ p₁ p₂ p₃).sin| = (∡ p₃ p₁ s.center).cos
state_after: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
s : Sphere P
p₁ p₂ p₃ : P
hp₁ : p₁ ∈ s
hp₂ : p₂ ∈ s
hp₃ : p₃ ∈ s
hp₁p₂ : p₁ ≠ p₂
hp₁p₃ : p₁ ≠ p₃
hp₂p₃ : p₂ ≠ p₃
⊢ |(∡ p₃ p₁ s.center).toReal| ≤ π / 2
tactic: rw [← Real.Angle.abs_cos_eq_abs_sin_of_two_zsmul_add_two_zsmul_eq_pi
    (two_zsmul_oangle_center_add_two_zsmul_oangle_eq_pi hp₁ hp₂ hp₃ hp₁p₂.symm hp₂p₃ hp₁p₃),
    _root_.abs_of_nonneg (Real.Angle.cos_nonneg_iff_abs_toReal_le_pi_div_two.2 _)]
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
s : Sphere P
p₁ p₂ p₃ : P
hp₁ : p₁ ∈ s
hp₂ : p₂ ∈ s
hp₃ : p₃ ∈ s
hp₁p₂ : p₁ ≠ p₂
hp₁p₃ : p₁ ≠ p₃
hp₂p₃ : p₂ ≠ p₃
⊢ |(∡ p₃ p₁ s.center).toReal| ≤ π / 2
state_after: no goals
tactic: exact (abs_oangle_center_right_toReal_lt_pi_div_two hp₁ hp₃).le
Theorem: nndist_pi_eq_iff
File: Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
π : β → Type u_3
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ≥0
hr : 0 < r
⊢ nndist f g = r ↔ (∃ i, nndist (f i) (g i) = r) ∧ ∀ (b : β), nndist (f b) (g b) ≤ r
state_after: α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
π : β → Type u_3
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ≥0
hr : 0 < r
⊢ ((∃ x, ¬nndist (f x) (g x) < r) ∧ ∀ (b : β), nndist (f b) (g b) ≤ r) ↔
    (∃ i, nndist (f i) (g i) = r) ∧ ∀ (b : β), nndist (f b) (g b) ≤ r
tactic: rw [eq_iff_le_not_lt, nndist_pi_lt_iff hr, nndist_pi_le_iff, not_forall, and_comm]
state_before: α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
π : β → Type u_3
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ≥0
hr : 0 < r
⊢ ((∃ x, ¬nndist (f x) (g x) < r) ∧ ∀ (b : β), nndist (f b) (g b) ≤ r) ↔
    (∃ i, nndist (f i) (g i) = r) ∧ ∀ (b : β), nndist (f b) (g b) ≤ r
state_after: α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
π : β → Type u_3
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ≥0
hr : 0 < r
⊢ (∀ (b : β), nndist (f b) (g b) ≤ r) →
    ((∃ x, r ≤ nndist (f x) (g x)) ↔ ∃ i, nndist (f i) (g i) ≤ r ∧ r ≤ nndist (f i) (g i))
tactic: simp_rw [not_lt, and_congr_left_iff, le_antisymm_iff]
state_before: α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
π : β → Type u_3
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ≥0
hr : 0 < r
⊢ (∀ (b : β), nndist (f b) (g b) ≤ r) →
    ((∃ x, r ≤ nndist (f x) (g x)) ↔ ∃ i, nndist (f i) (g i) ≤ r ∧ r ≤ nndist (f i) (g i))
state_after: α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
π : β → Type u_3
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ≥0
hr : 0 < r
h : ∀ (b : β), nndist (f b) (g b) ≤ r
⊢ (∃ x, r ≤ nndist (f x) (g x)) ↔ ∃ i, nndist (f i) (g i) ≤ r ∧ r ≤ nndist (f i) (g i)
tactic: intro h
state_before: α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
π : β → Type u_3
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ≥0
hr : 0 < r
h : ∀ (b : β), nndist (f b) (g b) ≤ r
⊢ (∃ x, r ≤ nndist (f x) (g x)) ↔ ∃ i, nndist (f i) (g i) ≤ r ∧ r ≤ nndist (f i) (g i)
state_after: α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
π : β → Type u_3
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ≥0
hr : 0 < r
h : ∀ (b : β), nndist (f b) (g b) ≤ r
b : β
⊢ r ≤ nndist (f b) (g b) ↔ nndist (f b) (g b) ≤ r ∧ r ≤ nndist (f b) (g b)
tactic: refine exists_congr fun b => ?_
state_before: α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
π : β → Type u_3
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ≥0
hr : 0 < r
h : ∀ (b : β), nndist (f b) (g b) ≤ r
b : β
⊢ r ≤ nndist (f b) (g b) ↔ nndist (f b) (g b) ≤ r ∧ r ≤ nndist (f b) (g b)
state_after: no goals
tactic: apply (and_iff_right <| h _).symm
Theorem: List.pairwise_iff_getElem
File: .lake/packages/batteries/Batteries/Data/List/Pairwise.lean

Proof steps:
state_before: α✝ : Type u_1
R : α✝ → α✝ → Prop
l : List α✝
⊢ Pairwise R l ↔ ∀ (i j : Nat) (_hi : i < l.length) (_hj : j < l.length), i < j → R l[i] l[j]
state_after: α✝ : Type u_1
R : α✝ → α✝ → Prop
l : List α✝
⊢ (∀ {a b : α✝}, [a, b] <+ l → R a b) ↔ ∀ (i j : Nat) (_hi : i < l.length) (_hj : j < l.length), i < j → R l[i] l[j]
tactic: rw [pairwise_iff_forall_sublist]
state_before: α✝ : Type u_1
R : α✝ → α✝ → Prop
l : List α✝
⊢ (∀ {a b : α✝}, [a, b] <+ l → R a b) ↔ ∀ (i j : Nat) (_hi : i < l.length) (_hj : j < l.length), i < j → R l[i] l[j]
state_after: case mp
α✝ : Type u_1
R : α✝ → α✝ → Prop
l : List α✝
h : ∀ {a b : α✝}, [a, b] <+ l → R a b
⊢ ∀ (i j : Nat) (_hi : i < l.length) (_hj : j < l.length), i < j → R l[i] l[j]

case mpr
α✝ : Type u_1
R : α✝ → α✝ → Prop
l : List α✝
h : ∀ (i j : Nat) (_hi : i < l.length) (_hj : j < l.length), i < j → R l[i] l[j]
⊢ ∀ {a b : α✝}, [a, b] <+ l → R a b
tactic: constructor <;> intro h
Theorem: CategoryTheory.Limits.Types.Pushout.inr_rel'_inr_iff
File: Mathlib/CategoryTheory/Limits/Shapes/Types.lean

Proof steps:
state_before: S X₁ X₂ : Type u
f : S ⟶ X₁
g : S ⟶ X₂
x₂ y₂ : X₂
⊢ Rel' f g (Sum.inr x₂) (Sum.inr y₂) ↔ x₂ = y₂
state_after: case mp
S X₁ X₂ : Type u
f : S ⟶ X₁
g : S ⟶ X₂
x₂ y₂ : X₂
⊢ Rel' f g (Sum.inr x₂) (Sum.inr y₂) → x₂ = y₂

case mpr
S X₁ X₂ : Type u
f : S ⟶ X₁
g : S ⟶ X₂
x₂ y₂ : X₂
⊢ x₂ = y₂ → Rel' f g (Sum.inr x₂) (Sum.inr y₂)
tactic: constructor
Theorem: CategoryTheory.NatIso.naturality_2
File: Mathlib/CategoryTheory/NatIso.lean

Proof steps:
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
F G : C ⥤ D
X Y : C
α : F ≅ G
f : X ⟶ Y
⊢ α.hom.app X ≫ G.map f ≫ α.inv.app Y = F.map f
state_after: no goals
tactic: simp