ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Matrix.kronecker_natCast
File: Mathlib/Data/Matrix/Kronecker.lean

Proof steps:
state_before: R : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
l : Type u_8
m : Type u_9
n : Type u_10
p : Type u_11
q : Type u_12
r : Type u_13
l' : Type u_14
m' : Type u_15
n' : Type u_16
p' : Type u_17
inst✝¹ : NonAssocSemiring α
inst✝ : DecidableEq n
A : Matrix l m α
b : ℕ
⊢ (blockDiagonal fun i => A <• ↑b) = blockDiagonal fun x => b •> A
state_after: case h.e'_7.h
R : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
l : Type u_8
m : Type u_9
n : Type u_10
p : Type u_11
q : Type u_12
r : Type u_13
l' : Type u_14
m' : Type u_15
n' : Type u_16
p' : Type u_17
inst✝¹ : NonAssocSemiring α
inst✝ : DecidableEq n
A : Matrix l m α
b : ℕ
x✝ : n
⊢ A <• ↑b = b •> A
tactic: congr! 2
state_before: case h.e'_7.h
R : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
l : Type u_8
m : Type u_9
n : Type u_10
p : Type u_11
q : Type u_12
r : Type u_13
l' : Type u_14
m' : Type u_15
n' : Type u_16
p' : Type u_17
inst✝¹ : NonAssocSemiring α
inst✝ : DecidableEq n
A : Matrix l m α
b : ℕ
x✝ : n
⊢ A <• ↑b = b •> A
state_after: case h.e'_7.h.a
R : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
l : Type u_8
m : Type u_9
n : Type u_10
p : Type u_11
q : Type u_12
r : Type u_13
l' : Type u_14
m' : Type u_15
n' : Type u_16
p' : Type u_17
inst✝¹ : NonAssocSemiring α
inst✝ : DecidableEq n
A : Matrix l m α
b : ℕ
x✝ : n
i✝ : l
j✝ : m
⊢ (MulOpposite.op ↑b • A) i✝ j✝ = (b • A) i✝ j✝
tactic: ext
state_before: case h.e'_7.h.a
R : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
l : Type u_8
m : Type u_9
n : Type u_10
p : Type u_11
q : Type u_12
r : Type u_13
l' : Type u_14
m' : Type u_15
n' : Type u_16
p' : Type u_17
inst✝¹ : NonAssocSemiring α
inst✝ : DecidableEq n
A : Matrix l m α
b : ℕ
x✝ : n
i✝ : l
j✝ : m
⊢ (MulOpposite.op ↑b • A) i✝ j✝ = (b • A) i✝ j✝
state_after: no goals
tactic: simp [(Nat.cast_commute b _).eq]
Theorem: List.mk_mem_sym2_iff
File: Mathlib/Data/List/Sym.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
xs : List α
a b : α
⊢ s(a, b) ∈ xs.sym2 ↔ a ∈ xs ∧ b ∈ xs
state_after: case mp
α : Type u_1
β : Type u_2
xs : List α
a b : α
⊢ s(a, b) ∈ xs.sym2 → a ∈ xs ∧ b ∈ xs

case mpr
α : Type u_1
β : Type u_2
xs : List α
a b : α
⊢ a ∈ xs ∧ b ∈ xs → s(a, b) ∈ xs.sym2
tactic: constructor
Theorem: CategoryTheory.Iso.conjAut_apply
File: Mathlib/CategoryTheory/Conj.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : C
α : X ≅ Y
f : Aut X
⊢ α.conjAut f = α.symm ≪≫ f ≪≫ α
state_after: no goals
tactic: aesop_cat
Theorem: ZMod.val_add_of_le
File: Mathlib/Data/ZMod/Basic.lean

Proof steps:
state_before: m n✝ n : ℕ
inst✝ : NeZero n
a b : ZMod n
h : n ≤ a.val + b.val
⊢ (a + b).val = a.val + b.val - n
state_after: m n✝ n : ℕ
inst✝ : NeZero n
a b : ZMod n
h : n ≤ a.val + b.val
⊢ (a + b).val = (a + b).val + n - n
tactic: rw [val_add_val_of_le h]
state_before: m n✝ n : ℕ
inst✝ : NeZero n
a b : ZMod n
h : n ≤ a.val + b.val
⊢ (a + b).val = (a + b).val + n - n
state_after: no goals
tactic: exact eq_tsub_of_add_eq rfl
Theorem: Mon_.Mon_tensor_mul_one
File: Mathlib/CategoryTheory/Monoidal/Mon_.lean

Proof steps:
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (M.X ⊗ N.X) ◁ ((λ_ (𝟙_ C)).inv ≫ (M.one ⊗ N.one)) ≫ tensor_μ C (M.X, N.X) (M.X, N.X) ≫ (M.mul ⊗ N.mul) =
    (ρ_ (M.X ⊗ N.X)).hom
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (M.X ⊗ N.X) ◁ (λ_ (𝟙_ C)).inv ≫ (M.X ⊗ N.X) ◁ (M.one ⊗ N.one) ≫ tensor_μ C (M.X, N.X) (M.X, N.X) ≫ (M.mul ⊗ N.mul) =
    (ρ_ (M.X ⊗ N.X)).hom
tactic: simp only [MonoidalCategory.whiskerLeft_comp_assoc]
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (M.X ⊗ N.X) ◁ (λ_ (𝟙_ C)).inv ≫ (M.X ⊗ N.X) ◁ (M.one ⊗ N.one) ≫ tensor_μ C (M.X, N.X) (M.X, N.X) ≫ (M.mul ⊗ N.mul) =
    (ρ_ (M.X ⊗ N.X)).hom
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (M.X ⊗ N.X) ◁ (λ_ (𝟙_ C)).inv ≫ (tensor_μ C (M.X, N.X) (𝟙_ C, 𝟙_ C) ≫ (M.X ◁ M.one ⊗ N.X ◁ N.one)) ≫ (M.mul ⊗ N.mul) =
    (ρ_ (M.X ⊗ N.X)).hom
tactic: slice_lhs 2 3 => rw [tensor_μ_natural_right]
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (M.X ⊗ N.X) ◁ (λ_ (𝟙_ C)).inv ≫ (tensor_μ C (M.X, N.X) (𝟙_ C, 𝟙_ C) ≫ (M.X ◁ M.one ⊗ N.X ◁ N.one)) ≫ (M.mul ⊗ N.mul) =
    (ρ_ (M.X ⊗ N.X)).hom
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (M.X ⊗ N.X) ◁ (λ_ (𝟙_ C)).inv ≫ tensor_μ C (M.X, N.X) (𝟙_ C, 𝟙_ C) ≫ ((ρ_ M.X).hom ⊗ (ρ_ N.X).hom) =
    (ρ_ (M.X ⊗ N.X)).hom
tactic: slice_lhs 3 4 => rw [← tensor_comp, mul_one M, mul_one N]
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (M.X ⊗ N.X) ◁ (λ_ (𝟙_ C)).inv ≫ tensor_μ C (M.X, N.X) (𝟙_ C, 𝟙_ C) ≫ ((ρ_ M.X).hom ⊗ (ρ_ N.X).hom) =
    (ρ_ (M.X ⊗ N.X)).hom
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (ρ_ (M.X ⊗ N.X)).hom =
    (M.X ⊗ N.X) ◁ (λ_ (𝟙_ C)).inv ≫ tensor_μ C (M.X, N.X) (𝟙_ C, 𝟙_ C) ≫ ((ρ_ M.X).hom ⊗ (ρ_ N.X).hom)
tactic: symm
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (ρ_ (M.X ⊗ N.X)).hom =
    (M.X ⊗ N.X) ◁ (λ_ (𝟙_ C)).inv ≫ tensor_μ C (M.X, N.X) (𝟙_ C, 𝟙_ C) ≫ ((ρ_ M.X).hom ⊗ (ρ_ N.X).hom)
state_after: no goals
tactic: exact tensor_right_unitality C M.X N.X
Theorem: Finsupp.induction
File: Mathlib/Data/Finsupp/Defs.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
p : (α →₀ M) → Prop
f✝ : α →₀ M
h0 : p 0
ha : ∀ (a : α) (b : M) (f : α →₀ M), a ∉ f.support → b ≠ 0 → p f → p (single a b + f)
s : Finset α
f : α →₀ M
hf : f.support = ∅
⊢ p f
state_after: no goals
tactic: rwa [support_eq_empty.1 hf]
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
p : (α →₀ M) → Prop
f✝ : α →₀ M
h0 : p 0
ha : ∀ (a : α) (b : M) (f : α →₀ M), a ∉ f.support → b ≠ 0 → p f → p (single a b + f)
s✝ : Finset α
a : α
s : Finset α
has : a ∉ s
ih : ∀ (f : α →₀ M), f.support = s → p f
f : α →₀ M
hf : f.support = cons a s has
⊢ p 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
p : (α →₀ M) → Prop
f✝ : α →₀ M
h0 : p 0
ha : ∀ (a : α) (b : M) (f : α →₀ M), a ∉ f.support → b ≠ 0 → p f → p (single a b + f)
s✝ : Finset α
a : α
s : Finset α
has : a ∉ s
ih : ∀ (f : α →₀ M), f.support = s → p f
f : α →₀ M
hf : f.support = cons a s has
⊢ p (single a (f a) + erase a f)
tactic: suffices p (single a (f a) + f.erase a) by rwa [single_add_erase] at this
Theorem: Filter.Subsingleton.isCountablyGenerated
File: Mathlib/Order/Filter/Subsingleton.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
l : Filter α
hl : l.Subsingleton
⊢ l.IsCountablyGenerated
state_after: case inl
α : Type u_1
β : Type u_2
hl : ⊥.Subsingleton
⊢ ⊥.IsCountablyGenerated

case inr.intro
α : Type u_1
β : Type u_2
x : α
hl : (pure x).Subsingleton
⊢ (pure x).IsCountablyGenerated
tactic: rcases subsingleton_iff_bot_or_pure.1 hl with rfl|⟨x, rfl⟩
Theorem: IsRelPrime.mul_dvd_of_right_isPrimal
File: Mathlib/Algebra/Divisibility/Units.lean

Proof steps:
state_before: α : Type u_1
inst✝ : CommMonoid α
x y z : α
H : IsRelPrime x y
H1 : x ∣ z
H2 : y ∣ z
hy : IsPrimal y
⊢ x * y ∣ z
state_after: case intro
α : Type u_1
inst✝ : CommMonoid α
x y : α
H : IsRelPrime x y
hy : IsPrimal y
w : α
H2 : y ∣ x * w
⊢ x * y ∣ x * w
tactic: obtain ⟨w, rfl⟩ := H1
state_before: case intro
α : Type u_1
inst✝ : CommMonoid α
x y : α
H : IsRelPrime x y
hy : IsPrimal y
w : α
H2 : y ∣ x * w
⊢ x * y ∣ x * w
state_after: no goals
tactic: exact mul_dvd_mul_left x (H.symm.dvd_of_dvd_mul_left_of_isPrimal H2 hy)
Theorem: StructureGroupoid.LocalInvariantProp.liftPropAt_symm_of_mem_maximalAtlas
File: Mathlib/Geometry/Manifold/LocalInvariantProperties.lean

Proof steps:
state_before: H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁷ : TopologicalSpace H
inst✝⁶ : TopologicalSpace M
inst✝⁵ : ChartedSpace H M
inst✝⁴ : TopologicalSpace H'
inst✝³ : TopologicalSpace M'
inst✝² : ChartedSpace H' M'
inst✝¹ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g g' : M → M'
s t : Set M
x✝ : M
Q : (H → H) → Set H → H → Prop
hG✝ : G.LocalInvariantProp G' P
inst✝ : HasGroupoid M G
x : H
hG : G.LocalInvariantProp G Q
hQ : ∀ (y : H), Q id univ y
he : e ∈ maximalAtlas M G
hx : x ∈ e.target
⊢ LiftPropAt Q (↑e.symm) x
state_after: H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁷ : TopologicalSpace H
inst✝⁶ : TopologicalSpace M
inst✝⁵ : ChartedSpace H M
inst✝⁴ : TopologicalSpace H'
inst✝³ : TopologicalSpace M'
inst✝² : ChartedSpace H' M'
inst✝¹ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g g' : M → M'
s t : Set M
x✝ : M
Q : (H → H) → Set H → H → Prop
hG✝ : G.LocalInvariantProp G' P
inst✝ : HasGroupoid M G
x : H
hG : G.LocalInvariantProp G Q
hQ : ∀ (y : H), Q id univ y
he : e ∈ maximalAtlas M G
hx : x ∈ e.target
⊢ Q (↑e ∘ ↑e.symm) univ x
tactic: suffices h : Q (e ∘ e.symm) univ x by
    have : e.symm x ∈ e.source := by simp only [hx, mfld_simps]
    rw [LiftPropAt, hG.liftPropWithinAt_indep_chart G.id_mem_maximalAtlas (mem_univ _) he this]
    refine ⟨(e.symm.continuousAt hx).continuousWithinAt, ?_⟩
    simp only [h, mfld_simps]
state_before: H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁷ : TopologicalSpace H
inst✝⁶ : TopologicalSpace M
inst✝⁵ : ChartedSpace H M
inst✝⁴ : TopologicalSpace H'
inst✝³ : TopologicalSpace M'
inst✝² : ChartedSpace H' M'
inst✝¹ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g g' : M → M'
s t : Set M
x✝ : M
Q : (H → H) → Set H → H → Prop
hG✝ : G.LocalInvariantProp G' P
inst✝ : HasGroupoid M G
x : H
hG : G.LocalInvariantProp G Q
hQ : ∀ (y : H), Q id univ y
he : e ∈ maximalAtlas M G
hx : x ∈ e.target
⊢ Q (↑e ∘ ↑e.symm) univ x
state_after: no goals
tactic: exact hG.congr' (e.eventually_right_inverse hx) (hQ x)
Theorem: SimpleGraph.adjMatrix_mulVec_apply
File: Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean

Proof steps:
state_before: V : Type u_1
α : Type u_2
β : Type u_3
G : SimpleGraph V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype V
inst✝ : NonAssocSemiring α
v : V
vec : V → α
⊢ (adjMatrix α G *ᵥ vec) v = ∑ u ∈ G.neighborFinset v, vec u
state_after: no goals
tactic: rw [mulVec, adjMatrix_dotProduct]
Theorem: List.mem_dlookup
File: Mathlib/Data/List/Sigma.lean

Proof steps:
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
l : List (Sigma β)
nd : l.NodupKeys
h : ⟨a, b⟩ ∈ l
⊢ b ∈ dlookup a l
state_after: case intro
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
l : List (Sigma β)
nd : l.NodupKeys
h : ⟨a, b⟩ ∈ l
b' : β ⟨a, b⟩.fst
h' : dlookup ⟨a, b⟩.fst l = some b'
⊢ b ∈ dlookup a l
tactic: cases' Option.isSome_iff_exists.mp (dlookup_isSome.mpr (mem_keys_of_mem h)) with b' h'
state_before: case intro
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
l : List (Sigma β)
nd : l.NodupKeys
h : ⟨a, b⟩ ∈ l
b' : β ⟨a, b⟩.fst
h' : dlookup ⟨a, b⟩.fst l = some b'
⊢ b ∈ dlookup a l
state_after: case intro.refl
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
l : List (Sigma β)
nd : l.NodupKeys
h : ⟨a, b⟩ ∈ l
h' : dlookup ⟨a, b⟩.fst l = some b
⊢ b ∈ dlookup a l
tactic: cases nd.eq_of_mk_mem h (of_mem_dlookup h')
state_before: case intro.refl
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
l : List (Sigma β)
nd : l.NodupKeys
h : ⟨a, b⟩ ∈ l
h' : dlookup ⟨a, b⟩.fst l = some b
⊢ b ∈ dlookup a l
state_after: no goals
tactic: exact h'
Theorem: Turing.PartrecToTM2.head_stack_ok
File: Mathlib/Computability/TMToPartrec.lean

Proof steps:
state_before: q : Λ'
s : Option Γ'
L₁ L₂ : List ℕ
L₃ : List Γ'
⊢ Reaches₁ (TM2.step tr)
    { l := some (head stack q), var := s, stk := elim (trList L₁) [] [] (trList L₂ ++ Γ'.consₗ :: L₃) }
    { l := some q, var := none, stk := elim (trList (L₂.headI :: L₁)) [] [] L₃ }
state_after: case nil
q : Λ'
s : Option Γ'
L₁ : List ℕ
L₃ : List Γ'
⊢ Reaches₁ (TM2.step tr)
    { l := some (head stack q), var := s, stk := elim (trList L₁) [] [] (trList [] ++ Γ'.consₗ :: L₃) }
    { l := some q, var := none, stk := elim (trList ([].headI :: L₁)) [] [] L₃ }

case cons
q : Λ'
s : Option Γ'
L₁ : List ℕ
L₃ : List Γ'
a : ℕ
L₂ : List ℕ
⊢ Reaches₁ (TM2.step tr)
    { l := some (head stack q), var := s, stk := elim (trList L₁) [] [] (trList (a :: L₂) ++ Γ'.consₗ :: L₃) }
    { l := some q, var := none, stk := elim (trList ((a :: L₂).headI :: L₁)) [] [] L₃ }
tactic: cases' L₂ with a L₂
Theorem: WeierstrassCurve.Jacobian.addY_of_X_eq
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P Q : Fin 3 → F
hP : W.Equation P
hQ : W.Equation Q
hPz : P z ≠ 0
hQz : Q z ≠ 0
hx : P x * Q z ^ 2 = Q x * P z ^ 2
⊢ W.addY P Q = addU P Q ^ 3
state_after: no goals
tactic: rw [addU, ← neg_div, div_pow, ← addY_of_X_eq' hP hQ hx,
    mul_div_cancel_right₀ _ <| pow_ne_zero 3 <| mul_ne_zero hPz hQz]
Theorem: riesz_extension
File: Mathlib/Analysis/Convex/Cone/Extension.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : ConvexCone ℝ E
f : E →ₗ.[ℝ] ℝ
nonneg : ∀ (x : ↥f.domain), ↑x ∈ s → 0 ≤ ↑f x
dense : ∀ (y : E), ∃ x, ↑x + y ∈ s
⊢ ∃ g, (∀ (x : ↥f.domain), g ↑x = ↑f x) ∧ ∀ x ∈ s, 0 ≤ g x
state_after: case intro.mk.intro.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : ConvexCone ℝ E
f : E →ₗ.[ℝ] ℝ
nonneg : ∀ (x : ↥f.domain), ↑x ∈ s → 0 ≤ ↑f x
dense : ∀ (y : E), ∃ x, ↑x + y ∈ s
g : ↥⊤ →ₗ[ℝ] ℝ
hfg : ∀ ⦃x : ↥f.domain⦄ ⦃y : ↥{ domain := ⊤, toFun := g }.domain⦄, ↑x = ↑y → ↑f x = ↑{ domain := ⊤, toFun := g } y
hgs : ∀ (x : ↥{ domain := ⊤, toFun := g }.domain), ↑x ∈ s → 0 ≤ ↑{ domain := ⊤, toFun := g } x
⊢ ∃ g, (∀ (x : ↥f.domain), g ↑x = ↑f x) ∧ ∀ x ∈ s, 0 ≤ g x
tactic: rcases RieszExtension.exists_top s f nonneg dense
    with ⟨⟨g_dom, g⟩, ⟨-, hfg⟩, rfl : g_dom = ⊤, hgs⟩
state_before: case intro.mk.intro.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : ConvexCone ℝ E
f : E →ₗ.[ℝ] ℝ
nonneg : ∀ (x : ↥f.domain), ↑x ∈ s → 0 ≤ ↑f x
dense : ∀ (y : E), ∃ x, ↑x + y ∈ s
g : ↥⊤ →ₗ[ℝ] ℝ
hfg : ∀ ⦃x : ↥f.domain⦄ ⦃y : ↥{ domain := ⊤, toFun := g }.domain⦄, ↑x = ↑y → ↑f x = ↑{ domain := ⊤, toFun := g } y
hgs : ∀ (x : ↥{ domain := ⊤, toFun := g }.domain), ↑x ∈ s → 0 ≤ ↑{ domain := ⊤, toFun := g } x
⊢ ∃ g, (∀ (x : ↥f.domain), g ↑x = ↑f x) ∧ ∀ x ∈ s, 0 ≤ g x
state_after: case intro.mk.intro.intro.intro.refine_1
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : ConvexCone ℝ E
f : E →ₗ.[ℝ] ℝ
nonneg : ∀ (x : ↥f.domain), ↑x ∈ s → 0 ≤ ↑f x
dense : ∀ (y : E), ∃ x, ↑x + y ∈ s
g : ↥⊤ →ₗ[ℝ] ℝ
hfg : ∀ ⦃x : ↥f.domain⦄ ⦃y : ↥{ domain := ⊤, toFun := g }.domain⦄, ↑x = ↑y → ↑f x = ↑{ domain := ⊤, toFun := g } y
hgs : ∀ (x : ↥{ domain := ⊤, toFun := g }.domain), ↑x ∈ s → 0 ≤ ↑{ domain := ⊤, toFun := g } x
⊢ ∀ (x : ↥f.domain), (g ∘ₗ LinearMap.codRestrict ⊤ LinearMap.id ⋯) ↑x = ↑f x

case intro.mk.intro.intro.intro.refine_2
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s : ConvexCone ℝ E
f : E →ₗ.[ℝ] ℝ
nonneg : ∀ (x : ↥f.domain), ↑x ∈ s → 0 ≤ ↑f x
dense : ∀ (y : E), ∃ x, ↑x + y ∈ s
g : ↥⊤ →ₗ[ℝ] ℝ
hfg : ∀ ⦃x : ↥f.domain⦄ ⦃y : ↥{ domain := ⊤, toFun := g }.domain⦄, ↑x = ↑y → ↑f x = ↑{ domain := ⊤, toFun := g } y
hgs : ∀ (x : ↥{ domain := ⊤, toFun := g }.domain), ↑x ∈ s → 0 ≤ ↑{ domain := ⊤, toFun := g } x
⊢ ∀ x ∈ s, 0 ≤ (g ∘ₗ LinearMap.codRestrict ⊤ LinearMap.id ⋯) x
tactic: refine ⟨g.comp (LinearMap.id.codRestrict ⊤ fun _ ↦ trivial), ?_, ?_⟩
Theorem: LinearMap.span_inl_union_inr
File: Mathlib/LinearAlgebra/Prod.lean

Proof steps:
state_before: R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type u_1
M₆ : Type u_2
inst✝⁸ : Semiring R
inst✝⁷ : AddCommMonoid M
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₃
inst✝⁴ : AddCommMonoid M₄
inst✝³ : Module R M
inst✝² : Module R M₂
inst✝¹ : Module R M₃
inst✝ : Module R M₄
s : Set M
t : Set M₂
⊢ span R (⇑(inl R M M₂) '' s ∪ ⇑(inr R M M₂) '' t) = (span R s).prod (span R t)
state_after: no goals
tactic: rw [span_union, prod_eq_sup_map, ← span_image, ← span_image]
Theorem: Dense.topology_eq_generateFrom
File: Mathlib/Topology/Order/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
s : Set α
hs : Dense s
⊢ inst✝³ = generateFrom (Ioi '' s ∪ Iio '' s)
state_after: α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
s : Set α
hs : Dense s
⊢ generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a} = generateFrom (Ioi '' s ∪ Iio '' s)
tactic: refine (OrderTopology.topology_eq_generate_intervals (α := α)).trans ?_
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
s : Set α
hs : Dense s
⊢ generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a} = generateFrom (Ioi '' s ∪ Iio '' s)
state_after: case refine_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
s : Set α
hs : Dense s
⊢ Ioi '' s ∪ Iio '' s ⊆ {s | ∃ a, s = Ioi a ∨ s = Iio a}

case refine_2
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
s : Set α
hs : Dense s
⊢ ∀ s_1 ∈ {s | ∃ a, s = Ioi a ∨ s = Iio a}, IsOpen s_1
tactic: refine le_antisymm (generateFrom_anti ?_) (le_generateFrom ?_)
Theorem: Matrix.cramer_zero
File: Mathlib/LinearAlgebra/Matrix/Adjugate.lean

Proof steps:
state_before: m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
⊢ cramer 0 = 0
state_after: case h.h.h
m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
i j : n
⊢ (cramer 0 ∘ₗ LinearMap.single i) 1 j = (0 ∘ₗ LinearMap.single i) 1 j
tactic: ext i j
state_before: case h.h.h
m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
i j : n
⊢ (cramer 0 ∘ₗ LinearMap.single i) 1 j = (0 ∘ₗ LinearMap.single i) 1 j
state_after: case h.h.h.intro
m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
i j j' : n
hj' : j' ≠ j
⊢ (cramer 0 ∘ₗ LinearMap.single i) 1 j = (0 ∘ₗ LinearMap.single i) 1 j
tactic: obtain ⟨j', hj'⟩ : ∃ j', j' ≠ j := exists_ne j
state_before: case h.h.h.intro
m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
i j j' : n
hj' : j' ≠ j
⊢ (cramer 0 ∘ₗ LinearMap.single i) 1 j = (0 ∘ₗ LinearMap.single i) 1 j
state_after: case h.h.h.intro
m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
i j j' : n
hj' : j' ≠ j
⊢ ∀ (i_1 : n), updateColumn 0 j ((LinearMap.single i) 1) i_1 j' = 0
tactic: apply det_eq_zero_of_column_eq_zero j'
state_before: case h.h.h.intro
m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
i j j' : n
hj' : j' ≠ j
⊢ ∀ (i_1 : n), updateColumn 0 j ((LinearMap.single i) 1) i_1 j' = 0
state_after: case h.h.h.intro
m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
i j j' : n
hj' : j' ≠ j
j'' : n
⊢ updateColumn 0 j ((LinearMap.single i) 1) j'' j' = 0
tactic: intro j''
state_before: case h.h.h.intro
m : Type u
n : Type v
α : Type w
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
inst✝¹ : CommRing α
A : Matrix n n α
b : n → α
inst✝ : Nontrivial n
i j j' : n
hj' : j' ≠ j
j'' : n
⊢ updateColumn 0 j ((LinearMap.single i) 1) j'' j' = 0
state_after: no goals
tactic: simp [updateColumn_ne hj']
Theorem: List.Perm.length_eq
File: .lake/packages/batteries/Batteries/Data/List/Perm.lean

Proof steps:
state_before: α : Type u_1
l₁ l₂ : List α
p : l₁ ~ l₂
⊢ l₁.length = l₂.length
state_after: no goals
tactic: induction p with
  | nil => rfl
  | cons _ _ ih => simp only [length_cons, ih]
  | swap => rfl
  | trans _ _ ih₁ ih₂ => simp only [ih₁, ih₂]
Theorem: Polynomial.dvd_content_iff_C_dvd
File: Mathlib/RingTheory/Polynomial/Content.lean

Proof steps:
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
r : R
⊢ r ∣ p.content ↔ C r ∣ p
state_after: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
r : R
⊢ r ∣ p.content ↔ ∀ (i : ℕ), r ∣ p.coeff i
tactic: rw [C_dvd_iff_dvd_coeff]
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
r : R
⊢ r ∣ p.content ↔ ∀ (i : ℕ), r ∣ p.coeff i
state_after: case mp
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
r : R
⊢ r ∣ p.content → ∀ (i : ℕ), r ∣ p.coeff i

case mpr
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
r : R
⊢ (∀ (i : ℕ), r ∣ p.coeff i) → r ∣ p.content
tactic: constructor
Theorem: Profinite.pullback_snd_eq
File: Mathlib/Topology/Category/Profinite/Limits.lean

Proof steps:
state_before: X Y B : Profinite
f : X ⟶ B
g : Y ⟶ B
⊢ pullback.snd f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.snd f g
state_after: X Y B : Profinite
f : X ⟶ B
g : Y ⟶ B
⊢ pullback.snd f g =
    ((pullback.isLimit f g).conePointUniqueUpToIso (limit.isLimit (cospan f g))).hom ≫ Limits.pullback.snd f g
tactic: dsimp [pullbackIsoPullback]
state_before: X Y B : Profinite
f : X ⟶ B
g : Y ⟶ B
⊢ pullback.snd f g =
    ((pullback.isLimit f g).conePointUniqueUpToIso (limit.isLimit (cospan f g))).hom ≫ Limits.pullback.snd f g
state_after: no goals
tactic: simp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_π]