ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: RatFunc.toFractionRing_injective
File: Mathlib/FieldTheory/RatFunc/Defs.lean

Proof steps:
state_before: K : Type u
inst✝ : CommRing K
x y : FractionRing K[X]
xy : { toFractionRing := x }.toFractionRing = { toFractionRing := y }.toFractionRing
⊢ { toFractionRing := x } = { toFractionRing := y }
state_after: K : Type u
inst✝ : CommRing K
x : FractionRing K[X]
⊢ { toFractionRing := x } = { toFractionRing := { toFractionRing := x }.toFractionRing }
tactic: subst xy
state_before: K : Type u
inst✝ : CommRing K
x : FractionRing K[X]
⊢ { toFractionRing := x } = { toFractionRing := { toFractionRing := x }.toFractionRing }
state_after: no goals
tactic: rfl
Theorem: Ideal.basisSpanSingleton_apply
File: Mathlib/RingTheory/Ideal/Basis.lean

Proof steps:
state_before: ι : Type u_1
R : Type u_2
S : Type u_3
inst✝³ : CommSemiring R
inst✝² : CommRing S
inst✝¹ : IsDomain S
inst✝ : Algebra R S
b : Basis ι R S
x : S
hx : x ≠ 0
i : ι
⊢ ↑((basisSpanSingleton b hx) i) = x * b i
state_after: no goals
tactic: simp only [basisSpanSingleton, Basis.map_apply, LinearEquiv.trans_apply,
    Submodule.restrictScalarsEquiv_apply, LinearEquiv.ofInjective_apply, LinearEquiv.coe_ofEq_apply,
    LinearEquiv.restrictScalars_apply, Algebra.coe_lmul_eq_mul, LinearMap.mul_apply']
Theorem: Equiv.Perm.disjoint_inv_left_iff
File: Mathlib/GroupTheory/Perm/Support.lean

Proof steps:
state_before: α : Type u_1
f g h : Perm α
⊢ f⁻¹.Disjoint g ↔ f.Disjoint g
state_after: α : Type u_1
f g h✝ : Perm α
h : f⁻¹.Disjoint g
⊢ f.Disjoint g
tactic: refine ⟨fun h => ?_, Disjoint.inv_left⟩
state_before: α : Type u_1
f g h✝ : Perm α
h : f⁻¹.Disjoint g
⊢ f.Disjoint g
state_after: no goals
tactic: convert h.inv_left
Theorem: hasConstantSpeedOnWith_iff_ordered
File: Mathlib/Analysis/ConstantSpeed.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : ℝ → E
s : Set ℝ
l : ℝ≥0
⊢ HasConstantSpeedOnWith f s l ↔
    ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))
state_after: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : ℝ → E
s : Set ℝ
l : ℝ≥0
h : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))
x : ℝ
xs : x ∈ s
y : ℝ
ys : y ∈ s
⊢ eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))
tactic: refine ⟨fun h x xs y ys _ => h xs ys, fun h x xs y ys => ?_⟩
state_before: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : ℝ → E
s : Set ℝ
l : ℝ≥0
h : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))
x : ℝ
xs : x ∈ s
y : ℝ
ys : y ∈ s
⊢ eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))
state_after: case inl
α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : ℝ → E
s : Set ℝ
l : ℝ≥0
h : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))
x : ℝ
xs : x ∈ s
y : ℝ
ys : y ∈ s
xy : x ≤ y
⊢ eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))

case inr
α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : ℝ → E
s : Set ℝ
l : ℝ≥0
h : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))
x : ℝ
xs : x ∈ s
y : ℝ
ys : y ∈ s
yx : y ≤ x
⊢ eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))
tactic: rcases le_total x y with (xy | yx)
Theorem: div_div_div_cancel_right
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

Proof steps:
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a✝ b c d : G₀
m n : ℕ
a : G₀
hc : c ≠ 0
⊢ a / c / (b / c) = a / b
state_after: no goals
tactic: rw [div_div_eq_mul_div, div_mul_cancel₀ _ hc]
Theorem: GenContFract.exists_conts_b_of_den
File: Mathlib/Algebra/ContinuedFractions/Translations.lean

Proof steps:
state_before: K : Type u_1
g : GenContFract K
n : ℕ
inst✝ : DivisionRing K
B : K
nth_denom_eq : g.dens n = B
⊢ ∃ conts, g.conts n = conts ∧ conts.b = B
state_after: no goals
tactic: simpa
Theorem: Finmap.union_assoc
File: Mathlib/Data/Finmap.lean

Proof steps:
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁✝ s₂✝ s₃✝ : Finmap β
s₁ s₂ s₃ : AList β
⊢ ⟦s₁⟧ ∪ ⟦s₂⟧ ∪ ⟦s₃⟧ = ⟦s₁⟧ ∪ (⟦s₂⟧ ∪ ⟦s₃⟧)
state_after: no goals
tactic: simp only [AList.toFinmap_eq, union_toFinmap, AList.union_assoc]
Theorem: AddLECancellable.tsub_inj_right
File: Mathlib/Algebra/Order/Sub/Canonical.lean

Proof steps:
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hab : AddLECancellable (a - b)
h₁ : b ≤ a
h₂ : c ≤ a
h₃ : a - b = a - c
⊢ b = c
state_after: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hab : AddLECancellable (a - b)
h₁ : b ≤ a
h₂ : c ≤ a
h₃ : a - b = a - c
⊢ a - b + b = a - b + c
tactic: rw [← hab.inj]
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hab : AddLECancellable (a - b)
h₁ : b ≤ a
h₂ : c ≤ a
h₃ : a - b = a - c
⊢ a - b + b = a - b + c
state_after: no goals
tactic: rw [tsub_add_cancel_of_le h₁, h₃, tsub_add_cancel_of_le h₂]
Theorem: aemeasurable_of_map_neZero
File: Mathlib/MeasureTheory/Measure/AEMeasurable.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
R : Type u_6
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f✝ g : α → β
μ✝ ν : Measure α
mβ : MeasurableSpace β
μ : Measure α
f : α → β
h : NeZero (Measure.map f μ)
⊢ AEMeasurable f μ
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
R : Type u_6
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f✝ g : α → β
μ✝ ν : Measure α
mβ : MeasurableSpace β
μ : Measure α
f : α → β
h : NeZero (Measure.map f μ)
h' : ¬AEMeasurable f μ
⊢ False
tactic: by_contra h'
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
R : Type u_6
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
f✝ g : α → β
μ✝ ν : Measure α
mβ : MeasurableSpace β
μ : Measure α
f : α → β
h : NeZero (Measure.map f μ)
h' : ¬AEMeasurable f μ
⊢ False
state_after: no goals
tactic: simp [h'] at h
Theorem: Function.Antiperiodic.const_inv_smul
File: Mathlib/Algebra/Periodic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x : α
inst✝³ : AddMonoid α
inst✝² : Neg β
inst✝¹ : Group γ
inst✝ : DistribMulAction γ α
h : Antiperiodic f c
a : γ
⊢ Antiperiodic (fun x => f (a⁻¹ • x)) (a • c)
state_after: no goals
tactic: simpa only [inv_inv] using h.const_smul a⁻¹
Theorem: Finset.powerset_sups_powerset_self
File: Mathlib/Data/Finset/Sups.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t : Finset α
a : α
s : Finset α
⊢ s.powerset ⊻ s.powerset = s.powerset
state_after: no goals
tactic: simp [← powerset_union]
Theorem: MeasureTheory.setLIntegral_lt_top_of_le_nnreal
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : μ s ≠ ⊤
f : α → ℝ≥0∞
hbdd : ∃ y, ∀ x ∈ s, f x ≤ ↑y
⊢ ∫⁻ (x : α) in s, f x ∂μ < ⊤
state_after: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : μ s ≠ ⊤
f : α → ℝ≥0∞
M : ℝ≥0
hM : ∀ x ∈ s, f x ≤ ↑M
⊢ ∫⁻ (x : α) in s, f x ∂μ < ⊤
tactic: obtain ⟨M, hM⟩ := hbdd
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : μ s ≠ ⊤
f : α → ℝ≥0∞
M : ℝ≥0
hM : ∀ x ∈ s, f x ≤ ↑M
⊢ ∫⁻ (x : α) in s, f x ∂μ < ⊤
state_after: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : μ s ≠ ⊤
f : α → ℝ≥0∞
M : ℝ≥0
hM : ∀ x ∈ s, f x ≤ ↑M
⊢ ∫⁻ (x : α) in s, ↑M ∂μ < ⊤
tactic: refine lt_of_le_of_lt (setLIntegral_mono measurable_const hM) ?_
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
s : Set α
hs : μ s ≠ ⊤
f : α → ℝ≥0∞
M : ℝ≥0
hM : ∀ x ∈ s, f x ≤ ↑M
⊢ ∫⁻ (x : α) in s, ↑M ∂μ < ⊤
state_after: no goals
tactic: simp [ENNReal.mul_lt_top, hs]
Theorem: nhds_translation_add_neg
File: Mathlib/Topology/Algebra/Group/Basic.lean

Proof steps:
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s : Set α
x✝ : α
x : G
⊢ 𝓝 (1 * x⁻¹⁻¹) = 𝓝 x
state_after: no goals
tactic: simp
Theorem: Set.range_ite_subset'
File: Mathlib/Data/Set/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s t : Set α
p : Prop
inst✝ : Decidable p
f g : α → β
⊢ range (if p then f else g) ⊆ range f ∪ range g
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s t : Set α
p : Prop
inst✝ : Decidable p
f g : α → β
h : p
⊢ range (if p then f else g) ⊆ range f ∪ range g

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s t : Set α
p : Prop
inst✝ : Decidable p
f g : α → β
h : ¬p
⊢ range (if p then f else g) ⊆ range f ∪ range g
tactic: by_cases h : p
Theorem: basis_toMatrix_mul
File: Mathlib/LinearAlgebra/Matrix/Basis.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
κ : Type u_3
κ' : Type u_4
R : Type u_5
M : Type u_6
inst✝¹¹ : CommSemiring R
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
R₂ : Type u_7
M₂ : Type u_8
inst✝⁸ : CommRing R₂
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : Module R₂ M₂
e : Basis ι R M
v : ι' → M
i : ι
j : ι'
N : Type u_9
inst✝⁵ : AddCommMonoid N
inst✝⁴ : Module R N
b : Basis ι R M
b' : Basis ι' R M
c : Basis κ R N
c' : Basis κ' R N
f : M →ₗ[R] N
inst✝³ : Fintype ι'
inst✝² : Fintype κ
inst✝¹ : Finite ι
inst✝ : DecidableEq κ
b₁ : Basis ι R M
b₂ : Basis ι' R M
b₃ : Basis κ R N
A : Matrix ι' κ R
⊢ b₁.toMatrix ⇑b₂ * A = (toMatrix b₃ b₁) ((toLin b₃ b₂) A)
state_after: ι : Type u_1
ι' : Type u_2
κ : Type u_3
κ' : Type u_4
R : Type u_5
M : Type u_6
inst✝¹¹ : CommSemiring R
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
R₂ : Type u_7
M₂ : Type u_8
inst✝⁸ : CommRing R₂
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : Module R₂ M₂
e : Basis ι R M
v : ι' → M
i : ι
j : ι'
N : Type u_9
inst✝⁵ : AddCommMonoid N
inst✝⁴ : Module R N
b : Basis ι R M
b' : Basis ι' R M
c : Basis κ R N
c' : Basis κ' R N
f : M →ₗ[R] N
inst✝³ : Fintype ι'
inst✝² : Fintype κ
inst✝¹ : Finite ι
inst✝ : DecidableEq κ
b₁ : Basis ι R M
b₂ : Basis ι' R M
b₃ : Basis κ R N
A : Matrix ι' κ R
this : b₁.toMatrix ⇑b₂ * (toMatrix b₃ b₂) ((toLin b₃ b₂) A) = (toMatrix b₃ b₁) ((toLin b₃ b₂) A)
⊢ b₁.toMatrix ⇑b₂ * A = (toMatrix b₃ b₁) ((toLin b₃ b₂) A)
tactic: have := basis_toMatrix_mul_linearMap_toMatrix b₃ b₁ b₂ (Matrix.toLin b₃ b₂ A)
state_before: ι : Type u_1
ι' : Type u_2
κ : Type u_3
κ' : Type u_4
R : Type u_5
M : Type u_6
inst✝¹¹ : CommSemiring R
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
R₂ : Type u_7
M₂ : Type u_8
inst✝⁸ : CommRing R₂
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : Module R₂ M₂
e : Basis ι R M
v : ι' → M
i : ι
j : ι'
N : Type u_9
inst✝⁵ : AddCommMonoid N
inst✝⁴ : Module R N
b : Basis ι R M
b' : Basis ι' R M
c : Basis κ R N
c' : Basis κ' R N
f : M →ₗ[R] N
inst✝³ : Fintype ι'
inst✝² : Fintype κ
inst✝¹ : Finite ι
inst✝ : DecidableEq κ
b₁ : Basis ι R M
b₂ : Basis ι' R M
b₃ : Basis κ R N
A : Matrix ι' κ R
this : b₁.toMatrix ⇑b₂ * (toMatrix b₃ b₂) ((toLin b₃ b₂) A) = (toMatrix b₃ b₁) ((toLin b₃ b₂) A)
⊢ b₁.toMatrix ⇑b₂ * A = (toMatrix b₃ b₁) ((toLin b₃ b₂) A)
state_after: no goals
tactic: rwa [LinearMap.toMatrix_toLin] at this
Theorem: Submonoid.mem_sup_left
File: Mathlib/Algebra/Group/Submonoid/Membership.lean

Proof steps:
state_before: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : MulOneClass M
S T : Submonoid M
⊢ ∀ {x : M}, x ∈ S → x ∈ S ⊔ T
state_after: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : MulOneClass M
S T : Submonoid M
⊢ S ≤ S ⊔ T
tactic: rw [← SetLike.le_def]
state_before: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : MulOneClass M
S T : Submonoid M
⊢ S ≤ S ⊔ T
state_after: no goals
tactic: exact le_sup_left
Theorem: List.takeWhile_takeWhile
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p✝ : α → Bool
l✝ : List α
p q : α → Bool
l : List α
⊢ takeWhile p (takeWhile q l) = takeWhile (fun a => decide (p a = true ∧ q a = true)) l
state_after: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p✝ : α → Bool
l : List α
p q : α → Bool
⊢ takeWhile p (takeWhile q []) = takeWhile (fun a => decide (p a = true ∧ q a = true)) []

case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p✝ : α → Bool
l : List α
p q : α → Bool
hd : α
tl : List α
IH : takeWhile p (takeWhile q tl) = takeWhile (fun a => decide (p a = true ∧ q a = true)) tl
⊢ takeWhile p (takeWhile q (hd :: tl)) = takeWhile (fun a => decide (p a = true ∧ q a = true)) (hd :: tl)
tactic: induction' l with hd tl IH
Theorem: Int.preimage_Ioo
File: Mathlib/Algebra/Order/Floor.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a b : α
⊢ Int.cast ⁻¹' Ioo a b = Ioo ⌊a⌋ ⌈b⌉
state_after: case h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a b : α
x✝ : ℤ
⊢ x✝ ∈ Int.cast ⁻¹' Ioo a b ↔ x✝ ∈ Ioo ⌊a⌋ ⌈b⌉
tactic: ext
state_before: case h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a b : α
x✝ : ℤ
⊢ x✝ ∈ Int.cast ⁻¹' Ioo a b ↔ x✝ ∈ Ioo ⌊a⌋ ⌈b⌉
state_after: no goals
tactic: simp [floor_lt, lt_ceil]
Theorem: Associates.factors_subsingleton
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

Proof steps:
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Subsingleton α
a : Associates α
⊢ a.factors = ⊤
state_after: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Subsingleton α
a : Associates α
this : Subsingleton (Associates α)
⊢ a.factors = ⊤
tactic: have : Subsingleton (Associates α) := inferInstance
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Subsingleton α
a : Associates α
this : Subsingleton (Associates α)
⊢ a.factors = ⊤
state_after: no goals
tactic: convert factors_zero
Theorem: LinearMap.BilinForm.orthogonal_bot
File: Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M
inst✝⁶ : Module R M
R₁ : Type u_3
M₁ : Type u_4
inst✝⁵ : CommRing R₁
inst✝⁴ : AddCommGroup M₁
inst✝³ : Module R₁ M₁
V : Type u_5
K : Type u_6
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
N L : Submodule R M
⊢ B.orthogonal ⊥ = ⊤
state_after: case h
R : Type u_1
M : Type u_2
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M
inst✝⁶ : Module R M
R₁ : Type u_3
M₁ : Type u_4
inst✝⁵ : CommRing R₁
inst✝⁴ : AddCommGroup M₁
inst✝³ : Module R₁ M₁
V : Type u_5
K : Type u_6
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
N L : Submodule R M
x✝ : M
⊢ x✝ ∈ B.orthogonal ⊥ ↔ x✝ ∈ ⊤
tactic: ext
state_before: case h
R : Type u_1
M : Type u_2
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M
inst✝⁶ : Module R M
R₁ : Type u_3
M₁ : Type u_4
inst✝⁵ : CommRing R₁
inst✝⁴ : AddCommGroup M₁
inst✝³ : Module R₁ M₁
V : Type u_5
K : Type u_6
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
N L : Submodule R M
x✝ : M
⊢ x✝ ∈ B.orthogonal ⊥ ↔ x✝ ∈ ⊤
state_after: no goals
tactic: simp [IsOrtho]
Theorem: Quaternion.normSq_natCast
File: Mathlib/Algebra/Quaternion.lean

Proof steps:
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
r x y z : R
a b c : ℍ[R]
n : ℕ
⊢ normSq ↑n = ↑n ^ 2
state_after: no goals
tactic: rw [← coe_natCast, normSq_coe]
Theorem: CliffordAlgebra.invOf_ι
File: Mathlib/LinearAlgebra/CliffordAlgebra/Inversion.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
Q : QuadraticForm R M
m : M
inst✝¹ : Invertible (Q m)
inst✝ : Invertible ((ι Q) m)
⊢ ⅟((ι Q) m) = (ι Q) (⅟(Q m) • m)
state_after: R : Type u_1
M : Type u_2
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
Q : QuadraticForm R M
m : M
inst✝¹ : Invertible (Q m)
inst✝ : Invertible ((ι Q) m)
this : Invertible ((ι Q) m) := invertibleιOfInvertible Q m
⊢ ⅟((ι Q) m) = (ι Q) (⅟(Q m) • m)
tactic: letI := invertibleιOfInvertible Q m
state_before: R : Type u_1
M : Type u_2
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
Q : QuadraticForm R M
m : M
inst✝¹ : Invertible (Q m)
inst✝ : Invertible ((ι Q) m)
this : Invertible ((ι Q) m) := invertibleιOfInvertible Q m
⊢ ⅟((ι Q) m) = (ι Q) (⅟(Q m) • m)
state_after: no goals
tactic: convert (rfl : ⅟ (ι Q m) = _)
Theorem: Finset.orderEmbOfCardLe_mem
File: Mathlib/Data/Finset/Sort.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
s : Finset α
k : ℕ
h : k ≤ s.card
a : Fin k
⊢ (s.orderEmbOfCardLe h) a ∈ s
state_after: no goals
tactic: simp only [orderEmbOfCardLe, RelEmbedding.coe_trans, Finset.orderEmbOfFin_mem,
    Function.comp_apply]
Theorem: affineCombination_mem_affineSpan
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

Proof steps:
state_before: ι : Type u_1
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
inst✝ : Nontrivial k
s : Finset ι
w : ι → k
h : ∑ i ∈ s, w i = 1
p : ι → P
⊢ (Finset.affineCombination k s p) w ∈ affineSpan k (Set.range p)
state_after: no goals
tactic: classical
    have hnz : ∑ i ∈ s, w i ≠ 0 := h.symm ▸ one_ne_zero
    have hn : s.Nonempty := Finset.nonempty_of_sum_ne_zero hnz
    cases' hn with i1 hi1
    let w1 : ι → k := Function.update (Function.const ι 0) i1 1
    have hw1 : ∑ i ∈ s, w1 i = 1 := by
      simp only [Function.const_zero, Finset.sum_update_of_mem hi1, Pi.zero_apply,
          Finset.sum_const_zero, add_zero]
    have hw1s : s.affineCombination k p w1 = p i1 :=
      s.affineCombination_of_eq_one_of_eq_zero w1 p hi1 (Function.update_same _ _ _) fun _ _ hne =>
        Function.update_noteq hne _ _
    have hv : s.affineCombination k p w -ᵥ p i1 ∈ (affineSpan k (Set.range p)).direction := by
      rw [direction_affineSpan, ← hw1s, Finset.affineCombination_vsub]
      apply weightedVSub_mem_vectorSpan
      -- Porting note: Rest was `simp [Pi.sub_apply, h, hw1]`,
      -- but `Pi.sub_apply` transforms the goal into nonsense
      change (Finset.sum s fun i => w i - w1 i) = 0
      simp only [Finset.sum_sub_distrib, h, hw1, sub_self]
    rw [← vsub_vadd (s.affineCombination k p w) (p i1)]
    exact AffineSubspace.vadd_mem_of_mem_direction hv (mem_affineSpan k (Set.mem_range_self _))
Theorem: QuaternionAlgebra.star_coe
File: Mathlib/Algebra/Quaternion.lean

Proof steps:
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
c₁ c₂ r x y z : R
a b c : ℍ[R,c₁,c₂]
⊢ star ↑x = ↑x
state_after: no goals
tactic: ext <;> simp
Theorem: MulEquiv.ofLeftInverse_apply
File: Mathlib/Algebra/Group/Subsemigroup/Operations.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
P : Type u_3
σ : Type u_4
inst✝¹ : Mul M
inst✝ : Mul N
S T : Subsemigroup M
f : M →ₙ* N
g : N → M
h : Function.LeftInverse g ⇑f
x : ↥f.srange
x' : M
hx' : f x' = ↑x
⊢ f (g ↑x) = ↑x
state_after: no goals
tactic: rw [← hx', h x']
Theorem: Finset.map_filter
File: Mathlib/Data/Finset/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f✝ : α ↪ β
s : Finset α
f : α ≃ β
p : α → Prop
inst✝ : DecidablePred p
⊢ map f.toEmbedding (filter p s) = filter (p ∘ ⇑f.symm) (map f.toEmbedding s)
state_after: no goals
tactic: simp only [filter_map, Function.comp, Equiv.toEmbedding_apply, Equiv.symm_apply_apply]
Theorem: MetricSpace.replaceTopology_eq
File: Mathlib/Topology/MetricSpace/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ✝ : Type w
inst✝ : MetricSpace γ✝
γ : Type u_3
U : TopologicalSpace γ
m : MetricSpace γ
H : U = UniformSpace.toTopologicalSpace
⊢ m.replaceTopology H = m
state_after: case h.dist.h.h
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ✝ : Type w
inst✝ : MetricSpace γ✝
γ : Type u_3
U : TopologicalSpace γ
m : MetricSpace γ
H : U = UniformSpace.toTopologicalSpace
x✝¹ x✝ : γ
⊢ dist x✝¹ x✝ = dist x✝¹ x✝
tactic: ext
state_before: case h.dist.h.h
α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α
γ✝ : Type w
inst✝ : MetricSpace γ✝
γ : Type u_3
U : TopologicalSpace γ
m : MetricSpace γ
H : U = UniformSpace.toTopologicalSpace
x✝¹ x✝ : γ
⊢ dist x✝¹ x✝ = dist x✝¹ x✝
state_after: no goals
tactic: rfl
Theorem: Pi.mulSupport_mulSingle_of_ne
File: Mathlib/Algebra/Group/Support.lean

Proof steps:
state_before: A : Type u_1
B : Type u_2
inst✝¹ : DecidableEq A
inst✝ : One B
a : A
b : B
h : b ≠ 1
x : A
hx : x = a
⊢ x ∈ mulSupport (mulSingle a b)
state_after: no goals
tactic: rwa [mem_mulSupport, hx, mulSingle_eq_same]
Theorem: Ergodic.ae_empty_or_univ_of_ae_le_preimage'
File: Mathlib/Dynamics/Ergodic/Ergodic.lean

Proof steps:
state_before: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
hs' : s ≤ᶠ[ae μ] f ⁻¹' s
h_fin : μ s ≠ ⊤
⊢ s =ᶠ[ae μ] ∅ ∨ s =ᶠ[ae μ] univ
state_after: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
hs' : s ≤ᶠ[ae μ] f ⁻¹' s
h_fin : μ (f ⁻¹' s) ≠ ⊤
⊢ s =ᶠ[ae μ] ∅ ∨ s =ᶠ[ae μ] univ
tactic: replace h_fin : μ (f ⁻¹' s) ≠ ∞ := by rwa [hf.measure_preimage hs.nullMeasurableSet]
state_before: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
hs' : s ≤ᶠ[ae μ] f ⁻¹' s
h_fin : μ (f ⁻¹' s) ≠ ⊤
⊢ s =ᶠ[ae μ] ∅ ∨ s =ᶠ[ae μ] univ
state_after: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
hs' : s ≤ᶠ[ae μ] f ⁻¹' s
h_fin : μ (f ⁻¹' s) ≠ ⊤
⊢ f ⁻¹' s =ᶠ[ae μ] s
tactic: refine hf.quasiErgodic.ae_empty_or_univ' hs ?_
state_before: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
hs' : s ≤ᶠ[ae μ] f ⁻¹' s
h_fin : μ (f ⁻¹' s) ≠ ⊤
⊢ f ⁻¹' s =ᶠ[ae μ] s
state_after: no goals
tactic: exact (ae_eq_of_ae_subset_of_measure_ge hs'
    (hf.measure_preimage hs.nullMeasurableSet).le hs h_fin).symm
Theorem: not_summable_iff_tendsto_nat_atTop_of_nonneg
File: Mathlib/Topology/Algebra/InfiniteSum/Real.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
f✝ : ℕ → α
a : α
f : ℕ → ℝ
hf : ∀ (n : ℕ), 0 ≤ f n
⊢ ¬Summable f ↔ Tendsto (fun n => ∑ i ∈ range n, f i) atTop atTop
state_after: case intro
α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
f✝ : ℕ → α
a : α
f : ℕ → ℝ≥0
⊢ (¬Summable fun i => ↑(f i)) ↔ Tendsto (fun n => ∑ i ∈ range n, (fun i => ↑(f i)) i) atTop atTop
tactic: lift f to ℕ → ℝ≥0 using hf
state_before: case intro
α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
f✝ : ℕ → α
a : α
f : ℕ → ℝ≥0
⊢ (¬Summable fun i => ↑(f i)) ↔ Tendsto (fun n => ∑ i ∈ range n, (fun i => ↑(f i)) i) atTop atTop
state_after: no goals
tactic: exact mod_cast NNReal.not_summable_iff_tendsto_nat_atTop