ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Polynomial.exists_degree_le_of_mem_span_of_finite
File: Mathlib/RingTheory/Polynomial/Basic.lean

Proof steps:
state_before: R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
hs : s.Nonempty
⊢ ∃ p' ∈ s, ∀ p ∈ Submodule.span R s, p.degree ≤ p'.degree
state_after: case intro.intro
R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
hs : s.Nonempty
a : R[X]
has : a ∈ s
hmax : ∀ a' ∈ s, a.degree ≤ a'.degree → a.degree = a'.degree
⊢ ∃ p' ∈ s, ∀ p ∈ Submodule.span R s, p.degree ≤ p'.degree
tactic: rcases Set.Finite.exists_maximal_wrt degree s s_fin hs with ⟨a, has, hmax⟩
state_before: case intro.intro
R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
hs : s.Nonempty
a : R[X]
has : a ∈ s
hmax : ∀ a' ∈ s, a.degree ≤ a'.degree → a.degree = a'.degree
⊢ ∃ p' ∈ s, ∀ p ∈ Submodule.span R s, p.degree ≤ p'.degree
state_after: case intro.intro
R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
hs : s.Nonempty
a : R[X]
has : a ∈ s
hmax : ∀ a' ∈ s, a.degree ≤ a'.degree → a.degree = a'.degree
p : R[X]
hp : p ∈ Submodule.span R s
⊢ p.degree ≤ a.degree
tactic: refine ⟨a, has, fun p hp => ?_⟩
state_before: case intro.intro
R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
hs : s.Nonempty
a : R[X]
has : a ∈ s
hmax : ∀ a' ∈ s, a.degree ≤ a'.degree → a.degree = a'.degree
p : R[X]
hp : p ∈ Submodule.span R s
⊢ p.degree ≤ a.degree
state_after: case intro.intro.intro
R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
hs : s.Nonempty
a : R[X]
has : a ∈ s
hmax : ∀ a' ∈ s, a.degree ≤ a'.degree → a.degree = a'.degree
p : R[X]
hp : p ∈ Submodule.span R s
p' : R[X]
hp' : p' ∈ s ∧ p.degree ≤ p'.degree
⊢ p.degree ≤ a.degree
tactic: rcases exists_degree_le_of_mem_span hs hp with ⟨p', hp'⟩
state_before: case intro.intro.intro
R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
hs : s.Nonempty
a : R[X]
has : a ∈ s
hmax : ∀ a' ∈ s, a.degree ≤ a'.degree → a.degree = a'.degree
p : R[X]
hp : p ∈ Submodule.span R s
p' : R[X]
hp' : p' ∈ s ∧ p.degree ≤ p'.degree
⊢ p.degree ≤ a.degree
state_after: case pos
R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
hs : s.Nonempty
a : R[X]
has : a ∈ s
hmax : ∀ a' ∈ s, a.degree ≤ a'.degree → a.degree = a'.degree
p : R[X]
hp : p ∈ Submodule.span R s
p' : R[X]
hp' : p' ∈ s ∧ p.degree ≤ p'.degree
h : a.degree ≤ p'.degree
⊢ p.degree ≤ a.degree

case neg
R : Type u
S : Type u_1
inst✝ : Semiring R
s : Set R[X]
s_fin : s.Finite
hs : s.Nonempty
a : R[X]
has : a ∈ s
hmax : ∀ a' ∈ s, a.degree ≤ a'.degree → a.degree = a'.degree
p : R[X]
hp : p ∈ Submodule.span R s
p' : R[X]
hp' : p' ∈ s ∧ p.degree ≤ p'.degree
h : ¬a.degree ≤ p'.degree
⊢ p.degree ≤ a.degree
tactic: by_cases h : degree a ≤ degree p'
Theorem: Multiset.inl_mem_disjSum
File: Mathlib/Data/Multiset/Sum.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s : Multiset α
t : Multiset β
s₁ s₂ : Multiset α
t₁ t₂ : Multiset β
a : α
b : β
x : α ⊕ β
⊢ inl a ∈ s.disjSum t ↔ a ∈ s
state_after: α : Type u_1
β : Type u_2
s : Multiset α
t : Multiset β
s₁ s₂ : Multiset α
t₁ t₂ : Multiset β
a : α
b : β
x : α ⊕ β
⊢ (∃ a_1 ∈ s, inl a_1 = inl a) ↔ a ∈ s

α : Type u_1
β : Type u_2
s : Multiset α
t : Multiset β
s₁ s₂ : Multiset α
t₁ t₂ : Multiset β
a : α
b : β
x : α ⊕ β
⊢ ¬∃ b ∈ t, inr b = inl a
tactic: rw [mem_disjSum, or_iff_left]
state_before: α : Type u_1
β : Type u_2
s : Multiset α
t : Multiset β
s₁ s₂ : Multiset α
t₁ t₂ : Multiset β
a : α
b : β
x : α ⊕ β
⊢ ¬∃ b ∈ t, inr b = inl a
state_after: case intro.intro
α : Type u_1
β : Type u_2
s : Multiset α
t : Multiset β
s₁ s₂ : Multiset α
t₁ t₂ : Multiset β
a : α
b✝ : β
x : α ⊕ β
b : β
left✝ : b ∈ t
hb : inr b = inl a
⊢ False
tactic: rintro ⟨b, _, hb⟩
state_before: case intro.intro
α : Type u_1
β : Type u_2
s : Multiset α
t : Multiset β
s₁ s₂ : Multiset α
t₁ t₂ : Multiset β
a : α
b✝ : β
x : α ⊕ β
b : β
left✝ : b ∈ t
hb : inr b = inl a
⊢ False
state_after: no goals
tactic: exact inr_ne_inl hb
Theorem: SimpleGraph.Subgraph.deleteEdges_le_of_le
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

Proof steps:
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ s s' : Set (Sym2 V)
h : s ⊆ s'
⊢ G'.deleteEdges s' ≤ G'.deleteEdges s
state_after: case right
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ s s' : Set (Sym2 V)
h : s ⊆ s'
⊢ ∀ ⦃v w : V⦄, G'.Adj v w → s(v, w) ∉ s' → s(v, w) ∉ s
tactic: constructor <;> simp (config := { contextual := true }) only [deleteEdges_verts, deleteEdges_adj,
    true_and_iff, and_imp, subset_rfl]
state_before: case right
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ s s' : Set (Sym2 V)
h : s ⊆ s'
⊢ ∀ ⦃v w : V⦄, G'.Adj v w → s(v, w) ∉ s' → s(v, w) ∉ s
state_after: no goals
tactic: exact fun _ _ _ hs' hs ↦ hs' (h hs)
Theorem: MeasureTheory.Measure.restrict_apply'
File: Mathlib/MeasureTheory/Measure/Restrict.lean

Proof steps:
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
hs : MeasurableSet s
⊢ (μ.restrict s) t = μ (t ∩ s)
state_after: no goals
tactic: rw [← toOuterMeasure_apply,
    Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict hs,
    OuterMeasure.restrict_apply s t _, toOuterMeasure_apply]
Theorem: SimpleGraph.three_le_egirth
File: Mathlib/Combinatorics/SimpleGraph/Girth.lean

Proof steps:
state_before: α : Type u_1
G : SimpleGraph α
⊢ 3 ≤ G.egirth
state_after: case pos
α : Type u_1
G : SimpleGraph α
h : G.IsAcyclic
⊢ 3 ≤ G.egirth

case neg
α : Type u_1
G : SimpleGraph α
h : ¬G.IsAcyclic
⊢ 3 ≤ G.egirth
tactic: by_cases h : G.IsAcyclic
Theorem: Real.continuous_negMulLog
File: Mathlib/Analysis/SpecialFunctions/Log/NegMulLog.lean

Proof steps:
state_before: ⊢ Continuous negMulLog
state_after: no goals
tactic: simpa only [negMulLog_eq_neg] using continuous_mul_log.neg
Theorem: PSet.toSet_sUnion
File: Mathlib/SetTheory/ZFC/Basic.lean

Proof steps:
state_before: x : PSet
⊢ (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet)
state_after: case h
x x✝ : PSet
⊢ x✝ ∈ (⋃₀ x).toSet ↔ x✝ ∈ ⋃₀ (toSet '' x.toSet)
tactic: ext
state_before: case h
x x✝ : PSet
⊢ x✝ ∈ (⋃₀ x).toSet ↔ x✝ ∈ ⋃₀ (toSet '' x.toSet)
state_after: no goals
tactic: simp
Theorem: StarSubalgebra.sInf_toSubalgebra
File: Mathlib/Algebra/Star/Subalgebra.lean

Proof steps:
state_before: F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring R
inst✝⁸ : StarRing R
inst✝⁷ : Semiring A
inst✝⁶ : Algebra R A
inst✝⁵ : StarRing A
inst✝⁴ : StarModule R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : StarModule R B
S : Set (StarSubalgebra R A)
⊢ ↑(sInf S).toSubalgebra = ↑(sInf (toSubalgebra '' S))
state_after: no goals
tactic: simp
Theorem: inv_lt_one_iff
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 : ℤ
⊢ a⁻¹ < 1 ↔ a ≤ 0 ∨ 1 < a
state_after: case inl
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : a ≤ 0
⊢ a⁻¹ < 1 ↔ a ≤ 0 ∨ 1 < a

case inr
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 < a
⊢ a⁻¹ < 1 ↔ a ≤ 0 ∨ 1 < a
tactic: rcases le_or_lt a 0 with ha | ha
Theorem: Set.disjoint_univ_pi
File: Mathlib/Data/Set/Prod.lean

Proof steps:
state_before: ι : Type u_1
α : ι → Type u_2
β : ι → Type u_3
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
i : ι
⊢ Disjoint (univ.pi t₁) (univ.pi t₂) ↔ ∃ i, Disjoint (t₁ i) (t₂ i)
state_after: no goals
tactic: simp only [disjoint_iff_inter_eq_empty, ← pi_inter_distrib, univ_pi_eq_empty_iff]
Theorem: Nat.descFactorial_eq_factorial_mul_choose
File: Mathlib/Data/Nat/Choose/Basic.lean

Proof steps:
state_before: n k : ℕ
⊢ n.descFactorial k = k ! * n.choose k
state_after: case inl
n k : ℕ
h : n < k
⊢ n.descFactorial k = k ! * n.choose k

case inr
n k : ℕ
h : n ≥ k
⊢ n.descFactorial k = k ! * n.choose k
tactic: obtain h | h := Nat.lt_or_ge n k
state_before: case inr
n k : ℕ
h : n ≥ k
⊢ n.descFactorial k = k ! * n.choose k
state_after: case inr
n k : ℕ
h : n ≥ k
⊢ n.descFactorial k = n.choose k * k !
tactic: rw [Nat.mul_comm]
state_before: case inr
n k : ℕ
h : n ≥ k
⊢ n.descFactorial k = n.choose k * k !
state_after: case inr
n k : ℕ
h : n ≥ k
⊢ n.descFactorial k * (n - k)! = n.choose k * k ! * (n - k)!
tactic: apply Nat.mul_right_cancel (n - k).factorial_pos
state_before: case inr
n k : ℕ
h : n ≥ k
⊢ n.descFactorial k * (n - k)! = n.choose k * k ! * (n - k)!
state_after: no goals
tactic: rw [choose_mul_factorial_mul_factorial h, ← factorial_mul_descFactorial h, Nat.mul_comm]
Theorem: LinearMap.le_ker_iff_map
File: Mathlib/Algebra/Module/Submodule/Ker.lean

Proof steps:
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
K : Type u_5
M : Type u_6
M₁ : Type u_7
M₂ : Type u_8
M₃ : Type u_9
V : Type u_10
V₂ : Type u_11
inst✝¹³ : Semiring R
inst✝¹² : Semiring R₂
inst✝¹¹ : Semiring R₃
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : AddCommMonoid M₂
inst✝⁸ : AddCommMonoid M₃
σ₁₂ : R →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
inst✝⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝⁶ : Module R M
inst✝⁵ : Module R₂ M₂
inst✝⁴ : Module R₃ M₃
σ₂₁ : R₂ →+* R
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝³ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
F : Type u_12
inst✝² : FunLike F M M₂
inst✝¹ : SemilinearMapClass F τ₁₂ M M₂
inst✝ : RingHomSurjective τ₁₂
f : F
p : Submodule R M
⊢ p ≤ ker f ↔ map f p = ⊥
state_after: no goals
tactic: rw [ker, eq_bot_iff, map_le_iff_le_comap]
Theorem: Polynomial.separable_X_sub_C
File: Mathlib/FieldTheory/Separable.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
x : R
⊢ (X - C x).Separable
state_after: no goals
tactic: simpa only [sub_eq_add_neg, C_neg] using separable_X_add_C (-x)
Theorem: CategoryTheory.Arrow.inv_hom_id_left
File: Mathlib/CategoryTheory/Comma/Arrow.lean

Proof steps:
state_before: T : Type u
inst✝ : Category.{v, u} T
f g : Arrow T
sq : f ⟶ g
e : f ≅ g
⊢ e.inv.left ≫ e.hom.left = 𝟙 g.left
state_after: no goals
tactic: rw [← comp_left, e.inv_hom_id, id_left]
Theorem: isClosed_setOf_lipschitzWith
File: Mathlib/Topology/Instances/ENNReal.lean

Proof steps:
state_before: α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
inst✝² : PseudoEMetricSpace α✝
α : Type u_4
β : Type u_5
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
K : ℝ≥0
⊢ IsClosed {f | LipschitzWith K f}
state_after: no goals
tactic: simp only [← lipschitzOnWith_univ, isClosed_setOf_lipschitzOnWith]
Theorem: Ideal.sup_mul_eq_of_coprime_left
File: Mathlib/RingTheory/Ideal/Operations.lean

Proof steps:
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
h : I ⊔ J = ⊤
i : R
hi : i ∈ I ⊔ K
⊢ i ∈ I ⊔ J * K
state_after: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
h : 1 ∈ I ⊔ J
i : R
hi : i ∈ I ⊔ K
⊢ i ∈ I ⊔ J * K
tactic: rw [eq_top_iff_one] at h
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
h : 1 ∈ I ⊔ J
i : R
hi : i ∈ I ⊔ K
⊢ i ∈ I ⊔ J * K
state_after: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
h : ∃ y ∈ I, ∃ z ∈ J, y + z = 1
i : R
hi : ∃ y ∈ I, ∃ z ∈ K, y + z = i
⊢ ∃ y ∈ I, ∃ z ∈ J * K, y + z = i
tactic: rw [Submodule.mem_sup] at h hi ⊢
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
h : ∃ y ∈ I, ∃ z ∈ J, y + z = 1
i : R
hi : ∃ y ∈ I, ∃ z ∈ K, y + z = i
⊢ ∃ y ∈ I, ∃ z ∈ J * K, y + z = i
state_after: case intro.intro.intro.intro
R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
i : R
hi : ∃ y ∈ I, ∃ z ∈ K, y + z = i
i1 : R
hi1 : i1 ∈ I
j : R
hj : j ∈ J
h : i1 + j = 1
⊢ ∃ y ∈ I, ∃ z ∈ J * K, y + z = i
tactic: obtain ⟨i1, hi1, j, hj, h⟩ := h
state_before: case intro.intro.intro.intro
R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
i : R
hi : ∃ y ∈ I, ∃ z ∈ K, y + z = i
i1 : R
hi1 : i1 ∈ I
j : R
hj : j ∈ J
h : i1 + j = 1
⊢ ∃ y ∈ I, ∃ z ∈ J * K, y + z = i
state_after: case intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
i i1 : R
hi1 : i1 ∈ I
j : R
hj : j ∈ J
h : i1 + j = 1
i' : R
hi' : i' ∈ I
k : R
hk : k ∈ K
hi : i' + k = i
⊢ ∃ y ∈ I, ∃ z ∈ J * K, y + z = i
tactic: obtain ⟨i', hi', k, hk, hi⟩ := hi
state_before: case intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
i i1 : R
hi1 : i1 ∈ I
j : R
hj : j ∈ J
h : i1 + j = 1
i' : R
hi' : i' ∈ I
k : R
hk : k ∈ K
hi : i' + k = i
⊢ ∃ y ∈ I, ∃ z ∈ J * K, y + z = i
state_after: case intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
i i1 : R
hi1 : i1 ∈ I
j : R
hj : j ∈ J
h : i1 + j = 1
i' : R
hi' : i' ∈ I
k : R
hk : k ∈ K
hi : i' + k = i
⊢ i' + i1 * k + j * k = i
tactic: refine ⟨_, add_mem hi' (mul_mem_right k _ hi1), _, mul_mem_mul hj hk, ?_⟩
state_before: case intro.intro.intro.intro.intro.intro.intro.intro
R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
i i1 : R
hi1 : i1 ∈ I
j : R
hj : j ∈ J
h : i1 + j = 1
i' : R
hi' : i' ∈ I
k : R
hk : k ∈ K
hi : i' + k = i
⊢ i' + i1 * k + j * k = i
state_after: no goals
tactic: rw [add_assoc, ← add_mul, h, one_mul, hi]
Theorem: Finset.card_union_add_card_inter
File: Mathlib/Data/Finset/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s✝ t✝ u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
s t : Finset α
⊢ (s ∪ ∅).card + (s ∩ ∅).card = s.card + ∅.card
state_after: no goals
tactic: simp
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s✝ t✝ u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
s t : Finset α
a : α
r : Finset α
har : a ∉ r
h : (s ∪ r).card + (s ∩ r).card = s.card + r.card
⊢ (s ∪ insert a r).card + (s ∩ insert a r).card = s.card + (insert a r).card
state_after: no goals
tactic: by_cases a ∈ s <;>
    simp [*, ← add_assoc, add_right_comm _ 1]
Theorem: AddSubgroup.coe_eq_singleton
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H✝ K H : Subgroup G
x✝ : ∃ g, ↑H = {g}
g : G
hg : ↑H = {g}
⊢ Subsingleton ↑↑H
state_after: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H✝ K H : Subgroup G
x✝ : ∃ g, ↑H = {g}
g : G
hg : ↑H = {g}
⊢ Subsingleton ↑{g}
tactic: rw [hg]
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H✝ K H : Subgroup G
x✝ : ∃ g, ↑H = {g}
g : G
hg : ↑H = {g}
⊢ Subsingleton ↑{g}
state_after: no goals
tactic: infer_instance
Theorem: Stream'.zip_inits_tails
File: Mathlib/Data/Stream/Init.lean

Proof steps:
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ zip appendStream' s.inits s.tails = const s
state_after: case a
α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ ∀ (n : ℕ), (zip appendStream' s.inits s.tails).get n = (const s).get n
tactic: apply Stream'.ext
state_before: case a
α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ ∀ (n : ℕ), (zip appendStream' s.inits s.tails).get n = (const s).get n
state_after: case a
α : Type u
β : Type v
δ : Type w
s : Stream' α
n : ℕ
⊢ (zip appendStream' s.inits s.tails).get n = (const s).get n
tactic: intro n
state_before: case a
α : Type u
β : Type v
δ : Type w
s : Stream' α
n : ℕ
⊢ (zip appendStream' s.inits s.tails).get n = (const s).get n
state_after: no goals
tactic: rw [get_zip, get_inits, get_tails, get_const, take_succ, cons_append_stream, append_take_drop,
    Stream'.eta]
Theorem: Matrix.frobenius_nnnorm_map_eq
File: Mathlib/Analysis/Matrix.lean

Proof steps:
state_before: R : Type u_1
l : Type u_2
m : Type u_3
n : Type u_4
α : Type u_5
β : Type u_6
ι : Type u_7
inst✝⁵ : Fintype l
inst✝⁴ : Fintype m
inst✝³ : Fintype n
inst✝² : Unique ι
inst✝¹ : SeminormedAddCommGroup α
inst✝ : SeminormedAddCommGroup β
A : Matrix m n α
f : α → β
hf : ∀ (a : α), ‖f a‖₊ = ‖a‖₊
⊢ ‖A.map f‖₊ = ‖A‖₊
state_after: no goals
tactic: simp_rw [frobenius_nnnorm_def, Matrix.map_apply, hf]
Theorem: CategoryTheory.CostructuredArrow.IsUniversal.existsUnique
File: Mathlib/CategoryTheory/Comma/StructuredArrow.lean

Proof steps:
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
T T' T'' : D
Y Y' Y'' : C
S S' : C ⥤ D
A : Type u₃
inst✝¹ : Category.{v₃, u₃} A
B : Type u₄
inst✝ : Category.{v₄, u₄} B
f✝ g✝ : CostructuredArrow S T
h : f✝.IsUniversal
g : CostructuredArrow S T
f : g.left ⟶ f✝.left
w : (fun η => S.map η ≫ f✝.hom = g.hom) f
⊢ S.map f ≫ f✝.hom = S.map (h.lift g) ≫ f✝.hom
state_after: no goals
tactic: simp [w]
Theorem: Equiv.symm_trans_swap_trans
File: Mathlib/Logic/Equiv/Basic.lean

Proof steps:
state_before: α : Sort u_2
inst✝¹ : DecidableEq α
β : Sort u_1
inst✝ : DecidableEq β
a b : α
e : α ≃ β
x : β
⊢ ((e.symm.trans (swap a b)).trans e) x = (swap (e a) (e b)) x
state_after: α : Sort u_2
inst✝¹ : DecidableEq α
β : Sort u_1
inst✝ : DecidableEq β
a b : α
e : α ≃ β
x : β
this : ∀ (a : α), e.symm x = a ↔ x = e a
⊢ ((e.symm.trans (swap a b)).trans e) x = (swap (e a) (e b)) x
tactic: have : ∀ a, e.symm x = a ↔ x = e a := fun a => by
      rw [@eq_comm _ (e.symm x)]
      constructor <;> intros <;> simp_all
state_before: α : Sort u_2
inst✝¹ : DecidableEq α
β : Sort u_1
inst✝ : DecidableEq β
a b : α
e : α ≃ β
x : β
this : ∀ (a : α), e.symm x = a ↔ x = e a
⊢ ((e.symm.trans (swap a b)).trans e) x = (swap (e a) (e b)) x
state_after: α : Sort u_2
inst✝¹ : DecidableEq α
β : Sort u_1
inst✝ : DecidableEq β
a b : α
e : α ≃ β
x : β
this : ∀ (a : α), e.symm x = a ↔ x = e a
⊢ e (if x = e a then b else if x = e b then a else e.symm x) = if x = e a then e b else if x = e b then e a else x
tactic: simp only [trans_apply, swap_apply_def, this]
state_before: α : Sort u_2
inst✝¹ : DecidableEq α
β : Sort u_1
inst✝ : DecidableEq β
a b : α
e : α ≃ β
x : β
this : ∀ (a : α), e.symm x = a ↔ x = e a
⊢ e (if x = e a then b else if x = e b then a else e.symm x) = if x = e a then e b else if x = e b then e a else x
state_after: no goals
tactic: split_ifs <;> simp
Theorem: inv_zpow
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✝ : DivisionMonoid α
a✝ b c d a : α
n : ℕ
⊢ a⁻¹ ^ ↑n = (a ^ ↑n)⁻¹
state_after: no goals
tactic: rw [zpow_natCast, zpow_natCast, inv_pow]
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : DivisionMonoid α
a✝ b c d a : α
n : ℕ
⊢ a⁻¹ ^ Int.negSucc n = (a ^ Int.negSucc n)⁻¹
state_after: no goals
tactic: rw [zpow_negSucc, zpow_negSucc, inv_pow]
Theorem: Set.ordT5Nhd_mem_nhdsSet
File: Mathlib/Topology/Order/T5.lean

Proof steps:
state_before: X : Type u_1
inst✝² : LinearOrder X
inst✝¹ : TopologicalSpace X
inst✝ : OrderTopology X
a b c : X
s t : Set X
hd : Disjoint s (closure t)
x : X
hx : x ∈ s
⊢ tᶜ ∈ 𝓝 x
state_after: X : Type u_1
inst✝² : LinearOrder X
inst✝¹ : TopologicalSpace X
inst✝ : OrderTopology X
a b c : X
s t : Set X
hd : Disjoint s (closure t)
x : X
hx : x ∈ s
⊢ x ∈ (closure t)ᶜ
tactic: rw [← mem_interior_iff_mem_nhds, interior_compl]
state_before: X : Type u_1
inst✝² : LinearOrder X
inst✝¹ : TopologicalSpace X
inst✝ : OrderTopology X
a b c : X
s t : Set X
hd : Disjoint s (closure t)
x : X
hx : x ∈ s
⊢ x ∈ (closure t)ᶜ
state_after: no goals
tactic: exact disjoint_left.1 hd hx
Theorem: CategoryTheory.Coreflective.comparison_full
File: Mathlib/CategoryTheory/Monad/Adjunction.lean

Proof steps:
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
L✝ : C ⥤ D
R : D ⥤ C
inst✝ : R.Full
L : C ⥤ D
adj : R ⊣ L
X✝ Y✝ : D
f : (Comonad.comparison adj).obj X✝ ⟶ (Comonad.comparison adj).obj Y✝
⊢ (Comonad.comparison adj).map (R.preimage f.f) = f
state_after: no goals
tactic: aesop_cat
Theorem: Fin.card_filter_univ_succ
File: Mathlib/Data/Fintype/Fin.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
n : ℕ
p : Fin (n + 1) → Prop
inst✝ : DecidablePred p
⊢ (if p 0 then 1 else 0) + (filter (p ∘ succ) univ).card =
    if p 0 then (filter (p ∘ succ) univ).card + 1 else (filter (p ∘ succ) univ).card
state_after: no goals
tactic: split_ifs <;> simp [add_comm 1]
Theorem: ContinuousLinearMap.IsPositive.conj_adjoint
File: Mathlib/Analysis/InnerProductSpace/Positive.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁶ : RCLike 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : InnerProductSpace 𝕜 F
inst✝¹ : CompleteSpace E
inst✝ : CompleteSpace F
T : E →L[𝕜] E
hT : T.IsPositive
S : E →L[𝕜] F
⊢ (S.comp (T.comp (adjoint S))).IsPositive
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁶ : RCLike 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : InnerProductSpace 𝕜 F
inst✝¹ : CompleteSpace E
inst✝ : CompleteSpace F
T : E →L[𝕜] E
hT : T.IsPositive
S : E →L[𝕜] F
x : F
⊢ 0 ≤ (S.comp (T.comp (adjoint S))).reApplyInnerSelf x
tactic: refine ⟨hT.isSelfAdjoint.conj_adjoint S, fun x => ?_⟩
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁶ : RCLike 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : InnerProductSpace 𝕜 F
inst✝¹ : CompleteSpace E
inst✝ : CompleteSpace F
T : E →L[𝕜] E
hT : T.IsPositive
S : E →L[𝕜] F
x : F
⊢ 0 ≤ (S.comp (T.comp (adjoint S))).reApplyInnerSelf x
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁶ : RCLike 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : InnerProductSpace 𝕜 F
inst✝¹ : CompleteSpace E
inst✝ : CompleteSpace F
T : E →L[𝕜] E
hT : T.IsPositive
S : E →L[𝕜] F
x : F
⊢ 0 ≤ re ⟪(T.comp (adjoint S)) x, (adjoint S) x⟫_𝕜
tactic: rw [reApplyInnerSelf, comp_apply, ← adjoint_inner_right]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁶ : RCLike 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : InnerProductSpace 𝕜 F
inst✝¹ : CompleteSpace E
inst✝ : CompleteSpace F
T : E →L[𝕜] E
hT : T.IsPositive
S : E →L[𝕜] F
x : F
⊢ 0 ≤ re ⟪(T.comp (adjoint S)) x, (adjoint S) x⟫_𝕜
state_after: no goals
tactic: exact hT.inner_nonneg_left _
Theorem: QuotientMap.secondCountableTopology
File: Mathlib/Topology/Bases.lean

Proof steps:
state_before: α : Type u
t : TopologicalSpace α
X : Type u_1
inst✝² : TopologicalSpace X
Y : Type u_2
inst✝¹ : TopologicalSpace Y
π : X → Y
inst✝ : SecondCountableTopology X
h' : QuotientMap π
h : IsOpenMap π
⊢ ∃ b, b.Countable ∧ inst✝¹ = generateFrom b
state_after: case intro.intro.intro
α : Type u
t : TopologicalSpace α
X : Type u_1
inst✝² : TopologicalSpace X
Y : Type u_2
inst✝¹ : TopologicalSpace Y
π : X → Y
inst✝ : SecondCountableTopology X
h' : QuotientMap π
h : IsOpenMap π
V : Set (Set X)
V_countable : V.Countable
V_generates : IsTopologicalBasis V
⊢ ∃ b, b.Countable ∧ inst✝¹ = generateFrom b
tactic: obtain ⟨V, V_countable, -, V_generates⟩ := exists_countable_basis X
state_before: case intro.intro.intro
α : Type u
t : TopologicalSpace α
X : Type u_1
inst✝² : TopologicalSpace X
Y : Type u_2
inst✝¹ : TopologicalSpace Y
π : X → Y
inst✝ : SecondCountableTopology X
h' : QuotientMap π
h : IsOpenMap π
V : Set (Set X)
V_countable : V.Countable
V_generates : IsTopologicalBasis V
⊢ ∃ b, b.Countable ∧ inst✝¹ = generateFrom b
state_after: no goals
tactic: exact ⟨Set.image π '' V, V_countable.image (Set.image π),
      (V_generates.quotientMap h' h).eq_generateFrom⟩
Theorem: IntermediateField.sInf_toSubalgebra
File: Mathlib/FieldTheory/Adjoin.lean

Proof steps:
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set (IntermediateField F E)
⊢ ↑(sInf S).toSubalgebra = ↑(sInf (toSubalgebra '' S))
state_after: no goals
tactic: simp [Set.sUnion_image]