1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: InnerProductGeometry.sin_angle_add_of_inner_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

tactic: rw [angle_add_eq_arcsin_of_inner_eq_zero h h0,
  Real.sin_arcsin (le_trans (by norm_num) (div_nonneg (norm_nonneg _) (norm_nonneg _)))
    (div_le_one_of_le _ (norm_nonneg _))]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
h0 : x ≠ 0 ∨ y ≠ 0
⊢ Real.sin (angle x (x + y)) = ‖y‖ / ‖x + y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
h0 : x ≠ 0 ∨ y ≠ 0
⊢ ‖y‖ ≤ ‖x + y‖

tactic: rw [mul_self_le_mul_self_iff (norm_nonneg _) (norm_nonneg _),
  norm_add_sq_eq_norm_sq_add_norm_sq_real h]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
h0 : x ≠ 0 ∨ y ≠ 0
⊢ ‖y‖ ≤ ‖x + y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
h0 : x ≠ 0 ∨ y ≠ 0
⊢ ‖y‖ * ‖y‖ ≤ ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖

tactic: exact le_add_of_nonneg_left (mul_self_nonneg _)
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
h0 : x ≠ 0 ∨ y ≠ 0
⊢ ‖y‖ * ‖y‖ ≤ ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖
state_after: no goals

tactic: norm_num
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
h0 : x ≠ 0 ∨ y ≠ 0
⊢ -1 ≤ 0
state_after: no goals
Theorem: BoxIntegral.Prepartition.mem_splitCenter
File: Mathlib/Analysis/BoxIntegral/Partition/SubboxInduction.lean

tactic: simp [splitCenter]
state_before: ι : Type u_1
inst✝ : Fintype ι
I J : Box ι
⊢ J ∈ splitCenter I ↔ ∃ s, I.splitCenterBox s = J
state_after: no goals
Theorem: Fin.cycleRange_of_gt
File: Mathlib/GroupTheory/Perm/Fin.lean

tactic: rw [cycleRange, ofLeftInverse'_eq_ofInjective,
  ← Function.Embedding.toEquivRange_eq_ofInjective, ← viaFintypeEmbedding,
  viaFintypeEmbedding_apply_not_mem_range]
state_before: n : ℕ
i j : Fin n.succ
h : i < j
⊢ i.cycleRange j = j
state_after: case h
n : ℕ
i j : Fin n.succ
h : i < j
⊢ j ∉ Set.range ⇑(castLEEmb ⋯)

tactic: simpa
state_before: case h
n : ℕ
i j : Fin n.succ
h : i < j
⊢ j ∉ Set.range ⇑(castLEEmb ⋯)
state_after: no goals
Theorem: MvPFunctor.M.dest'_eq_dest'
File: Mathlib/Data/PFunctor/Multivariate/M.lean

tactic: cases h₁.symm.trans h₂
state_before: n : ℕ
P : MvPFunctor.{u} (n + 1)
α : TypeVec.{u} n
x : P.last.M
a₁ : P.A
f₁ : P.last.B a₁ → P.last.M
h₁ : x.dest = ⟨a₁, f₁⟩
a₂ : P.A
f₂ : P.last.B a₂ → P.last.M
h₂ : x.dest = ⟨a₂, f₂⟩
f' : Path P x ⟹ α
⊢ dest' P h₁ f' = dest' P h₂ f'
state_after: case refl
n : ℕ
P : MvPFunctor.{u} (n + 1)
α : TypeVec.{u} n
x : P.last.M
a₁ : P.A
f₁ : P.last.B a₁ → P.last.M
h₁ : x.dest = ⟨a₁, f₁⟩
f' : Path P x ⟹ α
h₂ : x.dest = ⟨a₁, f₁⟩
⊢ dest' P h₁ f' = dest' P h₂ f'

tactic: rfl
state_before: case refl
n : ℕ
P : MvPFunctor.{u} (n + 1)
α : TypeVec.{u} n
x : P.last.M
a₁ : P.A
f₁ : P.last.B a₁ → P.last.M
h₁ : x.dest = ⟨a₁, f₁⟩
f' : Path P x ⟹ α
h₂ : x.dest = ⟨a₁, f₁⟩
⊢ dest' P h₁ f' = dest' P h₂ f'
state_after: no goals
Theorem: mem_omegaLimit_singleton_iff_map_cluster_point
File: Mathlib/Dynamics/OmegaLimit.lean

tactic: simp_rw [mem_omegaLimit_iff_frequently, mapClusterPt_iff, singleton_inter_nonempty, mem_preimage]
state_before: τ : Type u_1
α : Type u_2
β : Type u_3
ι : Type u_4
inst✝ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
x : α
y : β
⊢ y ∈ ω f ϕ {x} ↔ MapClusterPt y f fun t => ϕ t x
state_after: no goals
Theorem: List.zipWith_flip
File: Mathlib/Data/List/Basic.lean

tactic: simp! [zipWith_flip]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → β → γ
a : α
as : List α
b : β
bs : List β
⊢ zipWith (flip f) (b :: bs) (a :: as) = zipWith f (a :: as) (b :: bs)
state_after: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → β → γ
a : α
as : List α
b : β
bs : List β
⊢ flip f b a = f a b

tactic: rfl
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f : α → β → γ
a : α
as : List α
b : β
bs : List β
⊢ flip f b a = f a b
state_after: no goals
Theorem: Finset.map_cast_heq
File: Mathlib/Data/Finset/Image.lean

tactic: subst h
state_before: α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
f : α✝ ↪ β✝
s✝ : Finset α✝
α β : Type u_4
h : α = β
s : Finset α
⊢ HEq (map (Equiv.cast h).toEmbedding s) s
state_after: α✝ : Type u_1
β : Type u_2
γ : Type u_3
f : α✝ ↪ β
s✝ : Finset α✝
α : Type u_4
s : Finset α
⊢ HEq (map (Equiv.cast ⋯).toEmbedding s) s

tactic: simp
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
f : α✝ ↪ β
s✝ : Finset α✝
α : Type u_4
s : Finset α
⊢ HEq (map (Equiv.cast ⋯).toEmbedding s) s
state_after: no goals
Theorem: Set.apply_piecewise₂
File: Mathlib/Data/Set/Function.lean

tactic: by_cases hx : x ∈ s <;> simp [hx]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
δ : α → Sort u_6
s : Set α
f g : (i : α) → δ i
inst✝ : (j : α) → Decidable (j ∈ s)
δ' : α → Sort u_7
δ'' : α → Sort u_8
f' g' : (i : α) → δ' i
h : (i : α) → δ i → δ' i → δ'' i
x : α
⊢ h x (s.piecewise f g x) (s.piecewise f' g' x) = s.piecewise (fun x => h x (f x) (f' x)) (fun x => h x (g x) (g' x)) x
state_after: no goals
Theorem: Finset.iSup_option_toFinset
File: Mathlib/Data/Finset/Lattice.lean

tactic: simp
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : CompleteLattice β
o : Option α
f : α → β
⊢ ⨆ x ∈ o.toFinset, f x = ⨆ x ∈ o, f x
state_after: no goals
Theorem: Ideal.comap_radical
File: Mathlib/RingTheory/Ideal/Maps.lean

tactic: ext
state_before: R : Type u
S : Type v
F : Type u_1
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : FunLike F R S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
⊢ comap f K.radical = (comap f K).radical
state_after: case h
R : Type u
S : Type v
F : Type u_1
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : FunLike F R S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
x✝ : R
⊢ x✝ ∈ comap f K.radical ↔ x✝ ∈ (comap f K).radical

tactic: simp [radical]
state_before: case h
R : Type u
S : Type v
F : Type u_1
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : FunLike F R S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
x✝ : R
⊢ x✝ ∈ comap f K.radical ↔ x✝ ∈ (comap f K).radical
state_after: no goals
Theorem: Finset.map_ofDual_min
File: Mathlib/Data/Finset/Lattice.lean

tactic: rw [max_eq_sup_withBot, sup_image]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
s : Finset αᵒᵈ
⊢ WithTop.map (⇑ofDual) s.min = (image (⇑ofDual) s).max
state_after: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
s : Finset αᵒᵈ
⊢ WithTop.map (⇑ofDual) s.min = s.sup (WithBot.some ∘ ⇑ofDual)

tactic: exact congr_fun Option.map_id _
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
s : Finset αᵒᵈ
⊢ WithTop.map (⇑ofDual) s.min = s.sup (WithBot.some ∘ ⇑ofDual)
state_after: no goals
Theorem: FirstOrder.Language.card_withConstants
File: Mathlib/ModelTheory/LanguageMap.lean

tactic: rw [withConstants, card_sum, card_constantsOn]
state_before: L : Language
L' : Language
M : Type w
inst✝ : L.Structure M
α : Type w'
⊢ L[[α]].card = lift.{w', max u v} L.card + lift.{max u v, w'} #α
state_after: no goals
Theorem: Int.fract_zero
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [fract, floor_zero, cast_zero, sub_self]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a : α
⊢ fract 0 = 0
state_after: no goals
Theorem: LinearMap.lTensor_comp_apply
File: Mathlib/LinearAlgebra/TensorProduct/Basic.lean

tactic: rw [lTensor_comp, coe_comp]
state_before: R : Type u_1
inst✝¹⁶ : CommSemiring R
R' : Type u_2
inst✝¹⁵ : Monoid R'
R'' : Type u_3
inst✝¹⁴ : Semiring R''
M : Type u_4
N : Type u_5
P : Type u_6
Q : Type u_7
S : Type u_8
T : Type u_9
inst✝¹³ : AddCommMonoid M
inst✝¹² : AddCommMonoid N
inst✝¹¹ : AddCommMonoid P
inst✝¹⁰ : AddCommMonoid Q
inst✝⁹ : AddCommMonoid S
inst✝⁸ : AddCommMonoid T
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module R P
inst✝⁴ : Module R Q
inst✝³ : Module R S
inst✝² : Module R T
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P →ₗ[R] Q
f : N →ₗ[R] P
x : M ⊗[R] N
⊢ (lTensor M (g ∘ₗ f)) x = (lTensor M g) ((lTensor M f) x)
state_after: R : Type u_1
inst✝¹⁶ : CommSemiring R
R' : Type u_2
inst✝¹⁵ : Monoid R'
R'' : Type u_3
inst✝¹⁴ : Semiring R''
M : Type u_4
N : Type u_5
P : Type u_6
Q : Type u_7
S : Type u_8
T : Type u_9
inst✝¹³ : AddCommMonoid M
inst✝¹² : AddCommMonoid N
inst✝¹¹ : AddCommMonoid P
inst✝¹⁰ : AddCommMonoid Q
inst✝⁹ : AddCommMonoid S
inst✝⁸ : AddCommMonoid T
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module R P
inst✝⁴ : Module R Q
inst✝³ : Module R S
inst✝² : Module R T
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P →ₗ[R] Q
f : N →ₗ[R] P
x : M ⊗[R] N
⊢ (⇑(lTensor M g) ∘ ⇑(lTensor M f)) x = (lTensor M g) ((lTensor M f) x)

tactic: rfl
state_before: R : Type u_1
inst✝¹⁶ : CommSemiring R
R' : Type u_2
inst✝¹⁵ : Monoid R'
R'' : Type u_3
inst✝¹⁴ : Semiring R''
M : Type u_4
N : Type u_5
P : Type u_6
Q : Type u_7
S : Type u_8
T : Type u_9
inst✝¹³ : AddCommMonoid M
inst✝¹² : AddCommMonoid N
inst✝¹¹ : AddCommMonoid P
inst✝¹⁰ : AddCommMonoid Q
inst✝⁹ : AddCommMonoid S
inst✝⁸ : AddCommMonoid T
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module R P
inst✝⁴ : Module R Q
inst✝³ : Module R S
inst✝² : Module R T
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P →ₗ[R] Q
f : N →ₗ[R] P
x : M ⊗[R] N
⊢ (⇑(lTensor M g) ∘ ⇑(lTensor M f)) x = (lTensor M g) ((lTensor M f) x)
state_after: no goals
Theorem: Nat.Prime.pow_inj
File: Mathlib/Data/Nat/Prime.lean

tactic: have H := dvd_antisymm (Prime.dvd_of_dvd_pow hp <| h ▸ dvd_pow_self p (succ_ne_zero m))
  (Prime.dvd_of_dvd_pow hq <| h.symm ▸ dvd_pow_self q (succ_ne_zero n))
state_before: n✝ p q m n : ℕ
hp : Prime p
hq : Prime q
h : p ^ (m + 1) = q ^ (n + 1)
⊢ p = q ∧ m = n
state_after: n✝ p q m n : ℕ
hp : Prime p
hq : Prime q
h : p ^ (m + 1) = q ^ (n + 1)
H : p = q
⊢ p = q ∧ m = n

tactic: exact ⟨H, succ_inj'.mp <| Nat.pow_right_injective hq.two_le (H ▸ h)⟩
state_before: n✝ p q m n : ℕ
hp : Prime p
hq : Prime q
h : p ^ (m + 1) = q ^ (n + 1)
H : p = q
⊢ p = q ∧ m = n
state_after: no goals
Theorem: Int.csSup_eq_greatest_of_bdd
File: Mathlib/Data/Int/ConditionallyCompleteOrder.lean

tactic: have : s.Nonempty ∧ BddAbove s := ⟨Hinh, b, Hb⟩
state_before: s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ z ∈ s, z ≤ b
Hinh : ∃ z, z ∈ s
⊢ sSup s = ↑(b.greatestOfBdd Hb Hinh)
state_after: s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ z ∈ s, z ≤ b
Hinh : ∃ z, z ∈ s
this : s.Nonempty ∧ BddAbove s
⊢ sSup s = ↑(b.greatestOfBdd Hb Hinh)

tactic: simp only [sSup, this, and_self, dite_true]
state_before: s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ z ∈ s, z ≤ b
Hinh : ∃ z, z ∈ s
this : s.Nonempty ∧ BddAbove s
⊢ sSup s = ↑(b.greatestOfBdd Hb Hinh)
state_after: s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ z ∈ s, z ≤ b
Hinh : ∃ z, z ∈ s
this : s.Nonempty ∧ BddAbove s
⊢ ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯) = ↑(b.greatestOfBdd Hb Hinh)

tactic: convert (coe_greatestOfBdd_eq Hb (Classical.choose_spec (⟨b, Hb⟩ : BddAbove s)) Hinh).symm
state_before: s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ z ∈ s, z ≤ b
Hinh : ∃ z, z ∈ s
this : s.Nonempty ∧ BddAbove s
⊢ ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯) = ↑(b.greatestOfBdd Hb Hinh)
state_after: no goals
Theorem: norm_sub_mul_self
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: repeat' rw [← sq (M := ℝ)]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : E
⊢ ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ - 2 * re ⟪x, y⟫_𝕜 + ‖y‖ * ‖y‖
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : E
⊢ ‖x - y‖ ^ 2 = ‖x‖ ^ 2 - 2 * re ⟪x, y⟫_𝕜 + ‖y‖ ^ 2

tactic: exact norm_sub_sq _ _
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : E
⊢ ‖x - y‖ ^ 2 = ‖x‖ ^ 2 - 2 * re ⟪x, y⟫_𝕜 + ‖y‖ ^ 2
state_after: no goals

tactic: rw [← sq (M := ℝ)]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : E
⊢ ‖x - y‖ ^ 2 = ‖x‖ ^ 2 - 2 * re ⟪x, y⟫_𝕜 + ‖y‖ * ‖y‖
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : E
⊢ ‖x - y‖ ^ 2 = ‖x‖ ^ 2 - 2 * re ⟪x, y⟫_𝕜 + ‖y‖ ^ 2
Theorem: Turing.PartrecToTM2.codeSupp_case
File: Mathlib/Computability/TMToPartrec.lean

tactic: simp [codeSupp, codeSupp', contSupp, Finset.union_assoc, Finset.union_left_comm]
state_before: f g : Code
k : Cont'
⊢ codeSupp (f.case g) k = trStmts₁ (trNormal (f.case g) k) ∪ (codeSupp f k ∪ codeSupp g k)
state_after: no goals
Theorem: CategoryTheory.hasProduct_fin
File: Mathlib/CategoryTheory/Limits/Constructions/FiniteProductsOfBinaryProducts.lean

tactic: letI : HasLimitsOfShape (Discrete (Fin 0)) C :=
  hasLimitsOfShape_of_equivalence (Discrete.equivalence.{0} finZeroEquiv'.symm)
state_before: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasBinaryProducts C
inst✝ : HasTerminal C
f : Fin 0 → C
⊢ HasProduct f
state_after: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasBinaryProducts C
inst✝ : HasTerminal C
f : Fin 0 → C
this : HasLimitsOfShape (Discrete (Fin 0)) C :=
  hasLimitsOfShape_of_equivalence (Discrete.equivalence finZeroEquiv'.symm)
⊢ HasProduct f

tactic: infer_instance
state_before: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasBinaryProducts C
inst✝ : HasTerminal C
f : Fin 0 → C
this : HasLimitsOfShape (Discrete (Fin 0)) C :=
  hasLimitsOfShape_of_equivalence (Discrete.equivalence finZeroEquiv'.symm)
⊢ HasProduct f
state_after: no goals

tactic: haveI := hasProduct_fin n
state_before: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasBinaryProducts C
inst✝ : HasTerminal C
n : ℕ
f : Fin (n + 1) → C
⊢ HasProduct f
state_after: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasBinaryProducts C
inst✝ : HasTerminal C
n : ℕ
f : Fin (n + 1) → C
this : ∀ (f : Fin n → C), HasProduct f
⊢ HasProduct f

tactic: apply HasLimit.mk ⟨_, extendFanIsLimit f (limit.isLimit _) (limit.isLimit _)⟩
state_before: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u'
inst✝² : Category.{v', u'} D
inst✝¹ : HasBinaryProducts C
inst✝ : HasTerminal C
n : ℕ
f : Fin (n + 1) → C
this : ∀ (f : Fin n → C), HasProduct f
⊢ HasProduct f
state_after: no goals
Theorem: Finset.weightedVSubOfPoint_erase
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

tactic: rw [weightedVSubOfPoint_apply, weightedVSubOfPoint_apply]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ ((s.erase i).weightedVSubOfPoint p (p i)) w = (s.weightedVSubOfPoint p (p i)) w
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ ∑ i_1 ∈ s.erase i, w i_1 • (p i_1 -ᵥ p i) = ∑ i_1 ∈ s, w i_1 • (p i_1 -ᵥ p i)

tactic: apply sum_erase
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ ∑ i_1 ∈ s.erase i, w i_1 • (p i_1 -ᵥ p i) = ∑ i_1 ∈ s, w i_1 • (p i_1 -ᵥ p i)
state_after: case h
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ w i • (p i -ᵥ p i) = 0

tactic: rw [vsub_self, smul_zero]
state_before: case h
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ w i • (p i -ᵥ p i) = 0
state_after: no goals
Theorem: SimpleGraph.sum_incMatrix_apply
File: Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean

tactic: classical simp [incMatrix_apply', sum_boole, Set.filter_mem_univ_eq_toFinset]
state_before: R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝² : Fintype (Sym2 α)
inst✝¹ : NonAssocSemiring R
a b : α
e : Sym2 α
inst✝ : Fintype ↑(G.neighborSet a)
⊢ ∑ e : Sym2 α, incMatrix R G a e = ↑(G.degree a)
state_after: no goals

tactic: simp [incMatrix_apply', sum_boole, Set.filter_mem_univ_eq_toFinset]
state_before: R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝² : Fintype (Sym2 α)
inst✝¹ : NonAssocSemiring R
a b : α
e : Sym2 α
inst✝ : Fintype ↑(G.neighborSet a)
⊢ ∑ e : Sym2 α, incMatrix R G a e = ↑(G.degree a)
state_after: no goals
Theorem: inv_lt_one_iff
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rcases le_or_lt a 0 with ha | ha
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: simp [ha, (inv_nonpos.2 ha).trans_lt zero_lt_one]
state_before: 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
state_after: no goals

tactic: simp only [ha.not_le, false_or_iff, inv_lt_one_iff_of_pos ha]
state_before: 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
state_after: no goals
Theorem: Real.Angle.two_nsmul_toReal_eq_two_mul_sub_two_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: nth_rw 1 [← coe_toReal θ]
state_before: θ : Angle
⊢ (2 • θ).toReal = 2 * θ.toReal - 2 * π ↔ π / 2 < θ.toReal
state_after: θ : Angle
⊢ (2 • ↑θ.toReal).toReal = 2 * θ.toReal - 2 * π ↔ π / 2 < θ.toReal

tactic: rw [← coe_nsmul, two_nsmul, ← two_mul, toReal_coe_eq_self_sub_two_pi_iff, Set.mem_Ioc]
state_before: θ : Angle
⊢ (2 • ↑θ.toReal).toReal = 2 * θ.toReal - 2 * π ↔ π / 2 < θ.toReal
state_after: θ : Angle
⊢ π < 2 * θ.toReal ∧ 2 * θ.toReal ≤ 3 * π ↔ π / 2 < θ.toReal

tactic: exact
  ⟨fun h => by linarith, fun h =>
    ⟨(div_lt_iff' (zero_lt_two' ℝ)).1 h, by linarith [pi_pos, toReal_le_pi θ]⟩⟩
state_before: θ : Angle
⊢ π < 2 * θ.toReal ∧ 2 * θ.toReal ≤ 3 * π ↔ π / 2 < θ.toReal
state_after: no goals

tactic: linarith
state_before: θ : Angle
h : π < 2 * θ.toReal ∧ 2 * θ.toReal ≤ 3 * π
⊢ π / 2 < θ.toReal
state_after: no goals

tactic: linarith [pi_pos, toReal_le_pi θ]
state_before: θ : Angle
h : π / 2 < θ.toReal
⊢ 2 * θ.toReal ≤ 3 * π
state_after: no goals
Theorem: Nat.Primrec.pred
File: Mathlib/Computability/Primrec.lean

tactic: cases n <;> simp [*]
state_before: n : ℕ
⊢ Nat.casesOn n 0 id = n.pred
state_after: no goals
Theorem: Metric.ball_half_subset
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

tactic: rw [sub_self_div_two]
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y✝ z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
y : α
h : y ∈ ball x (ε / 2)
⊢ dist y x ≤ ε - ε / 2
state_after: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y✝ z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
y : α
h : y ∈ ball x (ε / 2)
⊢ dist y x ≤ ε / 2

tactic: exact le_of_lt h
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y✝ z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
y : α
h : y ∈ ball x (ε / 2)
⊢ dist y x ≤ ε / 2
state_after: no goals
Theorem: CompactSpace.uniformEquicontinuous_of_equicontinuous
File: Mathlib/Topology/UniformSpace/Compact.lean

tactic: rw [equicontinuous_iff_continuous] at h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
ι : Type u_4
F : ι → β → α
inst✝ : CompactSpace β
h : Equicontinuous F
⊢ UniformEquicontinuous F
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
ι : Type u_4
F : ι → β → α
inst✝ : CompactSpace β
h : Continuous (⇑UniformFun.ofFun ∘ Function.swap F)
⊢ UniformEquicontinuous F

tactic: rw [uniformEquicontinuous_iff_uniformContinuous]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
ι : Type u_4
F : ι → β → α
inst✝ : CompactSpace β
h : Continuous (⇑UniformFun.ofFun ∘ Function.swap F)
⊢ UniformEquicontinuous F
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
ι : Type u_4
F : ι → β → α
inst✝ : CompactSpace β
h : Continuous (⇑UniformFun.ofFun ∘ Function.swap F)
⊢ UniformContinuous (⇑UniformFun.ofFun ∘ Function.swap F)

tactic: exact CompactSpace.uniformContinuous_of_continuous h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
ι : Type u_4
F : ι → β → α
inst✝ : CompactSpace β
h : Continuous (⇑UniformFun.ofFun ∘ Function.swap F)
⊢ UniformContinuous (⇑UniformFun.ofFun ∘ Function.swap F)
state_after: no goals
Theorem: wittPolynomial_one
File: Mathlib/RingTheory/WittVector/WittPolynomial.lean

tactic: simp only [wittPolynomial_eq_sum_C_mul_X_pow, sum_range_succ_comm, range_one, sum_singleton,
  one_mul, pow_one, C_1, pow_zero, tsub_self, tsub_zero]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
⊢ W_ R 1 = C ↑p * X 1 + X 0 ^ p
state_after: no goals
Theorem: frontier_closedBall
File: Mathlib/Analysis/NormedSpace/Real.lean

tactic: rw [frontier, closure_closedBall, interior_closedBall x hr, closedBall_diff_ball]
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
r : ℝ
hr : r ≠ 0
⊢ frontier (closedBall x r) = sphere x r
state_after: no goals
Theorem: Order.not_isSuccLimit_of_noMax
File: Mathlib/Order/SuccPred/Limit.lean

tactic: simp
state_before: α : Type u_1
inst✝⁴ : Preorder α
a : α
inst✝³ : SuccOrder α
inst✝² : IsSuccArchimedean α
inst✝¹ : NoMinOrder α
inst✝ : NoMaxOrder α
⊢ ¬IsSuccLimit a
state_after: no goals
Theorem: PolishSpace.IsClopenable.compl
File: Mathlib/Topology/MetricSpace/Polish.lean

tactic: rcases hs with ⟨t, t_le, t_polish, h, h'⟩
state_before: α : Type u_1
β : Type u_2
inst✝ : TopologicalSpace α
s : Set α
hs : IsClopenable s
⊢ IsClopenable sᶜ
state_after: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : TopologicalSpace α
s : Set α
t : TopologicalSpace α
t_le : t ≤ inst✝
t_polish : PolishSpace α
h : IsClosed s
h' : IsOpen s
⊢ IsClopenable sᶜ

tactic: exact ⟨t, t_le, t_polish, @IsOpen.isClosed_compl α t s h', @IsClosed.isOpen_compl α t s h⟩
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : TopologicalSpace α
s : Set α
t : TopologicalSpace α
t_le : t ≤ inst✝
t_polish : PolishSpace α
h : IsClosed s
h' : IsOpen s
⊢ IsClopenable sᶜ
state_after: no goals