ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: CategoryTheory.Sheaf.sheaf_for_finestTopology
File: Mathlib/CategoryTheory/Sites/Canonical.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
P : Cᵒᵖ ⥤ Type v
X✝ Y : C
S✝ : Sieve X✝
R : Presieve X✝
J J₂ : GrothendieckTopology C
Ps : Set (Cᵒᵖ ⥤ Type v)
h : P ∈ Ps
X : C
S : Sieve X
hS : S ∈ (finestTopology Ps).sieves X
⊢ Presieve.IsSheafFor P S.arrows
state_after: no goals
tactic: simpa using hS _ ⟨⟨_, _, ⟨_, h, rfl⟩, rfl⟩, rfl⟩ _ (𝟙 _)
Theorem: Lagrange.eval_basis_of_ne
File: Mathlib/LinearAlgebra/Lagrange.lean

Proof steps:
state_before: F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s : Finset ι
v : ι → F
i j : ι
hij : i ≠ j
hj : j ∈ s
⊢ eval (v j) (Lagrange.basis s v i) = 0
state_after: F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s : Finset ι
v : ι → F
i j : ι
hij : i ≠ j
hj : j ∈ s
⊢ ∃ a ∈ s.erase i, eval (v j) (basisDivisor (v i) (v a)) = 0
tactic: simp_rw [Lagrange.basis, eval_prod, prod_eq_zero_iff]
state_before: F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s : Finset ι
v : ι → F
i j : ι
hij : i ≠ j
hj : j ∈ s
⊢ ∃ a ∈ s.erase i, eval (v j) (basisDivisor (v i) (v a)) = 0
state_after: no goals
tactic: exact ⟨j, ⟨mem_erase.mpr ⟨hij.symm, hj⟩, eval_basisDivisor_right⟩⟩
Theorem: WeierstrassCurve.natDegree_Ψ₃_le
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
⊢ W.Ψ₃.natDegree ≤ 4
state_after: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
⊢ (3 * X ^ 4 + C W.b₂ * X ^ 3 + 3 * C W.b₄ * X ^ 2 + 3 * C W.b₆ * X + C W.b₈).natDegree ≤ 4
tactic: rw [Ψ₃]
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
⊢ (3 * X ^ 4 + C W.b₂ * X ^ 3 + 3 * C W.b₄ * X ^ 2 + 3 * C W.b₆ * X + C W.b₈).natDegree ≤ 4
state_after: no goals
tactic: compute_degree
Theorem: Module.Flat.rTensor_shortComplex_exact
File: Mathlib/RingTheory/Flat/CategoryTheory.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommRing R
M : ModuleCat R
inst✝ : Flat R ↑M
C : ShortComplex (ModuleCat R)
hC : C.Exact
⊢ (C.map (tensorRight M)).Exact
state_after: R : Type u
inst✝¹ : CommRing R
M : ModuleCat R
inst✝ : Flat R ↑M
C : ShortComplex (ModuleCat R)
hC : Function.Exact ⇑C.f ⇑C.g
⊢ Function.Exact ⇑(C.map (tensorRight M)).f ⇑(C.map (tensorRight M)).g
tactic: rw [moduleCat_exact_iff_function_exact] at hC ⊢
state_before: R : Type u
inst✝¹ : CommRing R
M : ModuleCat R
inst✝ : Flat R ↑M
C : ShortComplex (ModuleCat R)
hC : Function.Exact ⇑C.f ⇑C.g
⊢ Function.Exact ⇑(C.map (tensorRight M)).f ⇑(C.map (tensorRight M)).g
state_after: no goals
tactic: exact rTensor_exact M hC
Theorem: ProbabilityTheory.Kernel.withDensity_zero
File: Mathlib/Probability/Kernel/WithDensity.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : Kernel α β
f : α → β → ℝ≥0∞
κ : Kernel α β
inst✝ : IsSFiniteKernel κ
⊢ κ.withDensity 0 = 0
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : Kernel α β
f : α → β → ℝ≥0∞
κ : Kernel α β
inst✝ : IsSFiniteKernel κ
a✝¹ : α
s✝ : Set β
a✝ : MeasurableSet s✝
⊢ ((κ.withDensity 0) a✝¹) s✝ = (0 a✝¹) s✝
tactic: ext
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : Kernel α β
f : α → β → ℝ≥0∞
κ : Kernel α β
inst✝ : IsSFiniteKernel κ
a✝¹ : α
s✝ : Set β
a✝ : MeasurableSet s✝
⊢ ((κ.withDensity 0) a✝¹) s✝ = (0 a✝¹) s✝
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : Kernel α β
f : α → β → ℝ≥0∞
κ : Kernel α β
inst✝ : IsSFiniteKernel κ
a✝¹ : α
s✝ : Set β
a✝ : MeasurableSet s✝
⊢ ((κ a✝¹).withDensity (0 a✝¹)) s✝ = (0 a✝¹) s✝
tactic: rw [Kernel.withDensity_apply _ measurable_const]
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : Kernel α β
f : α → β → ℝ≥0∞
κ : Kernel α β
inst✝ : IsSFiniteKernel κ
a✝¹ : α
s✝ : Set β
a✝ : MeasurableSet s✝
⊢ ((κ a✝¹).withDensity (0 a✝¹)) s✝ = (0 a✝¹) s✝
state_after: no goals
tactic: simp
Theorem: FirstOrder.Language.Term.constantsVarsEquiv_apply
File: Mathlib/ModelTheory/Syntax.lean

Proof steps:
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
⊢ Function.LeftInverse varsToConstants constantsToVars
state_after: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
t : L[[γ]].Term α
⊢ t.constantsToVars.varsToConstants = t
tactic: intro t
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
t : L[[γ]].Term α
⊢ t.constantsToVars.varsToConstants = t
state_after: case var
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
a✝ : α
⊢ (var a✝).constantsToVars.varsToConstants = var a✝

case func
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
f : L[[γ]].Functions n
_ts✝ : Fin n → L[[γ]].Term α
ih : ∀ (a : Fin n), (_ts✝ a).constantsToVars.varsToConstants = _ts✝ a
⊢ (func f _ts✝).constantsToVars.varsToConstants = func f _ts✝
tactic: induction' t with _ n f _ ih
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
⊢ Function.RightInverse varsToConstants constantsToVars
state_after: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
t : L.Term (γ ⊕ α)
⊢ t.varsToConstants.constantsToVars = t
tactic: intro t
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
t : L.Term (γ ⊕ α)
⊢ t.varsToConstants.constantsToVars = t
state_after: case var
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
x : γ ⊕ α
⊢ (var x).varsToConstants.constantsToVars = var x

case func
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
f : L.Functions n
_ts✝ : Fin n → L.Term (γ ⊕ α)
ih : ∀ (a : Fin n), (_ts✝ a).varsToConstants.constantsToVars = _ts✝ a
⊢ (func f _ts✝).varsToConstants.constantsToVars = func f _ts✝
tactic: induction' t with x n f _ ih
Theorem: Polynomial.binomial_eq_binomial
File: Mathlib/Algebra/Polynomial/Basic.lean

Proof steps:
state_before: R : Type u
a b : R
m✝ n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
k l m n : ℕ
u v : R
hu : u ≠ 0
hv : v ≠ 0
⊢ C u * X ^ k + C v * X ^ l = C u * X ^ m + C v * X ^ n ↔
    k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u + v = 0 ∧ k = l ∧ m = n
state_after: R : Type u
a b : R
m✝ n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
k l m n : ℕ
u v : R
hu : u ≠ 0
hv : v ≠ 0
⊢ Finsupp.single k u + Finsupp.single l v = Finsupp.single m u + Finsupp.single n v ↔
    k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u + v = 0 ∧ k = l ∧ m = n
tactic: simp_rw [C_mul_X_pow_eq_monomial, ← toFinsupp_inj, toFinsupp_add, toFinsupp_monomial]
state_before: R : Type u
a b : R
m✝ n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
k l m n : ℕ
u v : R
hu : u ≠ 0
hv : v ≠ 0
⊢ Finsupp.single k u + Finsupp.single l v = Finsupp.single m u + Finsupp.single n v ↔
    k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u + v = 0 ∧ k = l ∧ m = n
state_after: no goals
tactic: exact Finsupp.single_add_single_eq_single_add_single hu hv
Theorem: OpenEmbedding.isQuasiSeparated_iff
File: Mathlib/Topology/QuasiSeparated.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
h : OpenEmbedding f
s : Set α
⊢ IsQuasiSeparated s ↔ IsQuasiSeparated (f '' s)
state_after: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
h : OpenEmbedding f
s : Set α
⊢ IsQuasiSeparated (f '' s) → IsQuasiSeparated s
tactic: refine ⟨fun hs => hs.image_of_embedding h.toEmbedding, ?_⟩
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
h : OpenEmbedding f
s : Set α
⊢ IsQuasiSeparated (f '' s) → IsQuasiSeparated s
state_after: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
h : OpenEmbedding f
s : Set α
H : IsQuasiSeparated (f '' s)
U V : Set α
hU : U ⊆ s
hU' : IsOpen U
hU'' : IsCompact U
hV : V ⊆ s
hV' : IsOpen V
hV'' : IsCompact V
⊢ IsCompact (U ∩ V)
tactic: intro H U V hU hU' hU'' hV hV' hV''
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
h : OpenEmbedding f
s : Set α
H : IsQuasiSeparated (f '' s)
U V : Set α
hU : U ⊆ s
hU' : IsOpen U
hU'' : IsCompact U
hV : V ⊆ s
hV' : IsOpen V
hV'' : IsCompact V
⊢ IsCompact (U ∩ V)
state_after: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
h : OpenEmbedding f
s : Set α
H : IsQuasiSeparated (f '' s)
U V : Set α
hU : U ⊆ s
hU' : IsOpen U
hU'' : IsCompact U
hV : V ⊆ s
hV' : IsOpen V
hV'' : IsCompact V
⊢ IsCompact (f '' U ∩ f '' V)
tactic: rw [h.toEmbedding.isCompact_iff, Set.image_inter h.inj]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
h : OpenEmbedding f
s : Set α
H : IsQuasiSeparated (f '' s)
U V : Set α
hU : U ⊆ s
hU' : IsOpen U
hU'' : IsCompact U
hV : V ⊆ s
hV' : IsOpen V
hV'' : IsCompact V
⊢ IsCompact (f '' U ∩ f '' V)
state_after: no goals
tactic: exact
    H (f '' U) (f '' V) (Set.image_subset _ hU) (h.isOpenMap _ hU') (hU''.image h.continuous)
      (Set.image_subset _ hV) (h.isOpenMap _ hV') (hV''.image h.continuous)
Theorem: MulAction.zpow_smul_mod_minimalPeriod
File: Mathlib/Dynamics/PeriodicPts.lean

Proof steps:
state_before: α : Type v
G : Type u
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u
inst✝¹ : Monoid M
inst✝ : MulAction M α
a : G
b : α
n : ℤ
⊢ a ^ (n % ↑(minimalPeriod (fun x => a • x) b)) • b = a ^ n • b
state_after: no goals
tactic: rw [← period_eq_minimalPeriod, zpow_mod_period_smul]
Theorem: IsGδ.iInter
File: Mathlib/Topology/GDelta.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝¹ : TopologicalSpace X
inst✝ : Countable ι'
s : ι' → Set X
hs : ∀ (i : ι'), IsGδ (s i)
⊢ IsGδ (⋂ i, s i)
state_after: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝¹ : TopologicalSpace X
inst✝ : Countable ι'
s : ι' → Set X
T : ι' → Set (Set X)
hTo : ∀ (i : ι'), ∀ t ∈ T i, IsOpen t
hTc : ∀ (i : ι'), (T i).Countable
hTs : ∀ (i : ι'), s i = ⋂₀ T i
⊢ IsGδ (⋂ i, s i)
tactic: choose T hTo hTc hTs using hs
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝¹ : TopologicalSpace X
inst✝ : Countable ι'
s : ι' → Set X
T : ι' → Set (Set X)
hTo : ∀ (i : ι'), ∀ t ∈ T i, IsOpen t
hTc : ∀ (i : ι'), (T i).Countable
hTs : ∀ (i : ι'), s i = ⋂₀ T i
⊢ IsGδ (⋂ i, s i)
state_after: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝¹ : TopologicalSpace X
inst✝ : Countable ι'
T : ι' → Set (Set X)
hTo : ∀ (i : ι'), ∀ t ∈ T i, IsOpen t
hTc : ∀ (i : ι'), (T i).Countable
hTs : ∀ (i : ι'), (fun i => ⋂₀ T i) i = ⋂₀ T i
⊢ IsGδ (⋂ i, (fun i => ⋂₀ T i) i)
tactic: obtain rfl : s = fun i => ⋂₀ T i := funext hTs
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝¹ : TopologicalSpace X
inst✝ : Countable ι'
T : ι' → Set (Set X)
hTo : ∀ (i : ι'), ∀ t ∈ T i, IsOpen t
hTc : ∀ (i : ι'), (T i).Countable
hTs : ∀ (i : ι'), (fun i => ⋂₀ T i) i = ⋂₀ T i
⊢ IsGδ (⋂ i, (fun i => ⋂₀ T i) i)
state_after: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝¹ : TopologicalSpace X
inst✝ : Countable ι'
T : ι' → Set (Set X)
hTo : ∀ (i : ι'), ∀ t ∈ T i, IsOpen t
hTc : ∀ (i : ι'), (T i).Countable
hTs : ∀ (i : ι'), (fun i => ⋂₀ T i) i = ⋂₀ T i
⊢ ∀ t ∈ ⋃ i, T i, IsOpen t
tactic: refine ⟨⋃ i, T i, ?_, countable_iUnion hTc, (sInter_iUnion _).symm⟩
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝¹ : TopologicalSpace X
inst✝ : Countable ι'
T : ι' → Set (Set X)
hTo : ∀ (i : ι'), ∀ t ∈ T i, IsOpen t
hTc : ∀ (i : ι'), (T i).Countable
hTs : ∀ (i : ι'), (fun i => ⋂₀ T i) i = ⋂₀ T i
⊢ ∀ t ∈ ⋃ i, T i, IsOpen t
state_after: no goals
tactic: simpa [@forall_swap ι'] using hTo
Theorem: Finset.sum_dite_irrel
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g✝ : α → β
inst✝¹ : CommMonoid β
p : Prop
inst✝ : Decidable p
s : Finset α
f : p → α → β
g : ¬p → α → β
⊢ (∏ x ∈ s, if h : p then f h x else g h x) = if h : p then ∏ x ∈ s, f h x else ∏ x ∈ s, g h x
state_after: no goals
tactic: split_ifs with h <;> rfl
Theorem: PreErgodic.ae_eq_const_of_ae_eq_comp
File: Mathlib/Dynamics/Ergodic/Function.lean

Proof steps:
state_before: α : Type u_1
X : Type u_2
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : Nonempty X
inst✝¹ : MeasurableSpace X
inst✝ : MeasurableSpace.CountablySeparated X
f : α → α
g : α → X
h : PreErgodic f μ
hgm : Measurable g
hg_eq : g ∘ f = g
U : Set X
hU : MeasurableSet U
⊢ f ⁻¹' (g ⁻¹' U) = g ⁻¹' U
state_after: no goals
tactic: rw [← preimage_comp, hg_eq]
Theorem: Part.some_mul_some
File: Mathlib/Data/Part.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Mul α
a b : α
⊢ some a * some b = some (a * b)
state_after: no goals
tactic: simp [mul_def]
Theorem: ProbabilityTheory.Kernel.measurable_densityProcess_aux
File: Mathlib/Probability/Kernel/Disintegration/Density.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝ : CountablyGenerated γ
κ✝ : Kernel α (γ × β)
ν✝ : Kernel α γ
κ : Kernel α (γ × β)
ν : Kernel α γ
n : ℕ
s : Set β
hs : MeasurableSet s
⊢ Measurable fun p => (κ p.1) (countablePartitionSet n p.2 ×ˢ s) / (ν p.1) (countablePartitionSet n p.2)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝ : CountablyGenerated γ
κ✝ : Kernel α (γ × β)
ν✝ : Kernel α γ
κ : Kernel α (γ × β)
ν : Kernel α γ
n : ℕ
s : Set β
hs : MeasurableSet s
⊢ mα.prod (↑(countableFiltration γ) n) ≤ Prod.instMeasurableSpace
tactic: refine Measurable.mono (measurable_densityProcess_countableFiltration_aux κ ν n hs) ?_ le_rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝ : CountablyGenerated γ
κ✝ : Kernel α (γ × β)
ν✝ : Kernel α γ
κ : Kernel α (γ × β)
ν : Kernel α γ
n : ℕ
s : Set β
hs : MeasurableSet s
⊢ mα.prod (↑(countableFiltration γ) n) ≤ Prod.instMeasurableSpace
state_after: no goals
tactic: exact sup_le_sup le_rfl (comap_mono ((countableFiltration γ).le _))
Theorem: InnerProductGeometry.norm_sub_eq_add_norm_of_angle_eq_pi
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

Proof steps:
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : angle x y = π
⊢ ‖x - y‖ = ‖x‖ + ‖y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : angle x y = π
⊢ ‖x‖ ^ 2 - 2 * -(‖x‖ * ‖y‖) + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2
tactic: rw [← sq_eq_sq (norm_nonneg (x - y)) (add_nonneg (norm_nonneg x) (norm_nonneg y)),
    norm_sub_pow_two_real, inner_eq_neg_mul_norm_of_angle_eq_pi h]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : angle x y = π
⊢ ‖x‖ ^ 2 - 2 * -(‖x‖ * ‖y‖) + ‖y‖ ^ 2 = (‖x‖ + ‖y‖) ^ 2
state_after: no goals
tactic: ring
Theorem: Orientation.oangle_sign_smul_sub_right
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean

Proof steps:
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
r : ℝ
⊢ (o.oangle x (r • x - y)).sign = -(o.oangle x y).sign
state_after: no goals
tactic: rw [← oangle_sign_neg_right, sub_eq_add_neg, oangle_sign_smul_add_right]
Theorem: TopCat.Presheaf.stalkSpecializes_stalkFunctor_map
File: Mathlib/Topology/Sheaves/Stalks.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
F G : Presheaf C X
f : F ⟶ G
x y : ↑X
h : x ⤳ y
⊢ F.stalkSpecializes h ≫ (stalkFunctor C x).map f = (stalkFunctor C y).map f ≫ G.stalkSpecializes h
state_after: case w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
F G : Presheaf C X
f : F ⟶ G
x y : ↑X
h : x ⤳ y
j✝ : (OpenNhds y)ᵒᵖ
⊢ colimit.ι (((whiskeringLeft (OpenNhds y)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion y).op).obj F) j✝ ≫
      F.stalkSpecializes h ≫ (stalkFunctor C x).map f =
    colimit.ι (((whiskeringLeft (OpenNhds y)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion y).op).obj F) j✝ ≫
      (stalkFunctor C y).map f ≫ G.stalkSpecializes h
tactic: ext
state_before: case w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
F G : Presheaf C X
f : F ⟶ G
x y : ↑X
h : x ⤳ y
j✝ : (OpenNhds y)ᵒᵖ
⊢ colimit.ι (((whiskeringLeft (OpenNhds y)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion y).op).obj F) j✝ ≫
      F.stalkSpecializes h ≫ (stalkFunctor C x).map f =
    colimit.ι (((whiskeringLeft (OpenNhds y)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion y).op).obj F) j✝ ≫
      (stalkFunctor C y).map f ≫ G.stalkSpecializes h
state_after: case w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
F G : Presheaf C X
f : F ⟶ G
x y : ↑X
h : x ⤳ y
j✝ : (OpenNhds y)ᵒᵖ
⊢ colimit.ι (((whiskeringLeft (OpenNhds y)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion y).op).obj F) j✝ ≫
      F.stalkSpecializes h ≫
        ((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op ⋙ colim).map f =
    colimit.ι (((whiskeringLeft (OpenNhds y)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion y).op).obj F) j✝ ≫
      ((whiskeringLeft (OpenNhds y)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion y).op ⋙ colim).map f ≫
        G.stalkSpecializes h
tactic: delta stalkFunctor
state_before: case w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
F G : Presheaf C X
f : F ⟶ G
x y : ↑X
h : x ⤳ y
j✝ : (OpenNhds y)ᵒᵖ
⊢ colimit.ι (((whiskeringLeft (OpenNhds y)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion y).op).obj F) j✝ ≫
      F.stalkSpecializes h ≫
        ((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op ⋙ colim).map f =
    colimit.ι (((whiskeringLeft (OpenNhds y)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion y).op).obj F) j✝ ≫
      ((whiskeringLeft (OpenNhds y)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion y).op ⋙ colim).map f ≫
        G.stalkSpecializes h
state_after: no goals
tactic: simpa [stalkSpecializes] using by rfl
Theorem: Multiset.untrop_prod
File: Mathlib/Algebra/Tropical/BigOperators.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
inst✝ : AddCommMonoid R
s : Multiset (Tropical R)
⊢ ∀ (a : List (Tropical R)), untrop (prod ⟦a⟧) = (map untrop ⟦a⟧).sum
state_after: no goals
tactic: simpa using List.untrop_prod
Theorem: Asymptotics.IsEquivalent.inv
File: Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : NormedField β
t u v w : α → β
l : Filter α
huv : u ~[l] v
⊢ (fun x => (u x)⁻¹) ~[l] fun x => (v x)⁻¹
state_after: α : Type u_1
β : Type u_2
inst✝ : NormedField β
t u v w : α → β
l : Filter α
huv : ∃ φ, ∃ (_ : Tendsto φ l (𝓝 1)), u =ᶠ[l] φ * v
⊢ ∃ φ, ∃ (_ : Tendsto φ l (𝓝 1)), (fun x => (u x)⁻¹) =ᶠ[l] φ * fun x => (v x)⁻¹
tactic: rw [isEquivalent_iff_exists_eq_mul] at *
state_before: α : Type u_1
β : Type u_2
inst✝ : NormedField β
t u v w : α → β
l : Filter α
huv : ∃ φ, ∃ (_ : Tendsto φ l (𝓝 1)), u =ᶠ[l] φ * v
⊢ ∃ φ, ∃ (_ : Tendsto φ l (𝓝 1)), (fun x => (u x)⁻¹) =ᶠ[l] φ * fun x => (v x)⁻¹
state_after: case intro.intro
α : Type u_1
β : Type u_2
inst✝ : NormedField β
t u v w : α → β
l : Filter α
φ : α → β
hφ : Tendsto φ l (𝓝 1)
h : u =ᶠ[l] φ * v
⊢ ∃ φ, ∃ (_ : Tendsto φ l (𝓝 1)), (fun x => (u x)⁻¹) =ᶠ[l] φ * fun x => (v x)⁻¹
tactic: rcases huv with ⟨φ, hφ, h⟩
state_before: case intro.intro
α : Type u_1
β : Type u_2
inst✝ : NormedField β
t u v w : α → β
l : Filter α
φ : α → β
hφ : Tendsto φ l (𝓝 1)
h : u =ᶠ[l] φ * v
⊢ ∃ φ, ∃ (_ : Tendsto φ l (𝓝 1)), (fun x => (u x)⁻¹) =ᶠ[l] φ * fun x => (v x)⁻¹
state_after: case intro.intro
α : Type u_1
β : Type u_2
inst✝ : NormedField β
t u v w : α → β
l : Filter α
φ : α → β
hφ : Tendsto φ l (𝓝 1)
h : u =ᶠ[l] φ * v
⊢ ∃ φ, ∃ (_ : Tendsto φ l (𝓝 1⁻¹)), (fun x => (u x)⁻¹) =ᶠ[l] φ * fun x => (v x)⁻¹
tactic: rw [← inv_one]
state_before: case intro.intro
α : Type u_1
β : Type u_2
inst✝ : NormedField β
t u v w : α → β
l : Filter α
φ : α → β
hφ : Tendsto φ l (𝓝 1)
h : u =ᶠ[l] φ * v
⊢ ∃ φ, ∃ (_ : Tendsto φ l (𝓝 1⁻¹)), (fun x => (u x)⁻¹) =ᶠ[l] φ * fun x => (v x)⁻¹
state_after: case intro.intro
α : Type u_1
β : Type u_2
inst✝ : NormedField β
t u v w : α → β
l : Filter α
φ : α → β
hφ : Tendsto φ l (𝓝 1)
h : u =ᶠ[l] φ * v
⊢ (fun x => (u x)⁻¹) =ᶠ[l] (fun x => (φ x)⁻¹) * fun x => (v x)⁻¹
tactic: refine ⟨fun x ↦ (φ x)⁻¹, Tendsto.inv₀ hφ (by norm_num), ?_⟩
state_before: case intro.intro
α : Type u_1
β : Type u_2
inst✝ : NormedField β
t u v w : α → β
l : Filter α
φ : α → β
hφ : Tendsto φ l (𝓝 1)
h : u =ᶠ[l] φ * v
⊢ (fun x => (u x)⁻¹) =ᶠ[l] (fun x => (φ x)⁻¹) * fun x => (v x)⁻¹
state_after: case h.e'_5.h
α : Type u_1
β : Type u_2
inst✝ : NormedField β
t u v w : α → β
l : Filter α
φ : α → β
hφ : Tendsto φ l (𝓝 1)
h : u =ᶠ[l] φ * v
x✝ : α
⊢ ((fun x => (φ x)⁻¹) * fun x => (v x)⁻¹) x✝ = ((φ * v) x✝)⁻¹
tactic: convert h.inv
state_before: case h.e'_5.h
α : Type u_1
β : Type u_2
inst✝ : NormedField β
t u v w : α → β
l : Filter α
φ : α → β
hφ : Tendsto φ l (𝓝 1)
h : u =ᶠ[l] φ * v
x✝ : α
⊢ ((fun x => (φ x)⁻¹) * fun x => (v x)⁻¹) x✝ = ((φ * v) x✝)⁻¹
state_after: no goals
tactic: simp [mul_comm]
Theorem: Computation.LiftRelAux.ret_left
File: Mathlib/Data/Seq/Computation.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
R✝ : α → β → Prop
C✝ : Computation α → Computation β → Prop
R : α → β → Prop
C : Computation α → Computation β → Prop
a : α
cb : Computation β
⊢ LiftRelAux R C (Sum.inl a) cb.destruct ↔ ∃ b, b ∈ cb ∧ R a b
state_after: α : Type u
β : Type v
γ : Type w
R✝ : α → β → Prop
C✝ : Computation α → Computation β → Prop
R : α → β → Prop
C : Computation α → Computation β → Prop
a : α
cb : Computation β
⊢ ∀ (b : β), LiftRelAux R C (Sum.inl a) (pure b).destruct ↔ ∃ b_1, b_1 ∈ pure b ∧ R a b_1

α : Type u
β : Type v
γ : Type w
R✝ : α → β → Prop
C✝ : Computation α → Computation β → Prop
R : α → β → Prop
C : Computation α → Computation β → Prop
a : α
cb : Computation β
⊢ ∀ (cb : Computation β), LiftRelAux R C (Sum.inl a) cb.think.destruct ↔ ∃ b, b ∈ cb.think ∧ R a b
tactic: apply cb.recOn (fun b => _) fun cb => _